59 const bool writePointValues
66 if (!
isDir(outputDir))
72 const scalar timeValue = 0.0;
74 OFstream osCase(outputDir/surfaceName +
".case");
77 outputDir/surfaceName +
".000.mesh",
88 <<
"type: ensight gold" <<
nl
100 #define WriteTypeCase(Type, nullArg) \
101 if (field##Type##Values.set(fieldi)) \
104 << ensightPTraits<Type>::typeName << " per " \
105 << word(writePointValues ? "node:" : "element:") \
106 << setw(10) << 1 << " " << fieldNames[fieldi] \
107 << " " << surfaceName.c_str() << ".***." \
108 << fieldNames[fieldi] << nl; \
118 <<
"time set: 1" <<
nl
119 <<
"number of steps: 1" <<
nl
120 <<
"filename start number: 0" <<
nl
121 <<
"filename increment: 1" <<
nl
122 <<
"time values:" <<
nl
131 #define WriteTypeValues(Type, nullArg) \
132 if (field##Type##Values.set(fieldi)) \
134 ensightFile osField \
136 outputDir/surfaceName \
138 + fieldNames[fieldi], \
141 osField.writeKeyword(ensightPTraits<Type>::typeName); \
145 field##Type##Values[fieldi], \
150 #undef WriteTypeValues
Istream and Ostream manipulators taking arguments.
Functions used by OpenFOAM that are specific to POSIX compliant operating systems and need to be repl...
#define forAll(list, i)
Loop across all elements in list.
Macros for easy insertion into run-time selection tables.
const fileName & name() const
Return the name of the stream.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Specialised Ensight output with extra geometry file header.
An implementation of ensightPart to hold volume mesh faces.
A surfaceWriter for Ensight format.
virtual ~ensightSurfaceWriter()
Destructor.
virtual void write(const fileName &outputDir, const fileName &surfaceName, const pointField &points, const faceList &faces, const wordList &fieldNames, const bool writePointValues #define FieldTypeValuesConstArg(Type, nullArg)) const=0
Inherit base class templated write.
A class for handling file names.
word name() const
Return file name (part beyond last /)
Base class for surface writers.
A class for handling words, derived from string.
#define WriteTypeValues(Type, nullArg)
#define WriteTypeCase(Type, nullArg)
#define FieldTypeValuesConstArg(Type, nullArg)
static List< word > fieldNames
addToRunTimeSelectionTable(polyPatch, mergedCyclicPolyPatch, word)
bool mkDir(const fileName &, mode_t=0777)
Make a directory and return an error if it could not be created.
Ostream & endl(Ostream &os)
Add newline and flush stream.
defineTypeNameAndDebug(combustionModel, 0)
bool isDir(const fileName &, const bool followLink=true)
Does the name exist as a directory in the file system?
FOR_ALL_FIELD_TYPES(makeFieldSourceTypedef)