Go to the documentation of this file.
47 const auto& pfld =
field.boundaryField()[patchi];
49 if (!isA<emptyFvsPatchVectorField>(pfld))
51 SubList<vector>(flat, pp.size(), pp.offset()) = pfld;
61 Foam::vtk::surfaceFieldWriter::surfaceFieldWriter
76 Foam::vtk::surfaceFieldWriter::surfaceFieldWriter
89 Foam::vtk::surfaceFieldWriter::surfaceFieldWriter
126 "case='" + mesh_.time().globalCaseName()
127 +
"' region='" + mesh_.name()
128 +
"' time='" + mesh_.time().timeName()
129 +
"' index='" +
Foam::name(mesh_.time().timeIndex())
141 const pointField& centres = mesh_.faceCentres();
144 numberOfPoints_ = centres.size();
197 return enter_CellData(0, 0);
204 return enter_PointData(numberOfPoints_, 0);
221 label nFaces =
field.mesh().nFaces();
228 if (nFaces != numberOfPoints_)
231 <<
"Expecting " << numberOfPoints_
232 <<
" faces, but found " << nFaces
236 this->beginDataArray<vector>(
field.name(), nFaces);
266 this->endDataArray();
Encapsulated combinations of output format options. This is primarily useful when defining the output...
Base class for VTK output writers that handle geometry and fields (eg, vtp, vtu data)....
bool legacy() const
Commonly used query.
A class for handling file names.
static constexpr const zero Zero
Global zero (0)
A List obtained as a section of another List.
virtual bool beginCellData(label nFields=0)
Begin CellData output section for specified number of fields.
virtual bool beginFile(std::string title="")
Write file header (non-collective)
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
Ostream & endl(Ostream &os)
Add newline and flush stream.
virtual bool beginFile(std::string title="")
Write file header (non-collective)
void write(const surfaceVectorField &field)
Write field.
#define forAll(list, i)
Loop across all elements in list.
virtual bool beginPointData(label nFields=0)
Begin PointData output section.
word format(conversionProperties.get< word >("format"))
void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
virtual bool writeGeometry()
Write cloud positions.
label nBoundaryFaces() const noexcept
Number of boundary faces (== nFaces - nInternalFaces)
void writeList(vtk::formatter &fmt, const UList< uint8_t > &values)
Write a list of uint8_t values.
Write surfaces fields (as PointData) in VTP format. Legacy VTK format is intentionally not supported.
void beginPoints(std::ostream &os, label nPoints)
Emit header for POINTS (with trailing newline).
Mesh data needed to do the Finite Volume discretisation.
errorManipArg< error, int > exit(error &err, const int errNo=1)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
void writeListParallel(vtk::formatter &fmt, const UList< Type > &values)
Write a list of values.
GeometricField< vector, fvsPatchField, surfaceMesh > surfaceVectorField