Go to the documentation of this file.
61 template<
class ZoneType>
72 Info<<
"Removing zone " << setName <<
" at index " << zoneID <<
endl;
83 oldToNew[zoneID] = newI;
84 zones.reorder(oldToNew);
86 zones.setSize(zones.size()-1);
115 if (objects.found(setName))
118 fileName object = objects[setName]->objectPath();
119 Info<<
"Removing file " <<
object <<
endl;
124 if (setType == cellZoneSet::typeName)
132 else if (setType == faceZoneSet::typeName)
140 else if (setType == pointZoneSet::typeName)
159 Info<<
" mesh not changed." <<
endl;
164 Info<<
" points moved; topology unchanged." <<
endl;
169 Info<<
" topology changed; patches unchanged." <<
nl
176 Info<<
" topology changed and patches changed." <<
nl
185 <<
"Illegal mesh update state "
195 int main(
int argc,
char *argv[])
203 "do not synchronise selection across coupled patches"
227 runTime.setTime(
timeDirs[timeI], timeI);
228 Info<<
"Time = " << runTime.timeName() <<
endl;
256 Info<<
"Created " << currentSet().type() <<
" "
272 Info<<
"Read set " << currentSet().type() <<
" "
273 << setName <<
" with size "
297 source().applyToSet(action, currentSet());
299 if (!noSync) currentSet().sync(
mesh);
300 currentSet().write();
322 currentSet().
name() +
"_old2",
327 currentSet().
clear();
331 currentSet().subset(oldSet());
333 if (!noSync) currentSet().sync(
mesh);
334 currentSet().write();
339 Info<<
" Clearing " << currentSet().type() <<
endl;
340 currentSet().
clear();
341 currentSet().write();
345 Info<<
" Inverting " << currentSet().type() <<
endl;
346 currentSet().invert(currentSet().maxSize(
mesh));
347 currentSet().write();
358 <<
"Unhandled action " << action <<
endl;
362 if (currentSet.
valid())
364 Info<<
" " << currentSet().type() <<
" "
365 << currentSet().name()
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
A class for handling words, derived from string.
A class for handling file names.
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
#define forAll(list, i)
Loop across all elements in list.
static setAction toAction(const word &actionName)
Convert string to action.
int main(int argc, char *argv[])
bool rm(const fileName &)
Remove a file, returning true if successful otherwise false.
label nTotalPoints() const
Return total number of points in decomposed mesh. Not.
static word meshSubDir
Return the mesh sub-directory name (usually "polyMesh")
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
label nTotalCells() const
Return total number of cells in decomposed mesh.
static void addBoolOption(const word &opt, const string &usage="")
Add to a bool option to validOptions with usage information.
const fileName & facesInstance() const
Return the current instance directory for faces.
const cellZoneMesh & cellZones() const
Return cell zone mesh.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
Ostream & endl(Ostream &os)
Add newline and flush stream.
setAction
Enumeration defining the valid actions.
label nTotalFaces() const
Return total number of faces in decomposed mesh. Not.
static autoPtr< topoSet > New(const word &setType, const polyMesh &mesh, const word &name, readOption r=MUST_READ, writeOption w=NO_WRITE)
Return a pointer to a toposet read from file.
void removeSet(const polyMesh &mesh, const word &setType, const word &setName)
Mesh consisting of general polyhedral cells.
const faceZoneMesh & faceZones() const
Return face zone mesh.
virtual readUpdateState readUpdate()
Update the mesh based on the mesh files saved in time.
const word dictName("particleTrackDict")
void printMesh(const Time &runTime, const polyMesh &mesh)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
polyMesh::readUpdateState meshReadUpdate(polyMesh &mesh)
const pointZoneMesh & pointZones() const
Return point zone mesh.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
static instantList selectIfPresent(Time &runTime, const argList &args)
If any time option provided return the set of times (as select0)
A list of keyword definitions, which are a keyword followed by any number of values (e....
static autoPtr< topoSetSource > New(const word &topoSetSourceType, const polyMesh &mesh, const dictionary &dict)
Return a reference to the selected topoSetSource.
errorManip< error > abort(error &err)
label findZoneID(const word &zoneName) const
Find zone index given a name.
List of IOobjects with searching and retrieving facilities.
word findInstance(const fileName &dir, const word &name=word::null, const IOobject::readOption rOpt=IOobject::MUST_READ, const word &stopInstance=word::null) const
Return the location of "dir" containing the file "name".
readUpdateState
Enumeration defining the state of the mesh after a read update.
const boundBox & bounds() const
Return mesh bounding box.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
static instantList timeDirs
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
static void addOptions(const bool constant=true, const bool withZero=false)
Add the options handled by timeSelector to argList::validOptions.
static word timeName(const scalar, const int precision=precision_)
Return time name of given scalar time.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
bool valid() const
Return true if the autoPtr valid (ie, the pointer is set).
label size() const
Return the number of elements in the PtrList.
static const word null
An empty word.
bool optionFound(const word &opt) const
Return true if the named option is found.
void clear()
Delete object (if the pointer is valid) and set pointer to NULL.
const Time & time() const
Return the top-level database.
void clearAddressing()
Clear addressing.
const globalMeshData & globalData() const
Return parallel info.
const dictionary & subDict(const word &) const
Find and return a sub-dictionary.
Foam::argList args(argc, argv)
void removeZone(ZoneMesh< ZoneType, polyMesh > &zones, const word &setName)
#define WarningInFunction
Report a warning using Foam::Warning.
IOobject dictIO(dictName, runTime.constant(), mesh, IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE)
word name(const complex &)
Return a string representation of a complex.