Go to the documentation of this file.
60 this->getBaseName(
points, valueSetNames)
77 const fileName meshFile(base +
".mesh");
81 <<
"type: ensight gold" <<
nl
84 <<
"model: 1 " << meshFile.name().c_str() <<
nl
88 forAll(valueSetNames, setI)
90 fileName dataFile(base +
".***." + valueSetNames[setI]);
92 os.
setf(ios_base::left);
93 os << ensightPTraits<Type>::typeName
95 <<
setw(15) << valueSetNames[setI]
96 <<
" " << dataFile.
name().c_str()
101 <<
"time set: 1" <<
nl
102 <<
"number of steps: 1" <<
nl
103 <<
"filename start number: 0" <<
nl
104 <<
"filename increment: 1" <<
nl
105 <<
"time values:" <<
nl
106 <<
"0.00000e+00" <<
nl;
110 string desc(
"Written by OpenFOAM");
115 os <<
"Ensight Geometry File" <<
nl
116 << desc.c_str() <<
nl
117 <<
"node id assign" <<
nl
118 <<
"element id assign" <<
nl
121 <<
"internalMesh" <<
nl
122 <<
"coordinates" <<
nl
129 const scalar comp =
points[pointi][cmpt];
132 os <<
setw(12) << comp <<
nl;
136 os <<
setw(12) << scalar(0) <<
nl;
144 os <<
setw(10) << pointi+1 <<
nl;
149 forAll(valueSetNames, setI)
151 fileName dataFile(base +
".000." + valueSetNames[setI]);
156 os << ensightPTraits<Type>::typeName <<
nl
159 <<
"coordinates" <<
nl;
161 for (
direction i=0; i < pTraits<Type>::nComponents; ++i)
174 os <<
setw(12) << scalar(0) <<
nl;
186 const bool writeTracks,
194 const fileName meshFile(base +
".mesh");
198 <<
"type: ensight gold" <<
nl
201 <<
"model: 1 " << meshFile.name().c_str() <<
nl
205 forAll(valueSetNames, setI)
207 fileName dataFile(base +
".***." + valueSetNames[setI]);
209 os.
setf(ios_base::left);
210 os << ensightPTraits<Type>::typeName
212 <<
setw(15) << valueSetNames[setI]
213 <<
" " << dataFile.
name().c_str()
218 <<
"time set: 1" <<
nl
219 <<
"number of steps: 1" <<
nl
220 <<
"filename start number: 0" <<
nl
221 <<
"filename increment: 1" <<
nl
222 <<
"time values:" <<
nl
223 <<
"0.00000e+00" <<
nl;
227 string desc(
"Written by OpenFOAM");
231 os <<
"Ensight Geometry File" <<
nl
232 << desc.c_str() <<
nl
233 <<
"node id assign" <<
nl
234 <<
"element id assign" <<
nl;
241 <<
setw(10) << trackI+1 <<
nl
242 <<
"internalMesh" <<
nl
243 <<
"coordinates" <<
nl
250 const scalar comp =
points[pointi][cmpt];
253 os <<
setw(12) << comp <<
nl;
257 os <<
setw(12) << scalar(0) <<
nl;
266 for (label i = 0; i <
points.size()-1; i++)
268 os <<
setw(10) << i+1
278 forAll(valueSetNames, setI)
280 fileName dataFile(base +
".000." + valueSetNames[setI]);
285 os << ensightPTraits<Type>::typeName <<
nl;
291 <<
setw(10) << trackI+1 <<
nl
292 <<
"coordinates" <<
nl;
294 for (
direction i=0; i < pTraits<Type>::nComponents; ++i)
307 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.
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.
constexpr floatScalar floatScalarVSMALL
ensightSetWriter()
Construct null.
Conversion of OpenFOAM pTraits into the Ensight equivalent.
Generic templated field type.
Istream and Ostream manipulators taking arguments.
virtual const fileName & name() const
Return the name of the stream.
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))
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.
virtual ~ensightSetWriter()
Destructor.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
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.