43 const fvMesh& mesh = vMesh_.mesh();
44 const vtkTopo& topo = vMesh_.topo();
48 os_ <<
"DATASET UNSTRUCTURED_GRID" <<
std::endl;
57 const labelList& addPointCellLabels = topo.addPointCellLabels();
58 const label nTotPoints = mesh.nPoints() + addPointCellLabels.size();
60 os_ <<
"POINTS " << nTotPoints <<
" float" <<
std::endl;
62 DynamicList<floatScalar> ptField(3*nTotPoints);
67 forAll(addPointCellLabels, api)
83 forAll(vtkVertLabels, celli)
85 nFaceVerts += vtkVertLabels[celli].size() + 1;
88 os_ <<
"CELLS " << vtkVertLabels.size() <<
' ' << nFaceVerts <<
std::endl;
90 DynamicList<label> vertLabels(nFaceVerts);
92 forAll(vtkVertLabels, celli)
94 const labelList& vtkVerts = vtkVertLabels[celli];
96 vertLabels.
append(vtkVerts.size());
103 const labelList& vtkCellTypes = topo.cellTypes();
108 DynamicList<label> cellTypes(vtkCellTypes.size());
120 const fvMesh& mesh = vMesh_.
mesh();
121 const vtkTopo& topo = vMesh_.
topo();
122 const labelList& vtkCellTypes = topo.cellTypes();
123 const labelList& superCells = topo.superCells();
126 os_ <<
"cellID 1 " << vtkCellTypes.size() <<
" int" <<
std::endl;
136 forAll(mesh.cells(), celli)
140 forAll(superCells, superCelli)
142 label origCelli = cMap[superCells[superCelli]];
149 forAll(mesh.cells(), celli)
153 forAll(superCells, superCelli)
155 label origCelli = superCells[superCelli];
#define forAll(list, i)
Loop across all elements in list.
void append(const T &)
Append an element at the end of the list.
void size(const label)
Override size to be inconsistent with allocated storage.
const labelList & cellMap() const
Return cell map.
internalWriter(const vtkMesh &, const bool binary, const fileName &)
Construct from components.
void writeCellIDs()
Write cellIDs.
const fvMeshSubset & subsetter() const
const fvMesh & mesh() const
Access either mesh or submesh.
bool useSubMesh() const
Check if running subMesh.
const vtkTopo & topo() const
VTK topology.
void insert(const scalar, DynamicList< floatScalar > &)
Append scalar to given DynamicList.
void write(std::ostream &os, const bool binary, List< floatScalar > &fField)
Write floats ascii or binary.
void writeHeader(std::ostream &, const bool isBinary, const std::string &title)
Write header.
List< label > labelList
A List of labels.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Ostream & endl(Ostream &os)
Add newline and flush stream.
static const labelSphericalTensor labelI(1)
Identity labelTensor.
vectorField pointField
pointField is a vectorField.
List< labelList > labelListList
A List of labelList.