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 122 Info<<
"Overwriting contents of existing pointZone " 124 <<
" with that of set " <<
set.name() <<
"." <<
endl;
128 Info<<
"Adding set " <<
set.name() <<
" as a pointZone." <<
endl;
156 flipMap.append(
false);
161 const word setName(
set.
name() +
"SlaveCells");
163 Info<<
"Trying to load cellSet " << setName
164 <<
" to find out the slave side of the zone." <<
nl 165 <<
"If you do not care about the flipMap" 166 <<
" (i.e. do not use the sideness)" <<
nl 167 <<
"use the -noFlipMap command line option." 174 slaveCellSets.
insert(setName);
203 <<
"One of owner or neighbour of internal face " 204 << facei <<
" should be in cellSet " <<
cells.name()
205 <<
" to be able to determine orientation." <<
endl 228 addressing.append(facei);
229 flipMap.append(flip);
241 Info<<
"Overwriting contents of existing faceZone " 243 <<
" with that of set " <<
set.name() <<
"." <<
endl;
247 Info<<
"Adding set " <<
set.name() <<
" as a faceZone." <<
endl;
277 Info<<
"Overwriting contents of existing cellZone " 279 <<
" with that of set " <<
set.name() <<
"." <<
endl;
283 Info<<
"Adding set " <<
set.name() <<
" as a cellZone." <<
endl;
299 <<
"Failed writing polyMesh."
static void addNote(const string ¬e)
Add extra notes for the usage information.
A class for handling file names.
List of IOobjects with searching and retrieving facilities. Implemented as a HashTable, so the various sorted methods should be used if traversing in parallel.
errorManipArg< error, int > exit(error &err, const int errNo=1)
const fileName & facesInstance() const
Return the current instance directory for faces.
word findInstance(const fileName &dir, const word &name=word::null, IOobjectOption::readOption rOpt=IOobjectOption::MUST_READ, const word &stopInstance=word::null) const
Return time instance (location) of dir that contains the file name (eg, used in reading mesh data)...
labelList pointLabels(nPoints, -1)
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
void append(const T &val)
Append an element at the end of the list.
bool found(const Key &key) const
Same as contains()
virtual const labelList & faceNeighbour() const
Return face neighbour.
const word & name() const noexcept
Return the object name.
constexpr char nl
The newline '\n' character (0x0a)
static word meshSubDir
Return the mesh sub-directory name (usually "polyMesh")
Ostream & endl(Ostream &os)
Add newline and flush stream.
bool found(const T &val, label pos=0) const
Same as contains()
static void addBoolOption(const word &optName, const string &usage="", bool advanced=false)
Add a bool option to validOptions with usage information.
bool insert(const Key &key)
Insert a new entry, not overwriting existing entries.
labelList faceLabels(nFaceLabels)
bool isInternalFace(const label faceIndex) const noexcept
Return true if given face label is internal to the mesh.
#define forAll(list, i)
Loop across all elements in list.
writeOption writeOpt() const noexcept
Get the write option.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
A class for handling words, derived from Foam::string.
label size() const noexcept
The number of entries in the list.
virtual const labelList & faceOwner() const
Return face owner.
static const word null
An empty word.
virtual void resetAddressing(faceZone &&zn)
Move reset addressing and flip map from another zone.
static instantList selectIfPresent(Time &runTime, const argList &args)
If any time option provided return the set of times (as select0) otherwise return just the current ti...
errorManip< error > abort(error &err)
virtual bool write(const bool writeOnProc=true) const
Write mesh using IO settings from time.
label index() const noexcept
The index of this zone in the zone list.
const faceZoneMesh & faceZones() const noexcept
Return face zone mesh.
const fileName & instance() const noexcept
Read access to instance path component.
const pointZoneMesh & pointZones() const noexcept
Return point zone mesh.
A collection of cell labels.
fileName meshDir() const
Return the local mesh directory (dbDir()/meshSubDir)
Automatically write from objectRegistry::writeObject()
const cellZoneMesh & cellZones() const noexcept
Return cell zone mesh.
List< label > sortedToc(const UList< bool > &bools)
Return the (sorted) values corresponding to 'true' entries.
messageStream Info
Information stream (stdout output on master, null elsewhere)
A subset of mesh faces organised as a primitive patch.
IOobject io("surfaceFilmProperties", mesh.time().constant(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE, IOobject::NO_REGISTER)
Foam::argList args(argc, argv)
Defines the attributes of an object for which implicit objectRegistry management is supported...
bool found(const word &optName) const
Return true if the named option is found.
static void addOptions(const bool constant=true, const bool withZero=false)
Add timeSelector options to argList::validOptions.