Go to the documentation of this file.
63 int main(
int argc,
char *argv[])
67 "Add point/face/cell Zones from similarly named point/face/cell Sets"
74 "Ignore orientation of faceSet"
82 const bool noFlipMap =
args.
found(
"noFlipMap");
102 Info<<
"Searched : " << setsInstance/setsSubPath
104 <<
"Found : " << objects.names() <<
nl
108 IOobjectList pointObjects(objects.lookupClass(pointSet::typeName));
126 Info<<
"Overwriting contents of existing pointZone "
128 <<
" with that of set " << set.name() <<
"." <<
endl;
132 Info<<
"Adding set " << set.name() <<
" as a pointZone." <<
endl;
142 IOobjectList faceObjects(objects.lookupClass(faceSet::typeName));
162 label facei = faceLabels[i];
163 addressing.append(facei);
164 flipMap.append(
false);
169 const word setName(set.name() +
"SlaveCells");
171 Info<<
"Trying to load cellSet " << setName
172 <<
" to find out the slave side of the zone." <<
nl
173 <<
"If you do not care about the flipMap"
174 <<
" (i.e. do not use the sideness)" <<
nl
175 <<
"use the -noFlipMap command line option."
182 slaveCellSets.insert(setName);
186 label facei = faceLabels[i];
211 <<
"One of owner or neighbour of internal face "
212 << facei <<
" should be in cellSet " <<
cells.name()
213 <<
" to be able to determine orientation." <<
endl
236 addressing.append(facei);
237 flipMap.append(flip);
249 Info<<
"Overwriting contents of existing faceZone "
251 <<
" with that of set " << set.name() <<
"." <<
endl;
255 Info<<
"Adding set " << set.name() <<
" as a faceZone." <<
endl;
270 IOobjectList cellObjects(objects.lookupClass(cellSet::typeName));
276 if (!slaveCellSets.found(iter.key()))
289 Info<<
"Overwriting contents of existing cellZone "
291 <<
" with that of set " << set.name() <<
"." <<
endl;
295 Info<<
"Adding set " << set.name() <<
" as a cellZone." <<
endl;
311 <<
"Failed writing polyMesh."
A class for handling words, derived from Foam::string.
A class for handling file names.
virtual bool write(const bool valid=true) const
Write mesh using IO settings from time.
virtual const fileName & dbDir() const
Override the objectRegistry dbDir for a single-region case.
virtual void resetAddressing(const labelUList &addr, const bool flipMapValue)
Reset addressing - use uniform flip map value.
static word meshSubDir
Return the mesh sub-directory name (usually "polyMesh")
static void addNote(const string ¬e)
Add extra notes for the usage information.
const fileName & facesInstance() const
Return the current instance directory for faces.
const cellZoneMesh & cellZones() const
Return cell zone mesh.
Ostream & endl(Ostream &os)
Add newline and flush stream.
#define forAll(list, i)
Loop across all elements in list.
const faceZoneMesh & faceZones() const
Return face zone mesh.
A subset of mesh faces organised as a primitive patch.
messageStream Info
Information stream (uses stdout - output is on the master only)
const pointZoneMesh & pointZones() const
Return point zone mesh.
virtual const labelList & faceOwner() const
Return face owner.
static instantList selectIfPresent(Time &runTime, const argList &args)
A list that is sorted upon construction or when explicitly requested with the sort() method.
errorManip< error > abort(error &err)
A collection of cell labels.
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
errorManipArg< error, int > exit(error &err, const int errNo=1)
static void addBoolOption(const word &optName, const string &usage="", bool advanced=false)
Add a bool option to validOptions with usage information.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
forAllConstIters(mixture.phases(), phase)
static void addOptions(const bool constant=true, const bool withZero=false)
Add timeSelector options to argList::validOptions.
bool isInternalFace(const label faceIndex) const
Return true if given face label is internal to the mesh.
static const word null
An empty word.
Foam::argList args(argc, argv)
label index() const
Return the index of this zone in zone list.
labelList pointLabels(nPoints, -1)
virtual const labelList & faceNeighbour() const
Return face neighbour.
bool found(const word &optName) const
Return true if the named option is found.