56 const bool writePointValues
60 #undef FieldTypeValuesConstArg
63 const fileName surfaceDir(outputDir/surfaceName);
65 if (!
isDir(surfaceDir))
72 Info<<
"Writing geometry to " << surfaceDir <<
endl;
88 stream(surfaceDir/
"points")() << points;
91 stream(surfaceDir/
"faces")() << faces;
98 faceCentres[facei] = faces[facei].centre(points);
100 stream(surfaceDir/
"faceCentres")() << faceCentres;
103 forAll(fieldNames, fieldi)
107 Info<<
"Writing field " << fieldNames[fieldi] <<
" to " 108 << surfaceDir <<
endl;
111 #define WriteFieldType(Type, nullArg) \ 112 if (field##Type##Values.set(fieldi)) \ 114 const fileName valuesDir \ 118 word(pTraits<Type>::typeName) \ 119 + word(Field<Type>::typeName) \ 123 if (!isDir(valuesDir)) \ 128 stream(valuesDir/fieldNames[fieldi])() \ 129 << field##Type##Values[fieldi]; \ 132 #undef WriteFieldType virtual ~foamSurfaceWriter()
Destructor.
#define forAll(list, i)
Loop across all elements in list.
A class for handling file names.
#define WriteFieldType(Type, nullArg)
void size(const label)
Override size to be inconsistent with allocated storage.
Ostream & endl(Ostream &os)
Add newline and flush stream.
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.
Macros for easy insertion into run-time selection tables.
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?
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
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.
static const versionNumber currentVersion
Current version number.
FOR_ALL_FIELD_TYPES(DefineFvWallInfoType)
#define FieldTypeValuesConstArg(Type, nullArg)