21#ifndef ensight_writeDimFields_H
22#define ensight_writeDimFields_H
35 const ensightMesh& ensMesh,
36 const tmp<VolumeInternalField<Type>>& tdf
44 auto tfield = makeZeroGradientField<Type>(tdf);
48 return writeVolField<Type>
62 const ensightMesh& ensMesh,
63 const IOobjectList& objects
66 typedef VolumeInternalField<Type> FieldType;
68 const fvMesh&
mesh = dynamicCast<const fvMesh>(ensMesh.mesh());
72 for (
const word& fieldName : objects.sortedNames<FieldType>())
80 getField<FieldType>(objects.findObject(fieldName),
mesh)
84 Info<<
' ' << fieldName;
96 const ensightMesh& ensMesh,
97 const IOobjectList& objects
100 #undef ensight_WRITE_FIELD
101 #define ensight_WRITE_FIELD(PrimitiveType) \
102 writeDimFields<PrimitiveType> \
116 #undef ensight_WRITE_FIELD
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
List of IOobjects with searching and retrieving facilities.
const IOobject * findObject(const word &objName) const
Return const pointer to the object found by name.
wordList sortedNames() const
The sorted names of the IOobjects.
Supports writing of ensight cases as well as providing common factory methods to open new files.
Encapsulation of volume meshes for writing in ensight format. It manages cellZones,...
const polyMesh & mesh() const noexcept
Reference to the underlying polyMesh.
Mesh data needed to do the Finite Volume discretisation.
A class for managing temporary objects.
A class for handling words, derived from Foam::string.
#define ensight_WRITE_FIELD(PrimitiveType)
Read volume fields from disk and write with vtk::internalWriter and vtk::patchWriter.
unsigned int count(const UList< bool > &bools, const bool val=true)
Count number of 'true' entries.
label writeAllDimFields(ensightCase &ensCase, const ensightMesh &ensMesh, const IOobjectList &objects)
messageStream Info
Information stream (stdout output on master, null elsewhere)
label writeDimFields(ensightCase &ensCase, const ensightMesh &ensMesh, const IOobjectList &objects)
bool writeDimField(ensightCase &ensCase, const ensightMesh &ensMesh, const tmp< VolumeInternalField< Type > > &tdf)