68 <<
"Cannot write " << setName <<
" in " << typeName
69 <<
" format as it does not have a point axis"
73 if (!
isDir(outputDir))
79 const scalar timeValue = 0.0;
81 OFstream osCase(outputDir/setName +
".case");
84 outputDir/setName +
".000.mesh",
90 <<
"type: ensight gold" <<
nl
100 forAll(valueSetNames, fieldi)
102 #define WriteTypeCase(Type, nullArg) \
103 if (Type##ValueSets.set(fieldi)) \
106 << ensightPTraits<Type>::typeName << " per node:" \
107 << setw(10) << 1 << " " << valueSetNames[fieldi] \
108 << " " << setName.c_str() << ".***." \
109 << valueSetNames[fieldi] << nl; \
119 <<
"time set: 1" <<
nl
120 <<
"number of steps: 1" <<
nl
121 <<
"filename start number: 0" <<
nl
122 <<
"filename increment: 1" <<
nl
123 <<
"time values:" <<
nl
132 <<
"internalMesh" <<
nl
133 <<
"coordinates" <<
nl
149 osGeom <<
setw(12) << scalar(0) <<
nl;
172 <<
setw(10) << edges[edgei].second() + 1 <<
nl;
177 forAll(valueSetNames, fieldi)
183 + valueSetNames[fieldi],
187 #define WriteTypeValues(Type, nullArg) \
188 if (Type##ValueSets.set(fieldi)) \
191 << pTraits<Type>::typeName << nl \
193 << setw(10) << 1 << nl \
194 << "coordinates" << nl; \
197 direction cmpt = 0; \
198 cmpt < pTraits<Type>::nComponents; \
202 const scalarField fld \
204 Type##ValueSets[fieldi].component(cmpt) \
208 if (mag(fld[i]) >= scalar(floatScalarVSmall)) \
210 osField << setw(12) << fld[i] << nl; \
214 osField << setw(12) << scalar(0) << nl; \
220 #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.
Pre-declare SubField and related Field type.
void size(const label)
Override size to be inconsistent with allocated storage.
const fileName & name() const
Return the name of the stream.
T & first()
Return the first element of the list.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
static const direction nComponents
Number of components in this vector space.
Holds list of sampling positions.
bool hasPointAxis() const
Is the coordinate axis a point?
labelList vertices() const
Return a list of isolated vertices. These are the points that are.
labelPairList edges() const
Return a list of edges. These are adjacent pairs of points which.
label size() const
Return the size.
tmp< pointField > pointCoords() const
Get vector coordinate (axis is xyz)
Ensight output with specialised write() for strings, integers and floats. Correctly handles binary wr...
Specialised Ensight output with extra geometry file header.
virtual void write(const fileName &outputDir, const fileName &setName, const coordSet &set, const wordList &valueSetNames #define TypeValueSetsConstArg(Type, nullArg)) const
Write a coordSet and associated data.
virtual ~ensightSetWriter()
Destructor.
A class for handling file names.
word name() const
Return file name (part beyond last /)
Base class for writing coordinate sets with data.
A class for managing temporary objects.
A class for handling words, derived from string.
#define WriteTypeValues(Type, nullArg)
#define WriteTypeCase(Type, nullArg)
#define TypeValueSetsConstArg(Type, nullArg)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
errorManipArg< error, int > exit(error &err, const int errNo=1)
pointField vertices(const blockVertexList &bvl)
addToRunTimeSelectionTable(polyPatch, mergedCyclicPolyPatch, word)
bool mkDir(const fileName &, mode_t=0777)
Make a directory and return an error if it could not be created.
Omanip< int > setw(const int i)
dimensioned< scalar > mag(const dimensioned< Type > &)
defineTypeNameAndDebug(combustionModel, 0)
bool isDir(const fileName &, const bool followLink=true)
Does the name exist as a directory in the file system?
static const floatScalar floatScalarVSmall
FOR_ALL_FIELD_TYPES(makeFieldSourceTypedef)