Go to the documentation of this file.
96 int main(
int argc,
char *argv[])
100 "Convert a neutral file format (Netgen v4.4) to OpenFOAM"
147 <<
"Cannot handle multiple domains"
148 <<
nl <<
"Ignoring domain " << domain <<
" setting on line "
149 << str.lineNumber() <<
endl;
178 forAll(boundaryFaces, facei)
185 <<
"Invalid boundary region number " << patchi
186 <<
" on line " << str.lineNumber()
191 maxPatch =
max(maxPatch, patchi);
196 boundaryFaces[facei].setSize(3);
197 boundaryFaces[facei][0] = tri[0];
198 boundaryFaces[facei][1] = tri[1];
199 boundaryFaces[facei][2] = tri[2];
202 vertsToBoundary.insert(tri, facei);
219 for (
const face&
f : tris)
223 auto iter = vertsToBoundary.find(
triFace(
f[0],
f[1],
f[2]));
227 const triFace& tri = iter.key();
228 const label facei = iter.val();
236 if (((fc - cc) & areaNorm) < 0)
239 boundaryFaces[facei].flip();
243 vertsToBoundary.erase(iter);
249 if (vertsToBoundary.size())
253 <<
"There are boundary faces without attached cells."
254 <<
"Boundary faces (as triFaces):" << vertsToBoundary.toc()
283 allPatchFaces[patchi].append(boundaryFaces[facei]);
287 <<
"\tNeutral Boundary\tPatch name\tSize" <<
nl
288 <<
"\t----------------\t----------\t----" <<
endl;
290 forAll(allPatchFaces, patchi)
292 Info<<
'\t' << patchi <<
"\t\t\t"
294 << allPatchFaces[patchi].size() <<
endl;
296 patchFaces[patchi].
transfer(allPatchFaces[patchi]);
Defines the attributes of an object for which implicit objectRegistry management is supported,...
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.
static word defaultRegion
Return the default region name.
point centre(const UList< point > &points) const
Centroid of the cell.
Input from file stream, using an ISstream.
vector areaNormal(const UList< point > &points) const
The area normal - with magnitude equal to area of face.
static void addNote(const string ¬e)
Add extra notes for the usage information.
Ostream & endl(Ostream &os)
Add newline and flush stream.
faceList faces() const
Faces of this cell.
T get(const label index) const
Get a value from the argument at index.
Mesh consisting of general polyhedral cells.
#define forAll(list, i)
Loop across all elements in list.
wordList patchTypes(nPatches)
Like polyPatch but without reference to mesh. Used in boundaryMesh to hold data on patches....
static void addArgument(const string &argName, const string &usage="")
Append a (mandatory) argument to validArgs.
messageStream Info
Information stream (stdout output on master, null elsewhere)
void removeFiles(const fileName &instanceDir) const
Remove all files from mesh instance.
wordList patchNames(nPatches)
static const cellModel & ref(const modelType model)
Look up reference to cellModel by enumeration. Fatal on failure.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
point centre(const UList< point > &points) const
Return centre (centroid)
An analytical geometric cellShape.
void transfer(HashTable< T, Key, Hash > &rhs)
Transfer contents into this table.
errorManipArg< error, int > exit(error &err, const int errNo=1)
Tet storage. Null constructable (unfortunately tetrahedron<point, point> is not)
A HashTable similar to std::unordered_map.
static unsigned int defaultPrecision() noexcept
Return the default precision.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
A triangular face using a FixedList of labels corresponding to mesh vertices.
label readLabel(const char *buf)
Parse entire buffer as a label, skipping leading/trailing whitespace.
A face is a list of labels corresponding to mesh vertices.
Maps a geometry to a set of cell primitives.
vector point
Point is a vector.
static word defaultName(const label n=-1)
Default patch name: "patch" or "patchN".
const word & constant() const
Return constant name.
Foam::argList args(argc, argv)
#define WarningInFunction
Report a warning using Foam::Warning.