Go to the documentation of this file.
56 const string singleCellName =
"singleCell";
59 template<
class GeoField>
60 void interpolateFields
69 GeoField* scFldPtr = scFld.
ptr();
77 int main(
int argc,
char *argv[])
81 "Map fields to a mesh with all internal faces removed"
82 " (singleCellFvMesh) which gets written to region 'singleCell'"
97 <<
"Cannot convert region " << singleCellName
98 <<
" since result would overwrite it. Please rename your region."
103 Info<<
"Creating singleCell mesh" <<
nl <<
endl;
144 Info<<
"Detected changed mesh. Recreating singleCell mesh." <<
endl;
184 interpolateFields(scMesh(), vsFlds);
185 interpolateFields(scMesh(), vvFlds);
186 interpolateFields(scMesh(), vstFlds);
187 interpolateFields(scMesh(), vsymtFlds);
188 interpolateFields(scMesh(), vtFlds);
Defines the attributes of an object for which implicit objectRegistry management is supported,...
bool exists(const fileName &name, const bool checkGzip=true, const bool followLink=true)
Does the name exist (as DIRECTORY or FILE) in the file system?
virtual bool write(const bool valid=true) const
Write mesh using IO settings from time.
wordList ReadFields(const typename GeoMesh::Mesh &mesh, const IOobjectList &objects, PtrList< GeometricField< Type, PatchField, GeoMesh >> &fields, const bool syncPar=true, const bool readOldTime=false)
Read Geometric fields of templated type.
A class for managing temporary objects.
static word timeName(const scalar t, const int precision=precision_)
static void addNote(const string ¬e)
Add extra notes for the usage information.
void clear()
Clear all entries from the registry.
Ostream & endl(Ostream &os)
Add newline and flush stream.
#define forAll(list, i)
Loop across all elements in list.
virtual readUpdateState readUpdate()
Update the mesh based on the mesh files saved in time.
const fileName & pointsInstance() const
Return the current instance directory for points.
fvMesh as subset of other mesh. Consists of one cell and all original bounday faces....
tmp< GeometricField< Type, fvPatchField, volMesh > > interpolate(const GeometricField< Type, fvPatchField, volMesh > &) const
messageStream Info
Information stream (uses stdout - output is on the master only)
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
List of IOobjects with searching and retrieving facilities.
errorManipArg< error, int > exit(error &err, const int errNo=1)
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Field reading functions for post-processing utilities.
static void addOptions(const bool constant=true, const bool withZero=false)
Add timeSelector options to argList::validOptions.
virtual void setTime(const Time &t)
Reset the time and time-index to those of the given time.
void reset(const label nPoints, const label nInternalFaces, const label nFaces, const label nCells)
Reset this primitiveMesh given the primitive array sizes.
bool ln(const fileName &src, const fileName &dst)
Create a softlink. dst should not exist. Returns true if successful.
fileName objectPath() const
The complete path + object name.
static instantList select0(Time &runTime, const argList &args)
Foam::argList args(argc, argv)
bool mkDir(const fileName &pathName, mode_t mode=0777)
Make a directory and return an error if it could not be created.
fileName path() const
The complete path.
void setInstance(const fileName &instance, const IOobject::writeOption wOpt=IOobject::AUTO_WRITE)
Set the instance for mesh files.