21#ifndef ensight_writePointFields_H
22#define ensight_writePointFields_H
37 const ensightMesh& ensMesh,
38 const tmp<PointField<Type>>& 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 PointField<Type> FieldType;
77 for (
const word& fieldName : objects.sortedNames<FieldType>())
85 getField<FieldType>(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
List of IOobjects with searching and retrieving facilities.
wordList sortedNames() const
The sorted names of the IOobjects.
static autoPtr< Time > New()
Construct (dummy) Time - no functionObjects or libraries.
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 volume meshes for writing in ensight format. It manages cellZones,...
const polyMesh & mesh() const noexcept
Reference to the underlying polyMesh.
Mesh representing a set of points created from polyMesh.
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)
unsigned int count(const UList< bool > &bools, const bool val=true)
Count number of 'true' entries.
label writeAllPointFields(ensightCase &ensCase, const ensightMesh &ensMesh, const IOobjectList &objects)
messageStream Info
Information stream (stdout output on master, null elsewhere)
bool writePointField(ensightCase &ensCase, const ensightMesh &ensMesh, const tmp< PointField< Type > > &tfield)
label writePointFields(ensightCase &ensCase, const ensightMesh &ensMesh, const IOobjectList &objects)