35 const bool nearCellValue,
36 const fileName& fName,
42 nearCellValue_(nearCellValue),
47 const fvMesh& mesh = vMesh_.
mesh();
51 if (patchIDs_.size() == 1)
68 const polyPatch& pp = patches[patchIDs_[i]];
70 nPoints_ += pp.nPoints();
75 nFaceVerts += pp[facei].size() + 1;
79 os_ <<
"POINTS " << nPoints_ <<
" float" <<
std::endl;
81 DynamicList<floatScalar> ptField(3*nPoints_);
85 const polyPatch& pp = patches[patchIDs_[i]];
91 os_ <<
"POLYGONS " << nFaces_ <<
' ' << nFaceVerts <<
std::endl;
93 DynamicList<label> vertLabels(nFaceVerts);
99 const polyPatch& pp = patches[patchIDs_[i]];
103 const face& f = pp.localFaces()[facei];
105 vertLabels.append(f.size());
108 offset += pp.nPoints();
118 const fvMesh& mesh = vMesh_.
mesh();
120 DynamicList<floatScalar> fField(nFaces_);
122 os_ <<
"patchID 1 " << nFaces_ <<
" float" <<
std::endl;
126 label patchi = patchIDs_[i];
128 const polyPatch& pp = mesh.boundaryMesh()[
patchi];
130 if (!isA<emptyPolyPatch>(pp))
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
const fvMesh & mesh() const
Access either mesh or submesh.
#define forAll(list, i)
Loop across all elements in list.
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.
void writePatchIDs()
Write cellIDs.
void insert(const scalar, DynamicList< floatScalar > &)
Append scalar to given DynamicList.
void writeHeader(std::ostream &, const bool isBinary, const std::string &title)
Write header.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
void write(std::ostream &os, const bool binary, List< floatScalar > &fField)
Write floats ascii or binary.
List< label > labelList
A List of labels.
word name(const complex &)
Return a string representation of a complex.
patchWriter(const vtkMesh &, const bool binary, const bool nearCellValue, const fileName &, const labelList &patchIDs)
Construct from components.