Go to the documentation of this file.
32 template<
class CloudType>
40 const label procI = Pstream::myProcNo();
43 allProcData[procI] =
data;
44 Pstream::gatherList(allProcData);
46 ListListOps::combine<List<floatScalar> >
56 template<
class CloudType>
68 << title << ' ' << pTraits<Type>::nComponents <<
' '
74 template<
class CloudType>
97 if (Pstream::master())
100 mkDir(this->outputTimeDir());
104 const fileName fName = this->outputTimeDir()/(
type() +
".vtk");
105 this->setModelProperty(
"file", fName);
107 OFstream os(fName, binary_ ? IOstream::BINARY : IOstream::ASCII);
111 vtkTools::writeHeader(vtkOs, binary_, this->modelName().c_str());
114 <<
"POINTS " << nParcels <<
" float" <<
std::endl;
119 <<
"POINT_DATA " << nParcels <<
std::endl
120 <<
"FIELD attributes " << 4
123 writeFieldData<vector>(vtkOs, binary_,
U,
"U", nParcels);
124 writeFieldData<scalar>(vtkOs, binary_, d,
"d", nParcels);
125 writeFieldData<scalar>(vtkOs, binary_, age,
"age", nParcels);
126 writeFieldData<scalar>(vtkOs, binary_,
rho,
"rho", nParcels);
133 template<
class CloudType>
138 const word& modelName
142 binary_(
dict.lookupOrDefault<
bool>(
"binary",
true))
146 template<
class CloudType>
159 template<
class CloudType>
A class for handling words, derived from string.
A class for handling file names.
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
virtual ~CloudToVTK()
Destructor.
Ostream & endl(Ostream &os)
Add newline and flush stream.
CloudToVTK(const dictionary &dict, CloudType &owner, const word &modelName)
Construct from dictionary.
void writeData(std::ostream &vtkOs, const bool binary, const List< floatScalar > &data) const
Helper function to write VTK data.
void writeFieldData(std::ostream &vtkOs, const bool binary, const List< floatScalar > &data, const word &title, const label nParcels) const
Helper function to write VTK field data.
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Templated base class for dsmc cloud.
const bool writeData(readBool(pdfDictionary.lookup("writeData")))
A list of keyword definitions, which are a keyword followed by any number of values (e....
virtual ostream & stdStream()
Access to underlying std::ostream.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Templated cloud function object base class.
Write cloud data in VTK format.
const dimensionedScalar c
Speed of light in a vacuum.
fileName::Type type(const fileName &)
Return the file type: DIRECTORY or FILE.
bool mkDir(const fileName &, mode_t=0777)
Make a directory and return an error if it could not be created.
Database for solution data, solver performance and other reduced data.
timeIndices insert(timeIndex, timeDirs[timeI].value())
virtual void write()
Write post-processing info.