Go to the documentation of this file.
59 this->getBaseName(
points, valueSetNames)
76 const fileName meshFile(base +
".mesh");
80 <<
"type: ensight gold" <<
nl
83 <<
"model: 1 " << meshFile.
name().c_str() <<
nl
87 forAll(valueSetNames, setI)
89 fileName dataFile(base +
".***." + valueSetNames[setI]);
91 os.
setf(ios_base::left);
92 os << ensightPTraits<Type>::typeName
94 <<
setw(15) << valueSetNames[setI]
95 <<
" " << dataFile.
name().c_str()
100 <<
"time set: 1" <<
nl
101 <<
"number of steps: 1" <<
nl
102 <<
"filename start number: 0" <<
nl
103 <<
"filename increment: 1" <<
nl
104 <<
"time values:" <<
nl
105 <<
"0.00000e+00" <<
nl;
114 os <<
"EnSight Geometry File" <<
nl
115 << desc.c_str() <<
nl
116 <<
"node id assign" <<
nl
117 <<
"element id assign" <<
nl
120 <<
"internalMesh" <<
nl
121 <<
"coordinates" <<
nl
128 const scalar comp =
points[pointI][cmpt];
131 os <<
setw(12) << comp <<
nl;
135 os <<
setw(12) << scalar(0) <<
nl;
143 os <<
setw(10) << pointI+1 <<
nl;
148 forAll(valueSetNames, setI)
150 fileName dataFile(base +
".000." + valueSetNames[setI]);
155 os << ensightPTraits<Type>::typeName <<
nl
158 <<
"coordinates" <<
nl;
160 for (
direction i=0; i < pTraits<Type>::nComponents; ++i)
173 os <<
setw(12) << scalar(0) <<
nl;
185 const bool writeTracks,
193 const fileName meshFile(base +
".mesh");
197 <<
"type: ensight gold" <<
nl
200 <<
"model: 1 " << meshFile.
name().c_str() <<
nl
204 forAll(valueSetNames, setI)
206 fileName dataFile(base +
".***." + valueSetNames[setI]);
208 os.
setf(ios_base::left);
209 os << ensightPTraits<Type>::typeName
211 <<
setw(15) << valueSetNames[setI]
212 <<
" " << dataFile.
name().c_str()
217 <<
"time set: 1" <<
nl
218 <<
"number of steps: 1" <<
nl
219 <<
"filename start number: 0" <<
nl
220 <<
"filename increment: 1" <<
nl
221 <<
"time values:" <<
nl
222 <<
"0.00000e+00" <<
nl;
230 os <<
"EnSight Geometry File" <<
nl
231 << desc.c_str() <<
nl
232 <<
"node id assign" <<
nl
233 <<
"element id assign" <<
nl;
240 <<
setw(10) << trackI+1 <<
nl
241 <<
"internalMesh" <<
nl
242 <<
"coordinates" <<
nl
249 const scalar comp =
points[pointI][cmpt];
252 os <<
setw(12) << comp <<
nl;
256 os <<
setw(12) << scalar(0) <<
nl;
267 os <<
setw(10) << i+1
277 forAll(valueSetNames, setI)
279 fileName dataFile(base +
".000." + valueSetNames[setI]);
284 os << ensightPTraits<Type>::typeName <<
nl;
290 <<
setw(10) << trackI+1 <<
nl
291 <<
"coordinates" <<
nl;
293 for (
direction i=0; i < pTraits<Type>::nComponents; ++i)
306 os <<
setw(12) << scalar(0) <<
nl;
void component(FieldField< Field, typename FieldField< Field, Type >::cmptType > &sf, const FieldField< Field, Type > &f, const direction d)
A class for handling file names.
#define forAll(list, i)
Loop across all elements in list.
static const floatScalar floatScalarVSMALL
@ nComponents
Number of components in this vector space.
virtual fileName getFileName(const coordSet &, const wordList &) const
Generate file name with correct extension.
fileName lessExt() const
Return file name without extension (part before last .)
A class for handling character strings derived from std::string.
dimensioned< scalar > mag(const dimensioned< Type > &)
word name() const
Return file name (part beyond last /)
ensightSetWriter()
Construct null.
Conversion of OpenFOAM pTraits into the Ensight equivalent.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Istream and Ostream manipulators taking arguments.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Macros for easy insertion into run-time selection tables.
gmvFile<< "tracers "<< particles.size()<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().x()<< ' ';}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().y()<< ' ';}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().z()<< ' ';}gmvFile<< nl;forAll(lagrangianScalarNames, i){ const word &name=lagrangianScalarNames[i];IOField< scalar > fld(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
Base class for graphics format writing. Entry points are.
Holds list of sampling positions.
Omanip< int > setw(const int i)
IOstream & scientific(IOstream &io)
ios_base::fmtflags setf(const ios_base::fmtflags f)
Set flags of stream.
virtual int precision() const
Get precision of output field.
virtual ~ensightSetWriter()
Destructor.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
virtual void write(const coordSet &, const wordList &, const List< const Field< Type > * > &, Ostream &) const
General entry point for writing.
const char *const FOAMversion
virtual const fileName & name() const
Return the name of the stream.