A surfaceWriter for Ensight format. More...
Public Member Functions | |
TypeName ("ensight") | |
Runtime type information. More... | |
ensightSurfaceWriter () | |
Construct null. More... | |
ensightSurfaceWriter (const dictionary &options) | |
Construct with some output options. More... | |
virtual | ~ensightSurfaceWriter () |
Destructor. More... | |
virtual bool | separateGeometry () const |
True if the surface format supports geometry in a separate file. More... | |
virtual fileName | write (const fileName &outputDir, const fileName &surfaceName, const pointField &points, const faceList &faces, const bool verbose=false) const |
Write single surface geometry to file. More... | |
virtual fileName | write (const fileName &outputDir, const fileName &surfaceName, const pointField &points, const faceList &faces, const word &fieldName, const Field< scalar > &values, const bool isNodeValues, const bool verbose=false) const |
Write scalarField for a single surface to file. More... | |
virtual fileName | write (const fileName &outputDir, const fileName &surfaceName, const pointField &points, const faceList &faces, const word &fieldName, const Field< vector > &values, const bool isNodeValues, const bool verbose=false) const |
Write vectorField for a single surface to file. More... | |
virtual fileName | write (const fileName &outputDir, const fileName &surfaceName, const pointField &points, const faceList &faces, const word &fieldName, const Field< sphericalTensor > &values, const bool isNodeValues, const bool verbose=false) const |
Write sphericalTensorField for a single surface to file. More... | |
virtual fileName | write (const fileName &outputDir, const fileName &surfaceName, const pointField &points, const faceList &faces, const word &fieldName, const Field< symmTensor > &values, const bool isNodeValues, const bool verbose=false) const |
Write symmTensorField for a single surface to file. More... | |
virtual fileName | write (const fileName &outputDir, const fileName &surfaceName, const pointField &points, const faceList &faces, const word &fieldName, const Field< tensor > &values, const bool isNodeValues, const bool verbose=false) const |
Write tensorField for a single surface to file. More... | |
template<class Type > | |
Foam::fileName | writeUncollated (const fileName &outputDir, const fileName &surfaceName, const pointField &points, const faceList &faces, const word &fieldName, const Field< Type > &values, const bool isNodeValues, const bool verbose) const |
template<class Type > | |
Foam::fileName | writeCollated (const fileName &outputDir, const fileName &surfaceName, const pointField &points, const faceList &faces, const word &fieldName, const Field< Type > &values, const bool isNodeValues, const bool verbose) const |
template<class Type > | |
Foam::fileName | writeTemplate (const fileName &outputDir, const fileName &surfaceName, const pointField &points, const faceList &faces, const word &fieldName, const Field< Type > &values, const bool isNodeValues, const bool verbose) const |
![]() | |
TypeName ("surfaceWriter") | |
Runtime type information. More... | |
declareRunTimeSelectionTable (autoPtr, surfaceWriter, word,(),()) | |
declareRunTimeSelectionTable (autoPtr, surfaceWriter, wordDict,(const dictionary &optDict),(optDict)) | |
surfaceWriter () | |
Construct null. More... | |
virtual | ~surfaceWriter () |
Destructor. More... | |
Private Member Functions | |
template<class Type > | |
fileName | writeCollated (const fileName &outputDir, const fileName &surfaceName, const pointField &points, const faceList &faces, const word &fieldName, const Field< Type > &values, const bool isNodeValues, const bool verbose) const |
Templated write operation - one file per timestep. More... | |
template<class Type > | |
fileName | writeUncollated (const fileName &outputDir, const fileName &surfaceName, const pointField &points, const faceList &faces, const word &fieldName, const Field< Type > &values, const bool isNodeValues, const bool verbose) const |
Templated write operation - all time steps in single file. More... | |
template<class Type > | |
fileName | writeTemplate (const fileName &outputDir, const fileName &surfaceName, const pointField &points, const faceList &faces, const word &fieldName, const Field< Type > &values, const bool isNodeValues, const bool verbose) const |
Templated write operation. More... | |
Private Attributes | |
IOstream::streamFormat | writeFormat_ |
Write option (default is IOstream::ASCII. More... | |
bool | collateTimes_ |
Additional Inherited Members | |
![]() | |
static autoPtr< surfaceWriter > | New (const word &writeType) |
Return a reference to the selected surfaceWriter. More... | |
static autoPtr< surfaceWriter > | New (const word &writeType, const dictionary &writeOptions) |
Return a reference to the selected surfaceWriter. More... | |
A surfaceWriter for Ensight format.
Definition at line 48 of file ensightSurfaceWriter.H.
Construct null.
Definition at line 41 of file ensightSurfaceWriter.C.
ensightSurfaceWriter | ( | const dictionary & | options | ) |
Construct with some output options.
Definition at line 49 of file ensightSurfaceWriter.C.
References ensightSurfaceWriter::collateTimes_, IOstream::formatEnum(), dictionary::found(), dictionary::lookup(), dictionary::readIfPresent(), and ensightSurfaceWriter::writeFormat_.
|
virtual |
Destructor.
Definition at line 65 of file ensightSurfaceWriter.C.
|
private |
Templated write operation - one file per timestep.
|
private |
Templated write operation - all time steps in single file.
|
private |
Templated write operation.
TypeName | ( | "ensight" | ) |
Runtime type information.
|
inlinevirtual |
True if the surface format supports geometry in a separate file.
False if geometry and field must be in a single file
Reimplemented from surfaceWriter.
Definition at line 128 of file ensightSurfaceWriter.H.
|
virtual |
Write single surface geometry to file.
Reimplemented from surfaceWriter.
Definition at line 72 of file ensightSurfaceWriter.C.
References Foam::endl(), Foam::Info, Foam::isDir(), Foam::mkDir(), OFstream::name(), fileName::name(), Foam::nl, and points.
|
virtual |
Write scalarField for a single surface to file.
One value per face or vertex (isNodeValues = true)
Reimplemented from surfaceWriter.
|
virtual |
Write vectorField for a single surface to file.
One value per face or vertex (isNodeValues = true)
Reimplemented from surfaceWriter.
|
virtual |
Write sphericalTensorField for a single surface to file.
One value per face or vertex (isNodeValues = true)
Reimplemented from surfaceWriter.
|
virtual |
Write symmTensorField for a single surface to file.
One value per face or vertex (isNodeValues = true)
Reimplemented from surfaceWriter.
|
virtual |
Write tensorField for a single surface to file.
One value per face or vertex (isNodeValues = true)
Reimplemented from surfaceWriter.
Foam::fileName writeUncollated | ( | const fileName & | outputDir, |
const fileName & | surfaceName, | ||
const pointField & | points, | ||
const faceList & | faces, | ||
const word & | fieldName, | ||
const Field< Type > & | values, | ||
const bool | isNodeValues, | ||
const bool | verbose | ||
) | const |
Definition at line 39 of file ensightSurfaceWriterTemplates.C.
References Foam::endl(), Foam::Info, Foam::isDir(), Foam::mkDir(), OFstream::name(), fileName::name(), Foam::nl, points, Foam::setw(), and ensightFile::writeKeyword().
Foam::fileName writeCollated | ( | const fileName & | outputDir, |
const fileName & | surfaceName, | ||
const pointField & | points, | ||
const faceList & | faces, | ||
const word & | fieldName, | ||
const Field< Type > & | values, | ||
const bool | isNodeValues, | ||
const bool | verbose | ||
) | const |
Definition at line 110 of file ensightSurfaceWriterTemplates.C.
References dict, Foam::endl(), Foam::exists(), Foam::findLower(), forAll, forAllConstIter(), dictionary::found(), IOstream::good(), Foam::Info, Foam::isDir(), Foam::isFile(), lookup(), Foam::mkDir(), OFstream::name(), fileName::name(), Foam::nl, fileName::path(), points, readScalar, dictionary::set(), List::setSize(), Foam::setw(), OSstream::stdStream(), OStringStream::str(), timeIndex, ensightPart::writeField(), and ensightFile::writeKeyword().
Foam::fileName writeTemplate | ( | const fileName & | outputDir, |
const fileName & | surfaceName, | ||
const pointField & | points, | ||
const faceList & | faces, | ||
const word & | fieldName, | ||
const Field< Type > & | values, | ||
const bool | isNodeValues, | ||
const bool | verbose | ||
) | const |
Definition at line 297 of file ensightSurfaceWriterTemplates.C.
References points.
|
private |
Write option (default is IOstream::ASCII.
Definition at line 55 of file ensightSurfaceWriter.H.
Referenced by ensightSurfaceWriter::ensightSurfaceWriter().
|
private |
Definition at line 57 of file ensightSurfaceWriter.H.
Referenced by ensightSurfaceWriter::ensightSurfaceWriter().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.