59 const bool writePointValues
63 #undef FieldTypeValuesConstArg
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 93 <<
"model: 1 " << osGeom.
name().
name() << 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
129 forAll(fieldNames, fieldi)
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
#define forAll(list, i)
Loop across all elements in list.
A class for handling file names.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Specialised Ensight output with extra geometry file header.
const fileName & name() const
Return the name of the stream.
Macros for easy insertion into run-time selection tables.
virtual ~ensightSurfaceWriter()
Destructor.
Functions used by OpenFOAM that are specific to POSIX compliant operating systems and need to be repl...
bool isDir(const fileName &, const bool followLink=true)
Does the name exist as a directory in the file system?
#define FieldTypeValuesConstArg(Type, nullArg)
word name() const
Return file name (part beyond last /)
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
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
Write fields for a single surface to file.
Istream and Ostream manipulators taking arguments.
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
defineTypeNameAndDebug(combustionModel, 0)
bool mkDir(const fileName &, mode_t=0777)
Make a directory and return an error if it could not be created.
An implementation of ensightPart to hold volume mesh faces.
FOR_ALL_FIELD_TYPES(DefineFvWallInfoType)
#define WriteTypeCase(Type, nullArg)
#define WriteTypeValues(Type, nullArg)