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(),
118 runTime.setTime(timeDirs[timeI], timeI);
120 Info<<
nl <<
"Time = " << runTime.timeName() <<
endl;
126 Info<<
"Detected changed mesh. Recreating singleCell mesh." <<
endl;
135 mesh.polyMesh::instance(),
149 if (fields)
Info<<
"Reading geometric fields" <<
nl <<
endl;
154 if (fields) interpolateFields(scMesh(),
vsFlds);
155 if (fields) interpolateFields(scMesh(),
vvFlds);
156 if (fields) interpolateFields(scMesh(),
vstFlds);
157 if (fields) interpolateFields(scMesh(),
vsymtFlds);
158 if (fields) interpolateFields(scMesh(),
vtFlds);
162 Info<<
"Writing mesh to time " << runTime.timeName() <<
endl;
PtrList< volTensorField > vtFlds
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 boundary 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.
void reset(const fvMesh &)
Reset mesh.
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.
virtual bool write(const bool write=true) const
Write mesh using IO settings from time.
PtrList< volVectorField > vvFlds
PtrList< volScalarField > vsFlds
PtrList< volSymmTensorField > vsymtFlds
static instantList select0(Time &runTime, const argList &args)
Return the set of times selected based on the argList options.
readUpdateState readUpdate(const stitchType stitch=stitchType::geometric)
Update the mesh based on the mesh files saved in time.
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...
static void addOptions(const bool constant=true, const bool withZero=false)
Add the options handled by timeSelector to argList::validOptions.