Go to the documentation of this file.
60 return this->getBaseName(
points, valueSetNames) +
".vtk";
73 os <<
"# vtk DataFile Version 2.0" <<
nl
76 <<
"DATASET POLYDATA" <<
nl
77 <<
"POINTS " <<
points.size() <<
" double" <<
nl;
81 os << float(pt.x()) <<
' '
82 <<
float(pt.y()) <<
' '
83 <<
float(pt.z()) <<
nl;
86 os <<
"POINT_DATA " <<
points.size() <<
nl
87 <<
" FIELD attributes " << valueSetNames.size() <<
nl;
89 forAll(valueSetNames, setI)
91 os << valueSetNames[setI] <<
' '
113 const bool writeTracks,
120 if (valueSets.size() != valueSetNames.size())
123 <<
"Number of variables:" << valueSetNames.size() <<
endl
124 <<
"Number of valueSets:" << valueSets.size()
128 label nTracks = tracks.size();
135 os <<
"# vtk DataFile Version 2.0" <<
nl
136 << tracks[0].name() <<
nl
138 <<
"DATASET POLYDATA" <<
nl
139 <<
"POINTS " <<
nPoints <<
" double" <<
nl;
145 os << float(pt.x()) <<
' '
146 <<
float(pt.y()) <<
' '
147 <<
float(pt.z()) <<
nl;
153 os <<
"LINES " << nTracks <<
' ' <<
nPoints+nTracks <<
nl;
161 const label len =
points.size();
164 for (label i = 0; i < len; ++i)
166 os <<
' ' << globalPtI;
174 <<
" FIELD attributes " << valueSetNames.size() <<
nl;
176 forAll(valueSetNames, setI)
178 os << valueSetNames[setI] <<
' '
A class for handling file names.
virtual void write(const coordSet &, const wordList &, const List< const Field< Type > * > &, Ostream &) const =0
General entry point for writing.
Ostream & endl(Ostream &os)
Add newline and flush stream.
#define forAll(list, i)
Loop across all elements in list.
Generic templated field type.
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
General entry point for writing.
Macros for easy insertion into run-time selection tables.
Base class for graphics format writing. Entry points are.
Holds list of sampling positions.
virtual ~vtkSetWriter()
Destructor.
errorManipArg< error, int > exit(error &err, const int errNo=1)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
vtkSetWriter()
Construct null.
Traits class for primitives.
virtual fileName getFileName(const coordSet &, const wordList &) const
Generate file name with correct extension.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...