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);
110 ? surfaceFormatsCore::oneZone(faceLst)
114 const bool useFaceMap = (surf.
useFaceMap() && zones.size() > 1);
118 std::ofstream os(filename, std::ios::binary);
126 format().tag(vtk::fileTag::POLYS);
133 for (
const auto&
f : faceLst)
138 const uint64_t payLoad = vtk::sizeofData<label>(nVerts);
140 format().beginDataArray<label>(vtk::dataArrayAttr::CONNECTIVITY);
141 format().writeSize(payLoad);
148 const Face&
f = faceLst[
faceMap[faceIndex++]];
163 const uint64_t payLoad = vtk::sizeofData<label>(faceLst.
size());
165 format().beginDataArray<label>(vtk::dataArrayAttr::OFFSETS);
166 format().writeSize(payLoad);
168 label off = 0, faceIndex = 0;
173 const Face&
f = faceLst[
faceMap[faceIndex++]];
185 format().endTag(vtk::fileTag::POLYS);
190 writePolys(
format(), faceLst);
194 if (zones.size() > 1)
196 writeCellData(
format(), zones);
214 std::ofstream os(filename, std::ios::binary);
223 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
Can/should 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"))
A surface geometry mesh, in which the surface zone information is conveyed by the 'zoneId' associated...
The IOstreamOption is a simple container for options an IOstream can normally have.
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.