Go to the documentation of this file.
21 #ifndef ensight_writeAreaFields_H
22 #define ensight_writeAreaFields_H
36 const ensightFaMesh& ensMesh,
37 const tmp<GeometricField<Type, faPatchField, areaMesh>>& 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 GeometricField<Type, faPatchField, areaMesh> GeoField;
75 for (
const word& fieldName : objects.sortedNames<GeoField>())
83 getField<GeoField>(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
#define ensight_WRITE_FIELD(PrimitiveType)
autoPtr< ensightFile > newData(const word &varName, const bool isPointData=false) const
Open stream for new data file (on master), with current index.
Helper routines for reading a field or fields, for foamToEnsight.
A class for handling words, derived from Foam::string.
A class for managing temporary objects.
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.
bool writeAreaField(ensightCase &ensCase, const ensightFaMesh &ensMesh, const tmp< GeometricField< Type, faPatchField, areaMesh >> &tfield)
Encapsulation of area meshes for writing in ensight format.
label writeAreaFields(ensightCase &ensCase, const ensightFaMesh &ensMesh, const IOobjectList &objects)
messageStream Info
Information stream (stdout output on master, null elsewhere)
OBJstream os(runTime.globalPath()/outputName)
List of IOobjects with searching and retrieving facilities.
const faMesh & mesh() const noexcept
Reference to the underlying faMesh.
Supports writing of ensight cases as well as providing common factory methods to open new files.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
unsigned int count(const UList< bool > &bools, const bool val=true)
Count number of 'true' entries.
Finite area mesh. Used for 2-D non-Euclidian finite area method.
label writeAllAreaFields(ensightCase &ensCase, const ensightFaMesh &ensMesh, const IOobjectList &objects)
Generic GeometricField class.