Go to the documentation of this file.
62 this->getBaseName(
points, valueSetNames)
79 const fileName meshFile(base +
".mesh");
83 <<
"type: ensight gold" <<
nl
86 <<
"model: 1 " << meshFile.name().c_str() <<
nl
91 for (
const word& valueName : valueSetNames)
93 fileName dataFile(base +
".***." + valueName);
96 os << ensightPTraits<Type>::typeName
98 <<
setw(15) << valueName
99 <<
" " << dataFile.
name().c_str()
104 <<
"time set: 1" <<
nl
105 <<
"number of steps: 1" <<
nl
106 <<
"filename start number: 0" <<
nl
107 <<
"filename increment: 1" <<
nl
108 <<
"time values:" <<
nl
109 <<
"0.00000e+00" <<
nl;
113 string desc(
"Written by OpenFOAM");
118 os <<
"Ensight Geometry File" <<
nl
119 << desc.c_str() <<
nl
120 <<
"node id assign" <<
nl
121 <<
"element id assign" <<
nl
124 <<
"internalMesh" <<
nl
125 <<
"coordinates" <<
nl
145 forAll(valueSetNames, seti)
147 const word& valueName = valueSetNames[seti];
150 fileName dataFile(base +
".000." + valueName);
155 os << ensightPTraits<Type>::typeName <<
nl
158 <<
"coordinates" <<
nl;
160 for (
direction d=0; d < pTraits<Type>::nComponents; ++d)
164 for (
const Type& val :
fld)
177 const bool writeTracks,
186 const fileName meshFile(base +
".mesh");
190 <<
"type: ensight gold" <<
nl
193 <<
"model: 1 " << meshFile.name().c_str() <<
nl
198 for (
const word& valueName : valueSetNames)
200 fileName dataFile(base +
".***." + valueName);
203 os << ensightPTraits<Type>::typeName
205 <<
setw(15) << valueName
206 <<
" " << dataFile.
name().c_str()
211 <<
"time set: 1" <<
nl
212 <<
"number of steps: 1" <<
nl
213 <<
"filename start number: 0" <<
nl
214 <<
"filename increment: 1" <<
nl
215 <<
"time values:" <<
nl
216 <<
"0.00000e+00" <<
nl;
220 string desc(
"Written by OpenFOAM");
224 os <<
"Ensight Geometry File" <<
nl
225 << desc.c_str() <<
nl
226 <<
"node id assign" <<
nl
227 <<
"element id assign" <<
nl;
234 <<
setw(10) << tracki+1 <<
nl
235 <<
"internalMesh" <<
nl
236 <<
"coordinates" <<
nl
252 for (label i = 0; i <
points.size()-1; i++)
264 forAll(valueSetNames, seti)
266 const word& valueName = valueSetNames[seti];
269 fileName dataFile(base +
".000." + valueName);
274 os << ensightPTraits<Type>::typeName <<
nl;
281 <<
setw(10) << tracki+1 <<
nl
282 <<
"coordinates" <<
nl;
284 for (
direction d=0; d < pTraits<Type>::nComponents; ++d)
289 for (
const Type& val :
fld)
void component(FieldField< Field, typename FieldField< Field, Type >::cmptType > &sf, const FieldField< Field, Type > &f, const direction d)
A class for handling words, derived from Foam::string.
A class for handling file names.
virtual const fileName & name() const
Read/write access to the name of the stream.
Ensight names and component order for base types.
static std::string name(const std::string &str)
Return basename (part beyond last /), including its extension.
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 .)
#define forAll(list, i)
Loop across all elements in list.
ensightSetWriter()
Default construct.
Generic templated field type.
Istream and Ostream manipulators taking arguments.
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< ' ';}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< ' ';}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< ' ';}gmvFile<< nl;for(const word &name :lagrangianScalarNames){ IOField< scalar > fld(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
float narrowFloat(const double val)
Type narrowing from double to float.
OBJstream os(runTime.globalPath()/outputName)
Macros for easy insertion into run-time selection tables.
Base class for graphics format writing. Entry points are.
Holds list of sampling positions.
Omanip< int > setw(const int i)
IOstream & scientific(IOstream &io)
Output to file stream, using an OSstream.
ios_base::fmtflags setf(const ios_base::fmtflags f)
Set flags of stream.
virtual int precision() const
Get precision of output field.
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.
static constexpr direction nComponents
Number of components in this vector space.