Go to the documentation of this file.
41 for (
direction i=0; i < pTraits<Type>::nComponents; ++i)
55 <<
" " << fieldName <<
nl;
62 <<
" " << fieldName <<
nl;
69 <<
" " << fieldName <<
"_x"
70 <<
" " << fieldName <<
"_y"
71 <<
" " << fieldName <<
"_z"
79 <<
" " << fieldName <<
"_ii" <<
nl;
86 os <<
"# xx xy xz yy yz zz";
87 for (
direction i=0; i < pTraits<symmTensor>::nComponents; ++i)
89 os <<
" " << fieldName <<
'_' << int(i);
98 os <<
"# xx xy xz yx yy yz zx zy zz";
99 for (
direction i=0; i < pTraits<tensor>::nComponents; ++i)
101 os <<
" " << fieldName <<
'_' << int(i);
114 const word& fieldName,
123 if (useTimeDir() && !
timeName().empty())
130 outputFile /= fieldName +
'_' + outputPath_.name();
131 outputFile.
ext(
"raw");
135 Info<<
"Writing field " << fieldName <<
" to " << outputFile <<
endl;
144 if (Pstream::master() || !parallel_)
146 const auto&
values = tfield();
159 IOstream::currentVersion,
165 os <<
"# " << fieldName;
166 if (this->isPointData())
168 os <<
" POINT_DATA ";
177 writeHeader<Type>(os, fieldName);
181 if (this->isPointData())
label ListType::const_reference val
Functions used by OpenFOAM that are specific to POSIX compliant operating systems and need to be repl...
void component(FieldField< Field, typename FieldField< Field, Type >::cmptType > &sf, const FieldField< Field, Type > &f, const direction d)
A class for handling words, derived from Foam::string.
A class for handling file names.
void writeHeader< sphericalTensor >(Ostream &os, const word &fieldName)
static std::string path(const std::string &str)
Return directory path name (part before last /)
A class for managing temporary objects.
List< T > values(const HashTable< T, Key, Hash > &tbl, const bool doSort=false)
List of values from HashTable, optionally sorted.
virtual const faceList & faces() const =0
The faces used for the surface.
const bool writeData(pdfDictionary.get< bool >("writeData"))
Abstract definition of a meshed surface defined by faces and points.
void writeHeader< vector >(Ostream &os, const word &fieldName)
Ostream & endl(Ostream &os)
Add newline and flush stream.
static void writeHeader(Ostream &os, const word &fieldName)
static void writePoint(Foam::Ostream &os, const Foam::point &p)
#define forAll(list, i)
Loop across all elements in list.
void writeHeader< tensor >(Ostream &os, const word &fieldName)
Generic templated field type.
messageStream Info
Information stream (uses stdout - output is on the master only)
void writeHeader< scalar >(Ostream &os, const word &fieldName)
Istream and Ostream manipulators taking arguments.
void writeHeader< label >(Ostream &os, const word &fieldName)
virtual const pointField & points() const =0
The points used for the surface.
static void writeData(Ostream &os, const Type &val)
word ext() const
Return file name extension (part after last .)
Output to file stream, using an OSstream.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
bool mkDir(const fileName &pathName, mode_t mode=0777)
Make a directory and return an error if it could not be created.
void writeHeader< symmTensor >(Ostream &os, const word &fieldName)
bool isDir(const fileName &name, const bool followLink=true)
Does the name exist as a DIRECTORY in the file system?