Go to the documentation of this file.
61 return this->getBaseName(
points, valueSetNames) +
".vtk";
74 os <<
"# vtk DataFile Version 2.0" <<
nl
77 <<
"DATASET POLYDATA" <<
nl
78 <<
"POINTS " <<
points.size() <<
" double" <<
nl;
82 os << float(pt.x()) <<
' '
83 << float(pt.y()) <<
' '
84 << float(pt.z()) <<
nl;
88 <<
" FIELD attributes " << valueSetNames.size() <<
nl;
90 forAll(valueSetNames, setI)
92 os << valueSetNames[setI] <<
' '
93 << int(pTraits<Type>::nComponents) <<
' '
96 const Field<Type>&
fld = *valueSets[setI];
114 const bool writeTracks,
115 const List<scalarField>& times,
116 const PtrList<coordSet>& tracks,
118 const List<List<Field<Type>>>& valueSets,
122 if (valueSets.size() != valueSetNames.size())
125 <<
"Number of variables:" << valueSetNames.size() <<
endl
126 <<
"Number of valueSets:" << valueSets.size()
130 label nTracks = tracks.size();
137 os <<
"# vtk DataFile Version 2.0" <<
nl
138 << tracks[0].name() <<
nl
140 <<
"DATASET POLYDATA" <<
nl
141 <<
"POINTS " <<
nPoints <<
" double" <<
nl;
143 for (
const coordSet&
points : tracks)
147 os << float(pt.x()) <<
' '
148 << float(pt.y()) <<
' '
149 << float(pt.z()) <<
nl;
155 os <<
"LINES " << nTracks <<
' ' <<
nPoints+nTracks <<
nl;
161 const coordSet&
points = tracks[trackI];
163 const label len =
points.size();
166 for (label i = 0; i < len; ++i)
168 os <<
' ' << globalPtI;
176 <<
" FIELD attributes " << valueSetNames.size() <<
nl;
178 forAll(valueSetNames, setI)
180 os << valueSetNames[setI] <<
' '
181 << int(pTraits<Type>::nComponents) <<
' '
184 const List<Field<Type>>& fieldVals = valueSets[setI];
186 for (
const Field<Type>& vals : fieldVals)
A class for handling file names.
virtual void write(const coordSet &, const wordList &, const List< const Field< Type > * > &, Ostream &) const =0
Ostream & endl(Ostream &os)
List< word > wordList
A List of words.
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))
virtual void write(const coordSet &, const wordList &, const List< const Field< Type > * > &, Ostream &) const
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
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.
errorManipArg< error, int > exit(error &err, const int errNo=1)
#define FatalErrorInFunction
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
A traits class, which is primarily used for primitives.
virtual fileName getFileName(const coordSet &, const wordList &) const
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
vector point
Point is a vector.