writer< Type > Class Template ReferenceBase class for graphics format writing. Entry points are
- write(..).
Write to an Ostream a table of points with corresponding values. - write(scalar/vector/sphericalTensor/symmTensor/tensor).
Write single scalar/vector/sphericalTensor/symmTensor/tensor. Default is to write space separated components.
More...
List of all members.
|
Public Member Functions |
| | TypeName ("writer") |
| | Runtime type information.
|
| | declareRunTimeSelectionTable (autoPtr, writer, word,(),()) |
| | writer () |
| | Construct null.
|
| virtual | ~writer ()=0 |
| | Destructor.
|
| virtual fileName | getFileName (const coordSet &, const wordList &) const =0 |
| | Generate file name with correct extension.
|
| virtual void | write (const coordSet &, const wordList &, const List< const Field< Type > * > &, Ostream &) const =0 |
| | General entry point for writing.
|
| virtual Ostream & | write (const scalar, Ostream &) const |
| | Write scalar as ascii.
|
| template<class VSType > |
| Ostream & | writeVS (const VSType &, Ostream &) const |
| virtual Ostream & | write (const vector &, Ostream &) const |
| | Write vector. Tab separated ascii.
|
| virtual Ostream & | write (const sphericalTensor &, Ostream &) const |
| | Write sphericalTensor. Tab separated ascii.
|
| virtual Ostream & | write (const symmTensor &, Ostream &) const |
| | Write symmTensor. Tab separated ascii.
|
| virtual Ostream & | write (const tensor &, Ostream &) const |
| | Write tensor. Tab separated ascii.
|
Static Public Member Functions |
| static autoPtr< writer > | New (const word &writeFormat) |
| | Return a reference to the selected writer.
|
Protected Member Functions |
| fileName | getBaseName (const coordSet &, const wordList &) const |
| | Generates filename from coordSet and sampled fields.
|
| void | writeCoord (const coordSet &, const label sampleI, Ostream &) const |
| void | writeTable (const coordSet &, const List< Type > &, Ostream &) const |
| | Writes single-column ascii write. Column 1 is coordSet coordinate,.
|
| void | writeTable (const coordSet &, const List< const List< Type > * > &, Ostream &os) const |
| | Writes multi-column ascii write. Column 1 is coordSet coordinate,.
|
Detailed Description
template<class Type>
class Foam::writer< Type >
Base class for graphics format writing. Entry points are
- write(..).
Write to an Ostream a table of points with corresponding values. - write(scalar/vector/sphericalTensor/symmTensor/tensor).
Write single scalar/vector/sphericalTensor/symmTensor/tensor. Default is to write space separated components.
Example:
// Construct writer of xmgr type
autoPtr<writer<scalar> > scalarFormatter(writer<scalar>::New("xmgr"));
// Output list of points and corresponding values
scalarFormatter().write
(
coordSet
(
points, // sample coordinates
"someLine", // name of coordSet
"distance", // write coordinates as distance to refPoint
points[0] // reference point
),
"U.component(0)", // name of values
vals // values
);
- Source files
-
Definition at line 80 of file writer.H.
Constructor & Destructor Documentation
Construct null.
Definition at line 135 of file writer.C.
| ~writer |
( |
|
) |
[inline, pure virtual] |
Member Function Documentation
Generates filename from coordSet and sampled fields.
Definition at line 55 of file writer.C.
| void writeCoord |
( |
const coordSet & |
points, |
|
|
const label |
sampleI, |
|
|
Ostream & |
os | |
|
) |
| | const [inline, protected] |
Writes single-column ascii write. Column 1 is coordSet coordinate,.
columns 2 is the value. Uses write() function to write coordinate in correct format.
Definition at line 92 of file writer.C.
| void writeTable |
( |
const coordSet & |
points, |
|
|
const List< const List< Type > * > & |
valuesPtrList, |
|
|
Ostream & |
os | |
|
) |
| | const [inline, protected] |
Writes multi-column ascii write. Column 1 is coordSet coordinate,.
columns 2..n are the values. Uses write() function to write coordinate in correct format.
Definition at line 111 of file writer.C.
| TypeName |
( |
"writer< Type >" |
|
) |
|
Runtime type information.
The documentation for this class was generated from the following files:
- src/sampling/sampledSet/writers/writer.H
- src/sampling/sampledSet/writers/writer.C
Copyright © 2000-2009 OpenCFD Ltd
|