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
static word defaultRegion
point centre(const UList< point > &points) const
Input from file stream, using an ISstream.
vector areaNormal(const UList< point > &points) const
static void addNote(const string ¬e)
Ostream & endl(Ostream &os)
T get(const label index) const
Mesh consisting of general polyhedral cells.
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="")
Generic templated field type.
void removeFiles(const fileName &instanceDir) const
wordList patchNames(nPatches)
static const cellModel & ref(const modelType model)
label max(const labelHashSet &set, label maxValue=labelMin)
point centre(const UList< point > &points) const
An analytical geometric cellShape.
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
#define FatalErrorInFunction
A triangular face using a FixedList of labels corresponding to mesh vertices.
label readLabel(const char *buf)
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
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)
const word & constant() const
Foam::argList args(argc, argv)
#define WarningInFunction