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");
114 OFstream
os(meshFile);
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];
148 const Field<Type>&
fld = *(valueSets[seti]);
150 fileName dataFile(base +
".000." + valueName);
151 OFstream
os(dataFile);
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,
178 const List<scalarField>& times,
179 const PtrList<coordSet>& tracks,
181 const List<List<Field<Type>>>& valueSets,
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");
221 OFstream
os(meshFile);
224 os <<
"Ensight Geometry File" <<
nl
225 << desc.c_str() <<
nl
226 <<
"node id assign" <<
nl
227 <<
"element id assign" <<
nl;
231 const coordSet&
points = tracks[tracki];
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];
267 const List<Field<Type>>& fieldVals = valueSets[seti];
269 fileName dataFile(base +
".000." + valueName);
270 OFstream
os(dataFile);
274 os << ensightPTraits<Type>::typeName <<
nl;
278 const Field<Type>&
fld = fieldVals[tracki];
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)
static const direction componentOrder[]
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
Ensight names and component order for base types.
static std::string name(const std::string &str)
virtual fileName getFileName(const coordSet &, const wordList &) const
List< word > wordList
A List of words.
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)
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)
virtual int precision() const
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,...
vector point
Point is a vector.
virtual void write(const coordSet &, const wordList &, const List< const Field< Type > * > &, Ostream &) const
static constexpr direction nComponents