Go to the documentation of this file.
21 #ifndef ensight_writePointFields_H
22 #define ensight_writePointFields_H
37 const ensightMesh& ensMesh,
38 const tmp<GeometricField<Type, pointPatchField, pointMesh>>& tfield
46 const auto&
field = tfield();
49 autoPtr<ensightFile>
os = ensCase.newData<Type>(
field.name(),
true);
51 bool wrote = ensightOutput::writePointField<Type>
67 const ensightMesh& ensMesh,
68 const IOobjectList& objects
71 typedef GeometricField<Type, pointPatchField, pointMesh> GeoField;
77 for (
const word& fieldName : objects.sortedNames<GeoField>())
85 getField<GeoField>(ptMesh, objects, fieldName)
89 Info<<
' ' << fieldName;
100 ensightCase& ensCase,
101 const ensightMesh& ensMesh,
102 const IOobjectList& objects
105 #undef ensight_WRITE_FIELD
106 #define ensight_WRITE_FIELD(PrimitiveType) \
107 writePointFields<PrimitiveType> \
121 #undef ensight_WRITE_FIELD
autoPtr< ensightFile > newData(const word &varName, const bool isPointData=false) const
Open stream for new data file (on master), with current index.
Encapsulation of volume meshes for writing in ensight format. It manages cellZones,...
label writePointFields(ensightCase &ensCase, const ensightMesh &ensMesh, const IOobjectList &objects)
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.
static const pointMesh & New(const polyMesh &mesh, Args &&... args)
Get existing or create a new MeshObject.
wordList sortedNames() const
The sorted names of the IOobjects.
const polyMesh & mesh() const noexcept
Reference to the underlying polyMesh.
#define ensight_WRITE_FIELD(PrimitiveType)
messageStream Info
Information stream (stdout output on master, null elsewhere)
bool writePointField(ensightCase &ensCase, const ensightMesh &ensMesh, const tmp< GeometricField< Type, pointPatchField, pointMesh >> &tfield)
OBJstream os(runTime.globalPath()/outputName)
Mesh representing a set of points created from polyMesh.
List of IOobjects with searching and retrieving facilities.
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.
Generic GeometricField class.
label writeAllPointFields(ensightCase &ensCase, const ensightMesh &ensMesh, const IOobjectList &objects)