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)
118 std::ofstream
os(filename, std::ios::binary);
122 writeHeader(
format(), pointLst, faceLst.
size());
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);
The IOstreamOption is a simple container for options an IOstream can normally have.
A proxy for writing MeshedSurface, UnsortedMeshedSurface and surfMesh to various file formats.
const UList< surfZone > & surfZones() const
Const access to the surface zones.
const UList< Face > & surfFaces() const
Return const access to the faces.
bool useFaceMap() const
Can/should use faceMap?
const pointField & points() const
Return const access to the points.
const labelUList & faceMap() const
Const access to the faceMap, zero-sized when unused.
const List< Face > & surfFaces() const
Return const access to the faces.
const Field< point_type > & points() const noexcept
Return reference to global points.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
bool empty() const noexcept
True if the UList is empty (ie, size() is zero)
void size(const label n)
Older name for setAddressableSize.
A surface geometry mesh, in which the surface zone information is conveyed by the 'zoneId' associated...
virtual const labelList & zoneIds() const
Return const access to the zone ids.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
A class for handling file names.
virtual bool write()
Write the output fields.
A surface zone on a MeshedSurface.
Encapsulated combinations of output format options. This is primarily useful when defining the output...
autoPtr< formatter > newFormatter(std::ostream &os) const
Return new formatter based on the selected output options.
Base class for mesh zones.
OBJstream os(runTime.globalPath()/outputName)
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
word format(conversionProperties.get< word >("format"))
#define forAll(list, i)
Loop across all elements in list.
const dictionary formatOptions(propsDict.subOrEmptyDict("formatOptions", keyType::LITERAL))