90 int main(
int argc,
char *argv[])
137 <<
"Cannot handle multiple domains" 138 <<
nl <<
"Ignoring domain " << domain <<
" setting on line " 139 << str.lineNumber() <<
endl;
147 cells[celli] =
cellShape(tet, tetPoints);
168 forAll(boundaryFaces, facei)
175 <<
"Invalid boundary region number " << patchi
176 <<
" on line " << str.lineNumber()
181 maxPatch =
max(maxPatch, patchi);
186 boundaryFaces[facei].setSize(3);
187 boundaryFaces[facei][0] = tri[0];
188 boundaryFaces[facei][1] = tri[1];
189 boundaryFaces[facei][2] = tri[2];
190 boundaryPatch[facei] =
patchi;
192 vertsToBoundary.insert(tri, facei);
195 label nPatches = maxPatch + 1;
211 const face& f = tris[i];
218 if (iter != vertsToBoundary.
end())
220 label facei = iter();
221 const triFace& tri = iter.key();
228 if (((fc - cc) & fn) < 0)
231 boundaryFaces[facei].flip();
235 vertsToBoundary.erase(iter);
241 if (vertsToBoundary.size())
245 <<
"There are boundary faces without attached cells." 246 <<
"Boundary faces (as triFaces):" << vertsToBoundary.toc()
257 forAll(patchNames, patchi)
263 word defaultFacesName =
"defaultFaces";
264 word defaultFacesType = polyPatch::typeName;
265 wordList patchPhysicalTypes(nPatches, polyPatch::typeName);
271 forAll(boundaryPatch, facei)
273 label patchi = boundaryPatch[facei];
275 allPatchFaces[
patchi].append(boundaryFaces[facei]);
279 <<
"\tNeutral Boundary\tPatch name\tSize" <<
nl 280 <<
"\t----------------\t----------\t----" <<
endl;
282 forAll(allPatchFaces, patchi)
284 Info<<
'\t' << patchi <<
"\t\t\t" 285 << patchNames[
patchi] <<
"\t\t"
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
static const cellModel * lookup(const word &)
Look up a model by name and return a pointer to the model or nullptr.
errorManipArg< error, int > exit(error &err, const int errNo=1)
static iteratorEnd end()
iteratorEnd set to beyond the end of any HashTable
A face is a list of labels corresponding to mesh vertices.
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
An analytical geometric cellShape.
wordList patchTypes(nPatches)
static word defaultRegion
Return the default region name.
Ostream & endl(Ostream &os)
Add newline and flush stream.
point centre(const pointField &) const
Return centre (centroid)
static SLList< string > validArgs
A list of valid (mandatory) arguments.
void transfer(HashTable< T, Key, Hash > &)
Transfer the contents of the argument table into this table.
virtual bool write(const bool write=true) const
Write mesh using IO settings from time.
vector area(const pointField &) const
Return vector area.
label size() const
Return number of elements in table.
iterator find(const Key &)
Find and return an iterator set at the hashedEntry.
faceList faces() const
Faces of this cell.
A class for handling words, derived from string.
A triangular face using a FixedList of labels corresponding to mesh vertices.
wordList patchNames(nPatches)
const word & constant() const
Return constant name.
An STL-conforming hash table.
label readLabel(Istream &is)
word name(const complex &)
Return a string representation of a complex.
vector point
Point is a vector.
#define WarningInFunction
Report a warning using Foam::Warning.
point centre(const pointField &) const
Centroid of the cell.
Maps a geometry to a set of cell primitives, which enables geometric cell data to be calculated witho...
Mesh consisting of general polyhedral cells.
Foam::argList args(argc, argv)
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...