Go to the documentation of this file.
57 return this->getBaseName(
points, valueSetNames) +
".vtk";
70 os <<
"# vtk DataFile Version 2.0" <<
nl
73 <<
"DATASET POLYDATA" <<
nl
74 <<
"POINTS " <<
points.size() <<
" float" <<
nl;
79 os << pt.
x() <<
' ' << pt.
y() <<
' ' << pt.
z() <<
nl;
83 os <<
"POINT_DATA " <<
points.size() <<
nl
84 <<
" FIELD attributes " << valueSetNames.
size() <<
nl;
86 forAll(valueSetNames, setI)
88 os << valueSetNames[setI] << ' ' << pTraits<Type>::nComponents <<
' '
109 const bool writeTracks,
116 if (valueSets.size() != valueSetNames.
size())
119 <<
"Number of variables:" << valueSetNames.
size() <<
endl
120 <<
"Number of valueSets:" << valueSets.size()
131 os <<
"# vtk DataFile Version 2.0" <<
nl
132 << tracks[0].name() <<
nl
134 <<
"DATASET POLYDATA" <<
nl
135 <<
"POINTS " <<
nPoints <<
" float" <<
nl;
143 os << pt.
x() <<
' ' << pt.
y() <<
' ' << pt.
z() <<
nl;
149 os <<
"LINES " << nTracks <<
' ' <<
nPoints+nTracks <<
nl;
160 os <<
' ' << globalPtI;
168 <<
" FIELD attributes " << valueSetNames.
size() <<
nl;
170 forAll(valueSetNames, setI)
172 os << valueSetNames[setI] << ' ' << pTraits<Type>::nComponents <<
' '
A class for handling file names.
#define forAll(list, i)
Loop across all elements in list.
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.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
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.
gmvFile<< "tracers "<< particles.size()<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().x()<< ' ';}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().y()<< ' ';}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().z()<< ' ';}gmvFile<< nl;forAll(lagrangianScalarNames, i){ const word &name=lagrangianScalarNames[i];IOField< scalar > fld(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
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.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
label size() const
Return the number of elements in the PtrList.
virtual fileName getFileName(const coordSet &, const wordList &) const
Generate file name with correct extension.
void size(const label)
Override size to be inconsistent with allocated storage.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...