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();
166 const uint64_t payLoad =
167 vtk::sizeofData<float,3>(numberOfPoints_);
172 format().writeSize(payLoad);
215 return enter_CellData(0, 0);
222 return enter_PointData(numberOfPoints_, 0);
235 <<
"Bad writer state (" << stateNames[state_]
241 label nFaces =
field.mesh().nFaces();
248 if (nFaces != numberOfPoints_)
251 <<
"Expecting " << numberOfPoints_
252 <<
" faces, but found " << nFaces
259 const uint64_t payLoad =
260 vtk::sizeofData<float, 3>(nFaces);
263 format().writeSize(payLoad);
Encapsulated combinations of output format options. This is primarily useful when defining the output...
void writeListParallel(vtk::formatter &fmt, const UList< uint8_t > &values)
Write a list of uint8_t values.
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)
word name(const complex &c)
Return string representation of complex.
virtual bool writeGeometry()
Write cloud positions.
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.
label nBoundaryFaces() const
Number of boundary faces (== nFaces - nInternalFaces)
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...
GeometricField< vector, fvsPatchField, surfaceMesh > surfaceVectorField