39 typename wordConstructorTable::iterator cstrIter =
40 wordConstructorTablePtr_->find(writeType);
42 if (cstrIter == wordConstructorTablePtr_->end())
45 <<
"Unknown write type " 46 << writeType <<
nl <<
nl 47 <<
"Valid write types : " <<
endl 48 << wordConstructorTablePtr_->sortedToc()
69 fName +=
'_' + valueSets[i];
105 writeCoord(points, pointi, os);
107 write(values[pointi], os);
123 writeCoord(points, pointi, os);
130 write(values[pointi], os);
165 valueSetPtrs[i] = &valueSets[i];
167 write(points, valueSetNames, valueSetPtrs, os);
183 template<
class VSType>
190 for (
direction d=0; d<VSType::nComponents; d++)
197 os << value.component(d);
209 os << token::SPACE << token::TAB;
220 return writeVS(value, os);
231 return writeVS(value, os);
242 return writeVS(value, os);
253 return writeVS(value, os);
#define forAll(list, i)
Loop across all elements in list.
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 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.
setWriter()
Construct null.
errorManipArg< error, int > exit(error &err, const int errNo=1)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
void size(const label)
Override size to be inconsistent with allocated storage.
Ostream & endl(Ostream &os)
Add newline and flush stream.
bool hasVectorAxis() const
Is axis specification a vector.
virtual ~setWriter()=0
Destructor.
void writeCoord(const coordSet &, const label sampleI, Ostream &) const
virtual void writeSeparator(Ostream &os) const
Writes a separator. Used by write functions.
Templated 3D SphericalTensor derived from VectorSpace adding construction from 1 component, element access using th ii() member function and the inner-product (dot-product) and outer-product operators.
Functions used by OpenFOAM that are specific to POSIX compliant operating systems and need to be repl...
Holds list of sampling positions.
vector vectorCoord(const label index) const
Get point according to axis="xyz" specification.
Pre-declare SubField and related Field type.
A class for handling words, derived from string.
void write(std::ostream &os, const bool binary, List< floatScalar > &fField)
Write floats ascii or binary.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Ostream & writeVS(const VSType &, Ostream &) const
const word & name() const
static autoPtr< setWriter > New(const word &writeFormat)
Return a reference to the selected setWriter.
fileName getBaseName(const coordSet &, const wordList &) const
Generates filename from coordSet and sampled fields.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
void writeTable(const coordSet &, const List< Type > &, Ostream &) const
Writes single-column ascii write. Column 1 is coordSet coordinate,.
scalar scalarCoord(const label index) const
Get coordinate of point according to axis specification.