34void Foam::fileFormats::VTPsurfaceFormat<Face>::writePolys
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)
118 std::ofstream
os(filename, std::ios::binary);
133 for (
const auto&
f : faceLst)
141 format().writeSize(payLoad);
148 const Face&
f = faceLst[
faceMap[faceIndex++]];
166 format().writeSize(payLoad);
168 label off = 0, faceIndex = 0;
173 const Face&
f = faceLst[
faceMap[faceIndex++]];
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);
const dictionary formatOptions(propsDict.subOrEmptyDict("formatOptions", keyType::LITERAL))
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 noexcept
Const access to the surface zones.
const UList< Face > & surfFaces() const noexcept
Return const access to the faces.
const labelUList & faceMap() const noexcept
Const access to the faceMap, zero-sized when unused.
const pointField & points() const noexcept
Return const access to the points.
bool useFaceMap() const noexcept
Can/should use faceMap?
const List< Face > & surfFaces() const
Return const access to the faces.
friend class UnsortedMeshedSurface
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...
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.
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)
uint64_t sizeofData(label count)
Commonly used calculation for header and payload sizes.
@ CONNECTIVITY
"connectivity"
void writeList(vtk::formatter &fmt, const UList< uint8_t > &values)
Write a list of uint8_t values.
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
List< surfZone > surfZoneList
List of surfZone.
static void writeHeader(Ostream &os, const word &fieldName)
word format(conversionProperties.get< word >("format"))
#define forAll(list, i)
Loop across all elements in list.