36 const UList<Face>& faceLst
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
124 zones[i] =
label(region[i]);
136 zones[i] =
label(region[i]);
155 nTri += faces[facei].
size()-2;
165 const face&
f = faces[facei];
166 for (
label fp1 = 1; fp1 <
f.size() - 1; fp1++)
168 label fp2 =
f.fcIndex(fp1);
171 dynZones.
append(zones[facei]);
179 zoneSizes[dynZones[triI]]++;
182 this->sortFacesAndStore(move(dynFaces), move(dynZones), sorted);
185 this->addZones(zoneSizes, zoneNames,
true);
192 const face&
f = faces[facei];
200 zoneSizes[zones[facei]]++;
203 this->sortFacesAndStore(move(dynFaces), move(zones), sorted);
206 this->addZones(zoneSizes, zoneNames,
true);
210 this->storedPoints().transfer(reader.
points());
230 ? surfaceFormatsCore::oneZone(faceLst)
240 <<
"Cannot open file for writing " << filename
246 writeHeaderPolygons(os, faceLst);
251 const surfZone& zone = zones[zoneI];
257 const Face&
f = faceLst[
faceMap[faceIndex++]];
271 const Face&
f = faceLst[faceIndex++];
283 writeTail(os, zones);
298 <<
"Cannot open file for writing " << filename
306 writeHeaderPolygons(os, faceLst);
310 const Face&
f = faceLst[facei];
#define forAll(list, i)
Loop across all elements in list.
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
DynamicList< T, SizeInc, SizeMult, SizeDiv > & append(const T &)
Append an element at the end of the list.
A primitive field of type <Type> with automated input and output.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
bool good() const
Return true if next operation might succeed.
void size(const label)
Override size to be inconsistent with allocated storage.
A proxy for writing MeshedSurface, UnsortedMeshedSurface and surfMesh to various file formats.
const List< surfZone > & surfZones() const
Const access to the surface zones.
const List< Face > & faces() const
Return const access to the faces.
bool useFaceMap() const
Use faceMap?
const List< label > & faceMap() const
Const access to the faceMap, zero-sized when unused.
const pointField & points() const
Return const access to the points.
const List< Face > & faces() const
Return const access to the faces.
const Field< PointType > & points() const
Return reference to global points.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
A surface geometry mesh, in which the surface zone information is conveyed by the 'zoneId' associated...
const List< label > & zoneIds() const
Return const access to the zone ids.
A face is a list of labels corresponding to mesh vertices.
A class for handling file names.
Registry of regIOobjects.
const Type & lookupObject(const word &name) const
Lookup and return the object of the given Type and name.
bool foundObject(const word &name) const
Is the named Type in registry.
A surface zone on a MeshedSurface.
Reader for vtk unstructured_grid legacy files. Supports single CELLS, POINTS etc. entry only.
const objectRegistry & cellData() const
Cell based fields.
const faceList & faces() const
2D cells (=faces)
const pointField & points() const
Points.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
void writeHeader(std::ostream &, const bool isBinary, const std::string &title)
Write header.
errorManipArg< error, int > exit(error &err, const int errNo=1)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
word name(const bool)
Return a word representation of a bool.
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)