37 const surfaceVectorField&
field
47 const auto& pfld =
field.boundaryField()[patchi];
49 if (!isA<emptyFvsPatchVectorField>(pfld))
51 SubList<vector>(flat, pp.size(), pp.offset()) = pfld;
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();
163 this->beginPoints(numberOfPoints_);
197 return enter_CellData(0, 0);
204 return enter_PointData(numberOfPoints_, 0);
210 if (isState(outputState::POINT_DATA))
228 if (
nFaces != numberOfPoints_)
231 <<
"Expecting " << numberOfPoints_
232 <<
" faces, but found " <<
nFaces
236 this->beginDataArray<vector>(
field.name(),
nFaces);
266 this->endDataArray();
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
A List obtained as a section of another List.
void size(const label n)
Older name for setAddressableSize.
A class for handling file names.
virtual bool write()
Write the output fields.
Mesh data needed to do the Finite Volume discretisation.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
label nBoundaryFaces() const noexcept
Number of boundary faces (== nFaces - nInternalFaces)
Base class for VTK output writers that handle geometry and fields (eg, vtp, vtu data)....
bool parallel() const noexcept
Parallel output requested?
vtk::outputOptions opts_
Requested output options.
virtual bool open(const fileName &file, bool parallel=Pstream::parRun())
Open file for writing (creates parent directory).
virtual bool beginFile(std::string title="")
Write file header (non-collective)
Encapsulated combinations of output format options. This is primarily useful when defining the output...
bool legacy() const noexcept
True if writer uses legacy file format.
bool append() const noexcept
True if output format uses an append mode.
Write surfaces fields (as PointData) in VTP format. Legacy VTK format is intentionally not supported.
virtual bool writeGeometry()
Write cloud positions.
virtual bool beginFile(std::string title="")
Write file header (non-collective)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const labelList nFaces(UPstream::listGatherValues< label >(aMesh.nFaces()))
@ NUMBER_OF_POINTS
"NumberOfPoints"
fileTag
Some common XML tags for vtk files.
void writeList(vtk::formatter &fmt, const UList< uint8_t > &values)
Write a list of uint8_t values.
void writeListParallel(vtk::formatter &fmt, const UList< Type > &values)
Write a list of values.
Ostream & endl(Ostream &os)
Add newline and flush stream.
void reduce(const List< UPstream::commsStruct > &comms, T &value, const BinaryOp &bop, const int tag, const label comm)
static constexpr const zero Zero
Global zero (0)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
errorManipArg< error, int > exit(error &err, const int errNo=1)
constexpr char nl
The newline '\n' character (0x0a)
word format(conversionProperties.get< word >("format"))
#define forAll(list, i)
Loop across all elements in list.