50 const string singleCellName =
"singleCell";
53 template<
class GeoField>
54 void interpolateFields
63 GeoField* scFldPtr = scFld.
ptr();
71 int main(
int argc,
char *argv[])
86 <<
"Cannot convert region " << singleCellName
87 <<
" since result would overwrite it. Please rename your region." 92 Info<<
"Creating singleCell mesh" <<
nl <<
endl;
100 mesh.polyMesh::instance(),
109 if (!
exists(scMesh().fvSolution::objectPath()))
123 runTime.setTime(timeDirs[timeI], timeI);
125 Info<<
nl <<
"Time = " << runTime.timeName() <<
endl;
131 Info<<
"Detected changed mesh. Recreating singleCell mesh." <<
endl;
140 mesh.polyMesh::instance(),
171 interpolateFields(scMesh(), vsFlds);
172 interpolateFields(scMesh(), vvFlds);
173 interpolateFields(scMesh(), vstFlds);
174 interpolateFields(scMesh(), vsymtFlds);
175 interpolateFields(scMesh(), vtFlds);
179 Info<<
"Writing mesh to time " << runTime.timeName() <<
endl;
fileName objectPath() const
Return complete path + object name.
wordList ReadFields(const Mesh &mesh, const IOobjectList &objects, PtrList< GeoField > &fields, const bool syncPar=true)
Read all fields of the specified type.
#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.
Field reading functions for post-processing utilities.
tmp< GeometricField< Type, fvPatchField, volMesh > > interpolate(const GeometricField< Type, fvPatchField, volMesh > &) const
Map volField. Internal field set to average, patch fields straight.
fileName path() const
Return complete path.
virtual readUpdateState readUpdate()
Update the mesh based on the mesh files saved in time.
void clear()
Clear all entries from table.
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.
T * ptr() const
Return tmp pointer for reuse.
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.
bool exists(const fileName &, const bool checkGzip=true)
Does the name exist (as DIRECTORY or FILE) in the file system?
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
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...
virtual bool write() const
Write mesh using IO settings from time.
static void addOptions(const bool constant=true, const bool withZero=false)
Add the options handled by timeSelector to argList::validOptions.