50 const string singleCellName =
"singleCell";
53 template<
class GeoField>
54 void interpolateFields
63 GeoField* scFldPtr = scFld.
ptr();
71 int main(
int argc,
char *argv[])
78 "do not update fields" 93 <<
"Cannot convert region " << singleCellName
94 <<
" since result would overwrite it. Please rename your region." 99 Info<<
"Creating singleCell mesh" <<
nl <<
endl;
107 mesh.polyMesh::instance(),
116 if (!
exists(scMesh().fvSolution::objectPath()))
138 Info<<
"Detected changed mesh. Recreating singleCell mesh." <<
endl;
147 mesh.polyMesh::instance(),
161 if (fields)
Info<<
"Reading geometric fields" <<
nl <<
endl;
166 if (fields) interpolateFields(scMesh(),
vsFlds);
167 if (fields) interpolateFields(scMesh(),
vvFlds);
168 if (fields) interpolateFields(scMesh(),
vstFlds);
169 if (fields) interpolateFields(scMesh(),
vsymtFlds);
170 if (fields) interpolateFields(scMesh(),
vtFlds);
PtrList< volTensorField > vtFlds
bool exists(const fileName &, const bool checkVariants=true, const bool followLink=true)
Does the name exist (as directory or file) in the file system?
PtrList< volSphericalTensorField > vstFlds
#define forAll(list, i)
Loop across all elements in list.
fvMesh as subset of other mesh. Consists of one cell and all original bounday faces. Useful when manipulating boundary data. Single internal cell only needed to be able to manipulate in a standard way.
List of IOobjects with searching and retrieving facilities.
errorManipArg< error, int > exit(error &err, const int errNo=1)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Ostream & endl(Ostream &os)
Add newline and flush stream.
bool optionFound(const word &opt) const
Return true if the named option is found.
tmp< GeometricField< Type, fvPatchField, volMesh > > interpolate(const GeometricField< Type, fvPatchField, volMesh > &) const
Map volField. Internal field set to average, patch fields straight.
Field reading functions for post-processing utilities.
static word timeName(const scalar, const int precision=precision_)
Return time name of given scalar time.
virtual bool write(const bool write=true) const
Write mesh using IO settings from time.
PtrList< volVectorField > vvFlds
fileName path() const
Return complete path.
PtrList< volScalarField > vsFlds
virtual readUpdateState readUpdate()
Update the mesh based on the mesh files saved in time.
PtrList< volSymmTensorField > vsymtFlds
virtual void setTime(const Time &)
Reset the time and time-index to those of the given time.
bool ln(const fileName &src, const fileName &dst)
Create a softlink. dst should not exist. Returns true if successful.
void reset(const label nPoints, const label nInternalFaces, const label nFaces, const label nCells)
Reset this primitiveMesh given the primitive array sizes.
static instantList select0(Time &runTime, const argList &args)
Return the set of times selected based on the argList options.
bool mkDir(const fileName &, mode_t=0777)
Make a directory and return an error if it could not be created.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
void clear()
Remove all regIOobject owned by the registry.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
static void addBoolOption(const word &opt, const string &usage="")
Add to a bool option to validOptions with usage information.
T * ptr() const
Return tmp pointer for reuse.
A class for managing temporary objects.
Foam::argList args(argc, argv)
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
fileName objectPath() const
Return complete path + object name.
static void addOptions(const bool constant=true, const bool withZero=false)
Add the options handled by timeSelector to argList::validOptions.