Go to the documentation of this file.
43 nNodes += faceLst[faceI].
size();
47 <<
"POLYGONS " << faceLst.
size() <<
' '
48 << faceLst.
size() + nNodes <<
nl;
72 const bool mustTriangulate = this->isTri();
79 <<
"Cannot read file " << filename
126 zones[i] =
label(region[i]);
138 zones[i] =
label(region[i]);
157 nTri += faces[faceI].
size()-2;
167 const face&
f = faces[faceI];
168 for (
label fp1 = 1; fp1 <
f.size() - 1; fp1++)
170 label fp2 =
f.fcIndex(fp1);
173 dynZones.
append(zones[faceI]);
181 zoneSizes[dynZones[triI]]++;
184 this->sortFacesAndStore(dynFaces.
xfer(), dynZones.
xfer(), sorted);
187 this->addZones(zoneSizes, zoneNames,
true);
194 const face&
f = faces[faceI];
202 zoneSizes[zones[faceI]]++;
205 this->sortFacesAndStore(dynFaces.
xfer(), zones.
xfer(), sorted);
208 this->addZones(zoneSizes, zoneNames,
true);
212 this->storedPoints().transfer(reader.
points());
232 ? surfaceFormatsCore::oneZone(faceLst)
242 <<
"Cannot open file for writing " << filename
247 writeHeader(os, pointLst);
248 writeHeaderPolygons(os, faceLst);
259 const Face&
f = faceLst[
faceMap[faceIndex++]];
273 const Face&
f = faceLst[faceIndex++];
285 writeTail(os, zones);
300 <<
"Cannot open file for writing " << filename
307 writeHeader(os, surf.points());
308 writeHeaderPolygons(os, faceLst);
312 const Face&
f = faceLst[faceI];
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Xfer< List< T > > xfer()
Transfer contents to the Xfer container as a plain List.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
A class for handling file names.
const faceList & faces() const
2D cells (=faces)
A primitive field of type <T> with automated input and output.
const objectRegistry & cellData() const
Cell based fields.
#define forAll(list, i)
Loop across all elements in list.
bool useFaceMap() const
Use faceMap?
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
Xfer< List< T > > xfer()
Transfer contents to the Xfer container.
bool read(const char *, int32_t &)
Reader for vtk unstructured_grid legacy files. Supports single CELLS, POINTS etc. entry only.
const List< Face > & faces() const
Return const access to the faces.
const pointField & points() const
Points.
const pointField & points() const
Return const access to the points.
const List< surfZone > & surfZones() const
Const access to the surface zones.
A proxy for writing MeshedSurface, UnsortedMeshedSurface and surfMesh to various file formats.
Registry of regIOobjects.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Pre-declare SubField and related Field type.
const List< label > & zoneIds() const
Return const access to the zone ids.
DynamicList< T, SizeInc, SizeMult, SizeDiv > & append(const T &)
Append an element at the end of the list.
errorManipArg< error, int > exit(error &err, const int errNo=1)
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
bool foundObject(const word &name) const
Is the named Type found?
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
A surface zone on a MeshedSurface.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
A face is a list of labels corresponding to mesh vertices.
const Type & lookupObject(const word &name) const
Lookup and return the object of the given Type.
void size(const label)
Override size to be inconsistent with allocated storage.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
bool good() const
Return true if next operation might succeed.
label size() const
Return the number of elements in the UList.
word name(const complex &)
Return a string representation of a complex.
const List< label > & faceMap() const
Const access to the faceMap, zero-sized when unused.