Go to the documentation of this file.
37 const UList<Face>& faces
40 format.tag(vtk::fileTag::POLYS);
47 for (
const auto&
f : faces)
52 const uint64_t payLoad = vtk::sizeofData<label>(nVerts);
54 format.beginDataArray<
label>(vtk::dataArrayAttr::CONNECTIVITY);
57 for (
const auto&
f : faces)
71 const uint64_t payLoad = vtk::sizeofData<label>(faces.size());
73 format.beginDataArray<
label>(vtk::dataArrayAttr::OFFSETS);
77 for (
const auto&
f : faces)
88 format.endTag(vtk::fileTag::POLYS);
109 ? surfaceFormatsCore::oneZone(faceLst)
113 const bool useFaceMap = (surf.
useFaceMap() && zones.size() > 1);
117 std::ofstream os(filename, std::ios::binary);
125 format().tag(vtk::fileTag::POLYS);
132 for (
const auto&
f : faceLst)
137 const uint64_t payLoad = vtk::sizeofData<label>(nVerts);
139 format().beginDataArray<
label>(vtk::dataArrayAttr::CONNECTIVITY);
140 format().writeSize(payLoad);
147 const Face&
f = faceLst[
faceMap[faceIndex++]];
162 const uint64_t payLoad = vtk::sizeofData<label>(faceLst.
size());
164 format().beginDataArray<
label>(vtk::dataArrayAttr::OFFSETS);
165 format().writeSize(payLoad);
167 label off = 0, faceIndex = 0;
172 const Face&
f = faceLst[
faceMap[faceIndex++]];
184 format().endTag(vtk::fileTag::POLYS);
189 writePolys(
format(), faceLst);
193 if (zones.size() > 1)
195 writeCellData(
format(), zones);
212 std::ofstream os(filename, std::ios::binary);
221 writePolys(
format(), faceLst);
Encapsulated combinations of output format options. This is primarily useful when defining the output...
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
A class for handling file names.
bool useFaceMap() const
Use faceMap?
Base class for mesh zones.
autoPtr< formatter > newFormatter(std::ostream &os) const
Return new formatter based on the selected output options.
const pointField & points() const
Return const access to the points.
static void writeHeader(Ostream &os, const word &fieldName)
A proxy for writing MeshedSurface, UnsortedMeshedSurface and surfMesh to various file formats.
const labelUList & faceMap() const
Const access to the faceMap, zero-sized when unused.
#define forAll(list, i)
Loop across all elements in list.
virtual const labelList & zoneIds() const
Return const access to the zone ids.
word format(conversionProperties.get< word >("format"))
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
A surface geometry mesh, in which the surface zone information is conveyed by the 'zoneId' associated...
void writeList(vtk::formatter &fmt, const UList< uint8_t > &values)
Write a list of uint8_t values.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
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...
void size(const label n) noexcept
Override size to be inconsistent with allocated storage.
const UList< Face > & surfFaces() const
Return const access to the faces.
const UList< surfZone > & surfZones() const
Const access to the surface zones.