21#ifndef ensight_writeAreaFields_H
22#define ensight_writeAreaFields_H
36 const ensightFaMesh& ensMesh,
37 const tmp<AreaField<Type>>& tfield
44 const auto&
field = tfield();
46 autoPtr<ensightFile>
os =
47 ensCase.newData<Type>(
field.name());
49 bool wrote = ensightOutput::writeAreaField<Type>
65 const ensightFaMesh& ensMesh,
66 const IOobjectList& objects
69 typedef AreaField<Type> FieldType;
75 for (
const word& fieldName : objects.sortedNames<FieldType>())
83 getField<FieldType>(objects.findObject(fieldName),
mesh)
87 Info<<
' ' << fieldName;
99 const ensightFaMesh& ensMesh,
100 const IOobjectList& objects
103 #undef ensight_WRITE_FIELD
104 #define ensight_WRITE_FIELD(PrimitiveType) \
105 writeAreaFields<PrimitiveType> \
119 #undef ensight_WRITE_FIELD
Generic GeometricField class.
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.
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.
Encapsulation of area meshes for writing in ensight format.
const faMesh & mesh() const noexcept
Reference to the underlying faMesh.
Finite area mesh (used for 2-D non-Euclidian finite area method) defined using a patch of faces on a ...
A class for managing temporary objects.
A class for handling words, derived from Foam::string.
OBJstream os(runTime.globalPath()/outputName)
#define ensight_WRITE_FIELD(PrimitiveType)
messageStream Info
Information stream (stdout output on master, null elsewhere)
label writeAreaFields(ensightCase &ensCase, const ensightFaMesh &ensMesh, const IOobjectList &objects)
bool writeAreaField(ensightCase &ensCase, const ensightFaMesh &ensMesh, const tmp< AreaField< Type > > &tfield)
label writeAllAreaFields(ensightCase &ensCase, const ensightFaMesh &ensMesh, const IOobjectList &objects)