21#ifndef FoamToEnsight_writeVolFields_H
22#define FoamToEnsight_writeVolFields_H
38 const bool nearCellValue =
false
45 else if (nearCellValue)
59 const auto&
field = tfield();
86 const bool nearCellValue =
false
122 const bool nearCellValue =
false
126 const label total = objects.
size();
129 #undef doLocalWriteCode
130 #define doLocalWriteCode(Type) \
132 count += writeVolFields<Type> \
139 if (count >= total) break; \
148 #undef doLocalWriteCode
Helper routines for reading a field or fields, for foamToEnsight.
label size() const noexcept
The number of elements in table.
List of IOobjects with searching and retrieving facilities. Implemented as a HashTable,...
UPtrList< const IOobject > csorted() const
The sorted list of IOobjects with headerClassName == Type::typeName.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Supports writing of ensight cases as well as providing common factory methods to open new files.
autoPtr< ensightFile > newData(const word &varName, const bool isPointData=false) const
Open stream for new data file (on master), with current index.
bool nodeValues() const
Force use of values per node instead of per element.
Encapsulation of volume meshes for writing in ensight format. It manages cellZones,...
const polyMesh & mesh() const noexcept
Reference to the underlying polyMesh.
A class for managing temporary objects.
OBJstream os(runTime.globalPath()/outputName)
#define doLocalWriteCode(Type)
bool writeVolField(ensightOutput::floatBufferType &scratch, ensightFile &os, const GeometricField< Type, fvPatchField, volMesh > &vf, const ensightMesh &ensMesh)
Write volume field component-wise.
Type & refCast(U &obj)
A dynamic_cast (for references) to Type reference.
GeometricField< Type, fvPatchField, volMesh > VolumeField
A volume field for a given type.
label writeAllVolFields(ensightCase &ensCase, const ensightMesh &ensMesh, const IOobjectList &objects, const bool nearCellValue=false)
label writeVolFields(ensightCase &ensCase, const ensightMesh &ensMesh, const IOobjectList &objects, const bool nearCellValue=false)
messageStream Info
Information stream (stdout output on master, null elsewhere).
bool writeVolField(ensightCase &ensCase, const ensightMesh &ensMesh, const tmp< VolumeField< Type > > &tfield, const bool nearCellValue=false)
tmp< VolumeField< Type > > makeZeroGradientField(const tmp< VolumeInternalField< Type > > &tdf)
Convert an internal field to zero-gradient volume field.
SphericalTensor< scalar > sphericalTensor
SphericalTensor of scalars, i.e. SphericalTensor<scalar>.
tmp< GeoField > getField(const IOobject &io, const typename GeoField::Mesh &mesh)
Get the field or FatalError.
SymmTensor< scalar > symmTensor
SymmTensor of scalars, i.e. SymmTensor<scalar>.