51 const auto& pfld =
field.boundaryField()[patchi];
104 open(file, parallel);
132 +
"' region='" + mesh_.
name()
146 const pointField& centres = mesh_.faceCentres();
149 numberOfPoints_ = centres.
size();
176 SubList<point>(centres, mesh_.nInternalFaces())
183 SubList<point>(centres, mesh_.boundaryMesh().range())
202 return enter_CellData(0, 0);
209 return enter_PointData(numberOfPoints_, 0);
226 label nFaces =
field.mesh().nFaces();
230 reduce(nFaces, sumOp<label>());
233 if (nFaces != numberOfPoints_)
236 <<
"Expecting " << numberOfPoints_
237 <<
" faces, but found " << nFaces
241 this->beginDataArray<vector>(
field.name(), nFaces);
245 const SubList<vector>
internal(
field, mesh_.nInternalFaces());
271 this->endDataArray();
const polyBoundaryMesh & pbm
void size(const label n)
Older name for setAddressableSize.
A class for handling file names.
virtual bool beginPointData(label nFields=0)
Begin PointData output section.
errorManipArg< error, int > exit(error &err, const int errNo=1)
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
Base class for VTK output writers that handle geometry and fields (eg, vtp, vtu data). These output formats are structured as DECLARED, FIELD_DATA, PIECE followed by any CELL_DATA or POINT_DATA.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
constexpr char nl
The newline '\n' character (0x0a)
Ostream & endl(Ostream &os)
Add newline and flush stream.
static List< Type > flattenBoundary(const GeometricField< Type, fvsPatchField, surfaceMesh > &field)
Generic GeometricField class.
virtual bool beginFile(std::string title="")
Write file header (non-collective)
const Time & time() const
Return the top-level database.
bool legacy() const noexcept
Commonly used query.
surfaceFieldWriter(const surfaceFieldWriter &)=delete
No copy construct.
#define forAll(list, i)
Loop across all elements in list.
Encapsulated combinations of output format options. This is primarily useful when defining the output...
void beginPoints(std::ostream &os, label nPoints)
Emit header for POINTS (with trailing newline).
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
const fileName & globalCaseName() const noexcept
Return global case name.
label timeIndex() const noexcept
Return the current time index.
void write(const surfaceVectorField &field)
Write field.
virtual bool writeGeometry()
Write cloud positions.
A polyBoundaryMesh is a polyPatch list with additional search methods and registered IO...
void writeList(vtk::formatter &fmt, const UList< uint8_t > &values)
Write a list of uint8_t values.
static word timeName(const scalar t, const int precision=precision_)
Return a time name for the given scalar time value formatted with the given precision.
Write surfaces fields (as PointData) in VTP format. Legacy VTK format is intentionally not supported...
word format(conversionProperties.get< word >("format"))
label nFaces() const noexcept
The number of boundary faces in the underlying mesh.
virtual bool beginFile(std::string title="")
Write file header (non-collective)
fileTag
Some common XML tags for vtk files.
const word & name() const
Return reference to name.
Mesh data needed to do the Finite Volume discretisation.
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...
void writeListParallel(vtk::formatter &fmt, const UList< Type > &values)
Write a list of values.
A patch is a list of labels that address the faces in the global face list.
void reduce(T &value, const BinaryOp &bop, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm)
Reduce inplace (cf. MPI Allreduce) using linear/tree communication schedule.
virtual bool beginCellData(label nFields=0)
Begin CellData output section for specified number of fields.
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())