75 const fileName meshFile(base +
".mesh");
79 <<
"type: ensight gold" <<
nl 82 <<
"model: 1 " << meshFile.name().c_str() <<
nl 86 forAll(valueSetNames, setI)
88 fileName dataFile(base +
".***." + valueSetNames[setI]);
90 os.
setf(ios_base::left);
91 os << pTraits<Type>::typeName
93 <<
setw(15) << valueSetNames[setI]
94 <<
" " << dataFile.
name().c_str()
99 <<
"time set: 1" << nl
100 <<
"number of steps: 1" << nl
101 <<
"filename start number: 0" << nl
102 <<
"filename increment: 1" << nl
103 <<
"time values:" << nl
104 <<
"0.00000e+00" <<
nl;
113 os <<
"EnSight Geometry File" << nl
114 << desc.c_str() << nl
115 <<
"node id assign" << nl
116 <<
"element id assign" << nl
118 <<
setw(10) << 1 << nl
119 <<
"internalMesh" << nl
120 <<
"coordinates" << nl
127 const scalar comp = points[pointi][cmpt];
130 os <<
setw(12) << comp <<
nl;
134 os <<
setw(12) << scalar(0) <<
nl;
142 os <<
setw(10) << pointi+1 <<
nl;
147 forAll(valueSetNames, setI)
149 fileName dataFile(base +
".000." + valueSetNames[setI]);
154 os << pTraits<Type>::typeName << nl
156 <<
setw(10) << 1 << nl
157 <<
"coordinates" <<
nl;
158 for (
direction cmpt = 0; cmpt < pTraits<Type>::nComponents; cmpt++)
165 os <<
setw(12) << fld[i] <<
nl;
169 os <<
setw(12) << scalar(0) <<
nl;
181 const bool writeTracks,
189 const fileName meshFile(base +
".mesh");
193 <<
"type: ensight gold" <<
nl 196 <<
"model: 1 " << meshFile.name().c_str() <<
nl 200 forAll(valueSetNames, setI)
202 fileName dataFile(base +
".***." + valueSetNames[setI]);
204 os.
setf(ios_base::left);
205 os << pTraits<Type>::typeName
207 <<
setw(15) << valueSetNames[setI]
208 <<
" " << dataFile.
name().c_str()
213 <<
"time set: 1" << nl
214 <<
"number of steps: 1" << nl
215 <<
"filename start number: 0" << nl
216 <<
"filename increment: 1" << nl
217 <<
"time values:" << nl
218 <<
"0.00000e+00" <<
nl;
226 os <<
"EnSight Geometry File" << nl
227 << desc.c_str() << nl
228 <<
"node id assign" << nl
229 <<
"element id assign" <<
nl;
233 const coordSet& points = tracks[trackI];
236 <<
setw(10) << trackI+1 << nl
237 <<
"internalMesh" << nl
238 <<
"coordinates" << nl
245 const scalar comp = points[pointi][cmpt];
248 os <<
setw(12) << comp <<
nl;
252 os <<
setw(12) << scalar(0) <<
nl;
261 for (
label i = 0; i < points.
size()-1; i++)
263 os <<
setw(10) << i+1
273 forAll(valueSetNames, setI)
275 fileName dataFile(base +
".000." + valueSetNames[setI]);
280 os << pTraits<Type>::typeName <<
nl;
286 <<
setw(10) << trackI+1 << nl
287 <<
"coordinates" <<
nl;
292 cmpt < pTraits<Type>::nComponents;
301 os <<
setw(12) << fld[i] <<
nl;
305 os <<
setw(12) << scalar(0) <<
nl;
#define forAll(list, i)
Loop across all elements in list.
fileName getBaseName(const coordSet &, const wordList &) const
Generates filename from coordSet and sampled fields.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
A class for handling file names.
virtual int precision() const
Get precision of output field.
ios_base::fmtflags setf(const ios_base::fmtflags f)
Set flags of stream.
void size(const label)
Override size to be inconsistent with allocated storage.
Base class for graphics format writing. Entry points are.
static const floatScalar floatScalarVSmall
const char *const FOAMversion
Macros for easy insertion into run-time selection tables.
static const direction nComponents
Number of components in this vector space.
virtual fileName getFileName(const coordSet &, const wordList &) const
Generate file name with correct extension.
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))
Holds list of sampling positions.
Pre-declare SubField and related Field type.
virtual const fileName & name() const
Return the name of the stream.
word name() const
Return file name (part beyond last /)
ensightSetWriter()
Construct null.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Istream and Ostream manipulators taking arguments.
virtual ~ensightSetWriter()
Destructor.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
fileName lessExt() const
Return file name without extension (part before last .)
dimensioned< scalar > mag(const dimensioned< Type > &)
virtual void write(const coordSet &, const wordList &, const List< const Field< Type > *> &, Ostream &) const
General entry point for writing.
Omanip< int > setw(const int i)
A class for handling character strings derived from std::string.
void component(FieldField< Field, typename FieldField< Field, Type >::cmptType > &sf, const FieldField< Field, Type > &f, const direction d)
IOstream & scientific(IOstream &io)