Go to the documentation of this file.
26 #include "patchWriter.H"
27 #include "writeFuns.H"
35 const bool nearCellValue,
36 const fileName& fName,
42 nearCellValue_(nearCellValue),
48 const polyBoundaryMesh&
patches =
mesh.boundaryMesh();
51 if (patchIDs_.size() == 1)
68 const polyPatch& pp =
patches[patchIDs_[i]];
70 nPoints_ += pp.nPoints();
75 nFaceVerts += pp[faceI].size() + 1;
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];
130 if (!isA<emptyPolyPatch>(pp))
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
List< label > labelList
A List of labels.
#define forAll(list, i)
Loop across all elements in list.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
Ostream & endl(Ostream &os)
Add newline and flush stream.
static void writeHeader(std::ostream &, const bool isBinary, const std::string &title)
void writePatchIDs()
Write cellIDs.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
static void write(std::ostream &, const bool, DynamicList< floatScalar > &)
Write floats ascii or binary.
const fvMesh & mesh() const
Access either mesh or submesh.
static void insert(const point &, DynamicList< floatScalar > &dest)
Append point to given DynamicList.
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.