Base class for surface writers. More...
#include <surfaceWriter.H>


Public Member Functions | |
| TypeName ("surfaceWriter") | |
| Runtime type information. | |
| declareRunTimeSelectionTable (autoPtr, surfaceWriter, word,(),()) | |
| declareRunTimeSelectionTable (autoPtr, surfaceWriter, wordDict,(const dictionary &writeOpts),(writeOpts)) | |
| surfaceWriter () | |
| Default construct. | |
| surfaceWriter (const dictionary &options) | |
| Default construct with specified options. | |
| virtual | ~surfaceWriter () |
| Destructor. Calls close(). | |
| virtual bool | enabled () const |
| The writer is enabled. If the writer is not enabled, it may be possible for the caller to skip various preparatory operations. | |
| virtual bool | separateGeometry () const |
| True if the surface format requires geometry in a separate file. | |
| virtual bool | usesFaceIds () const |
| True if the writer format uses faceIds as part of its output. | |
| virtual bool | needsUpdate () const |
| Does the writer need an update (eg, lagging behind surface changes). | |
| virtual bool | wroteData () const |
| Geometry or fields written since the last open? | |
| virtual bool | expire () |
| Mark that surface changed and the writer will need an update, and set nFields = 0. | |
| virtual void | clear () |
| Close any open output, remove association with a surface and expire the writer. The parallel flag remains untouched. | |
| virtual void | setSurface (const meshedSurf &surf, bool parallel) |
| Change association with a surface, expire the writer with defined parallel/serial treatment. | |
| virtual void | setSurface (const pointField &points, const faceList &faces, bool parallel) |
| Change association with a surface, expire the writer with defined parallel/serial treatment. | |
| virtual void | setSurface (const meshedSurf &surf) |
| Change association with a surface, expire the writer with the current parallel/serial treatment. | |
| virtual void | setSurface (const pointField &points, const faceList &faces) |
| Change association with a surface, expire the writer with the current parallel/serial treatment. | |
| bool | is_open () const noexcept |
| Test if outputPath has been set. | |
| bool | hasSurface () const |
| Writer is associated with a surface. | |
| bool | empty () const |
| The surface to write is empty if the global number of faces is zero. | |
| label | size () const |
| The global number of faces for the associated surface. | |
| label | nFields () const noexcept |
| The number of expected output fields. | |
| label | nFields (const label n) noexcept |
| Set the number of expected output fields. | |
| bool | isPointData () const noexcept |
| Are the field data to be treated as point data? | |
| bool | isPointData (const bool on) noexcept |
| Set handling of field data to face/point data. | |
| bool | useTimeDir () const noexcept |
| Should a time directory be spliced into the output path? | |
| bool | useTimeDir (const bool on) noexcept |
| Enable/disable use of spliced output path. | |
| bool | verbose () const noexcept |
| Get output verbosity. | |
| bool | verbose (const bool on) noexcept |
| Enable/disable verbose output. | |
| scalar | mergeDim () const noexcept |
| The current value of the point merge dimension (metre). | |
| scalar | mergeDim (const scalar dist) noexcept |
| Change the point merge dimension (metre). | |
| scalar | scale () const noexcept |
| The current value of the geometry scaling. | |
| scalar | scale (const scalar factor) noexcept |
| Change the geometry scaling. | |
| const coordSystem::cartesian & | transform () const noexcept |
| The current (cartesian) coordinate system transformation. | |
| bool | hasTime () const |
| True if there is a known time. | |
| const word & | timeName () const |
| The current time value/name. | |
| scalar | timeValue () const |
| The current time value/name. | |
| void | setTime (const instant &inst) |
| Set the current time. | |
| void | setTime (scalar timeValue) |
| Set current time from timeValue, auto generating the name. | |
| void | setTime (scalar timeValue, const word &timeName) |
| Set current time from timeValue and timeName. | |
| void | unsetTime () |
| Clear the current time. | |
| virtual void | beginTime (const Time &t) |
| Begin a time-step. | |
| virtual void | beginTime (const instant &inst) |
| Begin a time-step. | |
| virtual void | endTime () |
| End a time-step. | |
| virtual void | open (const fileName &outputPath) |
| Open for output on specified path, using existing surface. | |
| virtual void | open (const pointField &points, const faceList &faces, const fileName &outputPath, bool parallel) |
| Open from components. | |
| virtual void | open (const meshedSurf &surf, const fileName &outputPath, bool parallel) |
| Open from components. | |
| virtual void | open (const pointField &points, const faceList &faces, const fileName &outputPath) |
| Open from components, with the current parallel/serial treatment. | |
| virtual void | open (const meshedSurf &surf, const fileName &outputPath) |
| Open from components, with the current parallel/serial treatment. | |
| virtual void | close () |
| Finish output, performing any necessary cleanup. | |
| virtual fileName | write ()=0 |
| Write separate surface geometry to file. | |
| virtual fileName | write (const word &fieldName, const Field< label > &values)=0 |
| Write field of label (per face or vertex). | |
| virtual fileName | write (const word &fieldName, const Field< scalar > &values)=0 |
| Write field of scalar (per face or vertex). | |
| virtual fileName | write (const word &fieldName, const Field< vector > &values)=0 |
| Write field of vector (per face or vertex). | |
| virtual fileName | write (const word &fieldName, const Field< sphericalTensor > &values)=0 |
| Write field of sphericalTensor (per face or vertex). | |
| virtual fileName | write (const word &fieldName, const Field< symmTensor > &values)=0 |
| Write field of symmTensor (per face or vertex). | |
| virtual fileName | write (const word &fieldName, const Field< tensor > &values)=0 |
| Write field of tensor (per face or vertex). | |
| virtual InfoProxy< surfaceWriter > | info () const noexcept |
| Return info proxy, used to print information to a stream. | |
| template<class Type> | |
| Foam::tmp< Foam::Field< Type > > | mergeFieldTemplate (const Field< Type > &fld) const |
| template<class Type> | |
| Foam::tmp< Foam::Field< Type > > | adjustFieldTemplate (const word &fieldName, const tmp< Field< Type > > &tfield) const |
Static Public Member Functions | |
| static dictionary | formatOptions (const dictionary &dict, const word &formatName, const word &entryName="formatOptions") |
| Same as fileFormats::getFormatOptions. | |
| static dictionary | formatOptions (const dictionary &dict, const dictionary &surfDict, const word &formatName, const word &entryName="formatOptions") |
| Same as fileFormats::getFormatOptions. | |
| static bool | supportedType (const word &writeType) |
| True if New is likely to succeed for this writeType. | |
| static autoPtr< surfaceWriter > | TryNew (const word &writeType) |
| Optional select construct surfaceWriter. | |
| static autoPtr< surfaceWriter > | TryNew (const word &writeType, const dictionary &writeOptions) |
| Optional select construct surfaceWriter with extra write options. | |
| static autoPtr< surfaceWriter > | New (const word &writeType) |
| Select construct a surfaceWriter. | |
| static autoPtr< surfaceWriter > | New (const word &writeType, const dictionary &writeOptions) |
| Select construct a surfaceWriter with extra write options. | |
Static Public Attributes | |
| static scalar | defaultMergeDim = 1e-8 |
| The default merge dimension (1e-8). | |
Protected Member Functions | |
| void | checkOpen () const |
| Verify that the outputPath_ has been set or FatalError. | |
| virtual bool | merge () const |
| Merge surfaces if they are not already upToDate (parallel) or simply mark the surface as being up-to-date. | |
| const meshedSurf & | surface () const |
| Merge surfaces (if not upToDate) and return merged (parallel) or regular surface (non-parallel). | |
| const meshedSurfRef & | adjustSurface () const |
| Merge surfaces (if not upToDate) and return merged (parallel) or regular surface (non-parallel) and apply any coordinate system changes and/or output scaling. | |
| template<class Type> | |
| tmp< Field< Type > > | mergeFieldTemplate (const Field< Type > &fld) const |
| Gather (merge) fields with renumbering and shrinking for point data. | |
| template<class Type> | |
| tmp< Field< Type > > | adjustFieldTemplate (const word &fieldName, const tmp< Field< Type > > &tfield) const |
| Apply refLevel and fieldScaling. | |
| tmp< Field< label > > | mergeField (const Field< label > &fld) const |
| tmp< Field< label > > | adjustField (const word &fieldName, const tmp< Field< label > > &tfield) const |
| tmp< Field< scalar > > | mergeField (const Field< scalar > &fld) const |
| tmp< Field< scalar > > | adjustField (const word &fieldName, const tmp< Field< scalar > > &tfield) const |
| tmp< Field< vector > > | mergeField (const Field< vector > &fld) const |
| tmp< Field< vector > > | adjustField (const word &fieldName, const tmp< Field< vector > > &tfield) const |
| tmp< Field< sphericalTensor > > | mergeField (const Field< sphericalTensor > &fld) const |
| tmp< Field< sphericalTensor > > | adjustField (const word &fieldName, const tmp< Field< sphericalTensor > > &tfield) const |
| tmp< Field< symmTensor > > | mergeField (const Field< symmTensor > &fld) const |
| tmp< Field< symmTensor > > | adjustField (const word &fieldName, const tmp< Field< symmTensor > > &tfield) const |
| tmp< Field< tensor > > | mergeField (const Field< tensor > &fld) const |
| tmp< Field< tensor > > | adjustField (const word &fieldName, const tmp< Field< tensor > > &tfield) const |
| template<class Type> | |
| fileName | writeTemplate (const word &fieldName, const Field< Type > &localValues) |
| Dummy templated write operation. | |
Protected Attributes | |
| meshedSurfRef | surf_ |
| Reference to surface or surface components. | |
| mergedSurf | mergedSurf_ |
| Surface after merging (parallel). | |
| meshedSurfRef | adjustedSurf_ |
| The surface after point coordinate transforms and scaling. | |
| scalar | mergeDim_ |
| Dimension for merging. | |
| scalar | geometryScale_ |
| Output geometry scaling after rotate/translate. | |
| point | geometryCentre_ |
| The centre of rotation (untranslate, translate). | |
| coordSystem::cartesian | geometryTransform_ |
| Local coordinate system transformation. | |
| bool | upToDate_ |
| The topology/surface is up-to-date? | |
| bool | wroteGeom_ |
| Track if geometry has been written since the last open. | |
| bool | parallel_ |
| Writing in parallel (via master). | |
| bool | useTimeDir_ |
| Insert additional time sub-directory in the output path. | |
| bool | isPointData_ |
| Is point vs cell data. | |
| bool | verbose_ |
| Additional output verbosity. | |
| UPstream::commsTypes | commType_ |
| Communication type (for field merging). | |
| bool | gatherv_ |
| Prefer MPI gatherv intrinsic (for field merging) [experimental]. | |
| label | nFields_ |
| The number of fields. | |
| instant | currTime_ |
| The current time value/name. | |
| fileName | outputPath_ |
| The full output directory and file (surface) name. | |
| dictionary | fieldLevel_ |
| Field level to remove (on output). | |
| dictionary | fieldScale_ |
| Field scaling (on output). | |
Friends | |
| Ostream & | operator<< (Ostream &os, const InfoProxy< surfaceWriter > &iproxy) |
| Output info proxy. | |
Base class for surface writers.
The surfaceWriter interface is rather large since we need a writer that can either be initially defined without a surface association and have that added at a later stage, or be defined with a surface association.
formatOptions
{
default
{
verbose true;
commsType scheduled;
fieldLevel
{
"p.*" 1e5; // Absolute -> gauge [Pa]
T 273.15; // [K] -> [C]
U #eval{ 10/sqrt(3) }; // Uniform magU=10
}
}
someFormat // Eg, ensight, vtk, etc
{
fieldScale
{
"p.*" 0.01; // [Pa] -> [mbar]
}
scale 1000; // [m] -> [mm]
transform
{
origin (0 0 0);
rotationCentre (0 0 0);
rotation axisAngle;
axis (1 0 0);
angle 45;
}
}
}
Format options:
| Property | Description | Reqd | Default |
|---|---|---|---|
verbose | Additional output verbosity | no | no |
commsType | Communication type | no | scheduled |
gatherv | Use MPI gatherv [experimental] | no | false |
scale | Output geometry scaling | no | 1 |
transform | Output coordinate transform | no | |
fieldLevel | Subtract field level before scaling | no | empty dict |
fieldScale | Output field scaling | no | empty dict |
transform sub-dictionary also supports a rotationCentre keyword which applies untranslate by that amount prior to the rotation, and subsequently followed by a translate.For surface formats that require geometry in a separate file, it is the responsibility of the implementation (not the caller) to ensure that this occurs.
Using MPI gatherv [experimental] is not well tested and may change or be removed in the future!
Definition at line 181 of file surfaceWriter.H.
| surfaceWriter | ( | ) |
Default construct.
Definition at line 181 of file surfaceWriter.C.
References adjustedSurf_, close(), commType_, currTime_, defaultMergeDim, fieldLevel_, fieldScale_, gatherv_, geometryCentre_, geometryScale_, geometryTransform_, isPointData_, mergeDim_, mergedSurf_, nFields_, outputPath_, parallel_, surf_, upToDate_, useTimeDir_, verbose_, wroteGeom_, and Foam::Zero.
Referenced by abaqusWriter::abaqusWriter(), abaqusWriter::abaqusWriter(), boundaryDataWriter::boundaryDataWriter(), boundaryDataWriter::boundaryDataWriter(), debugWriter::debugWriter(), debugWriter::debugWriter(), declareRunTimeSelectionTable(), declareRunTimeSelectionTable(), ensightWriter::ensightWriter(), ensightWriter::ensightWriter(), foamWriter::foamWriter(), foamWriter::foamWriter(), nastranWriter::nastranWriter(), nastranWriter::nastranWriter(), nullWriter::nullWriter(), proxyWriter::proxyWriter(), proxyWriter::proxyWriter(), rawWriter::rawWriter(), rawWriter::rawWriter(), starcdWriter::starcdWriter(), starcdWriter::starcdWriter(), surfaceWriter(), vtkWriter::vtkWriter(), vtkWriter::vtkWriter(), vtkWriter::vtkWriter(), x3dWriter::x3dWriter(), and x3dWriter::x3dWriter().


|
explicit |
Default construct with specified options.
Definition at line 208 of file surfaceWriter.C.
References UPstream::commsTypeNames, commType_, Foam::endl(), fieldLevel_, fieldScale_, dictionary::findDict(), gatherv_, geometryCentre_, geometryScale_, geometryTransform_, Foam::Info, isPointData(), IOobjectOption::LAZY_READ, keyType::LITERAL, UPstream::parRun(), dictionary::readIfPresent(), dictionary::subOrEmptyDict(), surfaceWriter(), verbose_, and Foam::Zero.

|
virtual |
Destructor. Calls close().
Definition at line 262 of file surfaceWriter.C.
References close().

|
protected |
Verify that the outputPath_ has been set or FatalError.
Definition at line 482 of file surfaceWriter.C.
References Foam::exit(), Foam::FatalError, FatalErrorInFunction, is_open(), Foam::nl, and Foam::type().
Referenced by boundaryDataWriter::write(), debugWriter::write(), foamWriter::write(), nastranWriter::write(), proxyWriter::write(), rawWriter::write(), starcdWriter::write(), vtkWriter::write(), x3dWriter::write(), rawWriter::writeTemplate(), boundaryDataWriter::writeTemplate(), debugWriter::writeTemplate(), foamWriter::writeTemplate(), starcdWriter::writeTemplate(), and x3dWriter::writeTemplate().


|
protectedvirtual |
Merge surfaces if they are not already upToDate (parallel) or simply mark the surface as being up-to-date.
Definition at line 493 of file surfaceWriter.C.
References adjustedSurf_, mergeDim_, mergedSurf_, parallel_, UPstream::parRun(), surf_, upToDate_, and wroteGeom_.
Referenced by debugWriter::mergeField(), mergeFieldTemplate(), surface(), and vtkWriter::write().


|
protected |
Merge surfaces (if not upToDate) and return merged (parallel) or regular surface (non-parallel).
Definition at line 522 of file surfaceWriter.C.
References merge(), mergedSurf_, parallel_, UPstream::parRun(), and surf_.
Referenced by adjustSurface(), debugWriter::write(), and debugWriter::writeTemplate().


|
protected |
Merge surfaces (if not upToDate) and return merged (parallel) or regular surface (non-parallel) and apply any coordinate system changes and/or output scaling.
Definition at line 535 of file surfaceWriter.C.
References adjustedSurf_, geometryCentre_, geometryScale_, geometryTransform_, Foam::magSqr(), tmp< T >::ref(), surface(), and upToDate_.
Referenced by boundaryDataWriter::write(), foamWriter::write(), nastranWriter::write(), proxyWriter::write(), rawWriter::write(), starcdWriter::write(), vtkWriter::write(), x3dWriter::write(), rawWriter::writeTemplate(), boundaryDataWriter::writeTemplate(), starcdWriter::writeTemplate(), and x3dWriter::writeTemplate().


|
protected |
Gather (merge) fields with renumbering and shrinking for point data.
References fld().

|
protected |
Apply refLevel and fieldScaling.
Referenced by debugWriter::mergeField(), rawWriter::writeTemplate(), boundaryDataWriter::writeTemplate(), foamWriter::writeTemplate(), starcdWriter::writeTemplate(), and x3dWriter::writeTemplate().

|
protected |
Referenced by rawWriter::writeTemplate(), boundaryDataWriter::writeTemplate(), foamWriter::writeTemplate(), starcdWriter::writeTemplate(), and x3dWriter::writeTemplate().

|
protected |
|
protected |
Definition at line 797 of file surfaceWriter.C.
|
protected |
Definition at line 797 of file surfaceWriter.C.
|
protected |
Definition at line 798 of file surfaceWriter.C.
|
protected |
Definition at line 798 of file surfaceWriter.C.
|
protected |
Definition at line 799 of file surfaceWriter.C.
|
protected |
Definition at line 799 of file surfaceWriter.C.
|
protected |
Definition at line 800 of file surfaceWriter.C.
|
protected |
Definition at line 800 of file surfaceWriter.C.
|
inlineprotected |
Dummy templated write operation.
| fieldName | Name of field |
| localValues | Local field values to write |
Definition at line 359 of file surfaceWriter.H.
References fileName::null, write(), and wroteGeom_.

| TypeName | ( | "surfaceWriter" | ) |
Runtime type information.
| declareRunTimeSelectionTable | ( | autoPtr | , |
| surfaceWriter | , | ||
| word | , | ||
| () | , | ||
| () | ) |
| declareRunTimeSelectionTable | ( | autoPtr | , |
| surfaceWriter | , | ||
| wordDict | , | ||
| (const dictionary &writeOpts) | , | ||
| (writeOpts) | ) |
|
static |
Same as fileFormats::getFormatOptions.
Definition at line 56 of file surfaceWriter.C.
References dict, and Foam::fileFormats::getFormatOptions().
Referenced by Curle::read(), surfaceNoise::read(), propellerInfo::setSampleDiskSurface(), FacePostProcessing< CloudType >::write(), and ParticleCollector< CloudType >::write().


|
static |
Same as fileFormats::getFormatOptions.
Definition at line 67 of file surfaceWriter.C.
References dict, and Foam::fileFormats::getFormatOptions().

|
static |
True if New is likely to succeed for this writeType.
Definition at line 45 of file surfaceWriter.C.
References MeshedSurfaceProxy< Face >::canWriteType().

|
static |
Optional select construct surfaceWriter.
Return nullptr if the specified type is not supported.
Definition at line 80 of file surfaceWriter.C.
References proxyWriter::TryNew().
Referenced by New(), and New().


|
static |
Optional select construct surfaceWriter with extra write options.
Return nullptr if the specified type is not supported.
Definition at line 98 of file surfaceWriter.C.
References proxyWriter::TryNew().

|
static |
Select construct a surfaceWriter.
Definition at line 130 of file surfaceWriter.C.
References Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::flatOutput(), Foam::nl, TryNew(), writer(), and MeshedSurfaceProxy< Face >::writeTypes().
Referenced by averageNeighbourFvGeometryScheme::movePoints(), Curle::read(), surfaceNoise::read(), propellerInfo::setSampleDiskSurface(), FacePostProcessing< CloudType >::write(), and ParticleCollector< CloudType >::write().


|
static |
Select construct a surfaceWriter with extra write options.
Definition at line 153 of file surfaceWriter.C.
References Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::flatOutput(), Foam::nl, TryNew(), writer(), and MeshedSurfaceProxy< Face >::writeTypes().

|
inlinevirtual |
The writer is enabled. If the writer is not enabled, it may be possible for the caller to skip various preparatory operations.
This method is primarily useful for the null writer
Reimplemented in nullWriter.
Definition at line 503 of file surfaceWriter.H.
|
inlinevirtual |
True if the surface format requires geometry in a separate file.
Reimplemented in ensightWriter, foamWriter, proxyWriter, and starcdWriter.
Definition at line 511 of file surfaceWriter.H.
|
inlinevirtual |
True if the writer format uses faceIds as part of its output.
Element ids are used by various CAE formats (abaqus, nastran, starcd, ...)
Reimplemented in abaqusWriter, nastranWriter, and starcdWriter.
Definition at line 522 of file surfaceWriter.H.
|
virtual |
Does the writer need an update (eg, lagging behind surface changes).
Reimplemented in nullWriter.
Definition at line 432 of file surfaceWriter.C.
References upToDate_.
Referenced by vtkWriter::write().

|
virtual |
Geometry or fields written since the last open?
Reimplemented in nullWriter.
Definition at line 438 of file surfaceWriter.C.
References wroteGeom_.
|
virtual |
Mark that surface changed and the writer will need an update, and set nFields = 0.
May also free up unneeded data. Return false if it was previously already expired.
Definition at line 444 of file surfaceWriter.C.
References adjustedSurf_, mergedSurf_, upToDate_, and wroteGeom_.
Referenced by clear(), setSurface(), and setSurface().

|
virtual |
Close any open output, remove association with a surface and expire the writer. The parallel flag remains untouched.
Definition at line 380 of file surfaceWriter.C.
References close(), expire(), and surf_.

|
virtual |
Change association with a surface, expire the writer with defined parallel/serial treatment.
Reimplemented in nullWriter.
Definition at line 388 of file surfaceWriter.C.
References expire(), parallel_, UPstream::parRun(), and surf_.
Referenced by open(), open(), open(), open(), setSurface(), and setSurface().


|
virtual |
Change association with a surface, expire the writer with defined parallel/serial treatment.
Reimplemented in nullWriter.
Definition at line 400 of file surfaceWriter.C.
References expire(), parallel_, UPstream::parRun(), points, and surf_.

|
virtual |
Change association with a surface, expire the writer with the current parallel/serial treatment.
Definition at line 413 of file surfaceWriter.C.
References parallel_, and setSurface().

|
virtual |
Change association with a surface, expire the writer with the current parallel/serial treatment.
Definition at line 422 of file surfaceWriter.C.
References parallel_, points, and setSurface().

|
inlinenoexcept |
Test if outputPath has been set.
Definition at line 23 of file surfaceWriterI.H.
References Foam::noexcept, and outputPath_.
Referenced by checkOpen().

| bool hasSurface | ( | ) | const |
Writer is associated with a surface.
Definition at line 460 of file surfaceWriter.C.
References surf_.
| bool empty | ( | ) | const |
The surface to write is empty if the global number of faces is zero.
Definition at line 466 of file surfaceWriter.C.
References parallel_, Foam::returnReduceAnd(), and surf_.
Referenced by foamWriter::write(), nastranWriter::write(), proxyWriter::write(), rawWriter::write(), starcdWriter::write(), vtkWriter::write(), x3dWriter::write(), rawWriter::writeTemplate(), foamWriter::writeTemplate(), starcdWriter::writeTemplate(), and x3dWriter::writeTemplate().


| Foam::label size | ( | ) | const |
The global number of faces for the associated surface.
Definition at line 474 of file surfaceWriter.C.
References parallel_, Foam::returnReduce(), and surf_.

|
inlinenoexcept |
The number of expected output fields.
Currently only used by the legacy VTK format.
Definition at line 29 of file surfaceWriterI.H.
References nFields_, and Foam::noexcept.
|
inlinenoexcept |
Set the number of expected output fields.
Currently only used by the legacy VTK format.
Definition at line 35 of file surfaceWriterI.H.
|
inlinenoexcept |
Are the field data to be treated as point data?
Definition at line 43 of file surfaceWriterI.H.
References isPointData_, and Foam::noexcept.
Referenced by debugWriter::debugWriter(), mergeFieldTemplate(), surfaceWriter(), boundaryDataWriter::write(), debugWriter::write(), rawWriter::write(), vtkWriter::write(), rawWriter::writeTemplate(), boundaryDataWriter::writeTemplate(), debugWriter::writeTemplate(), and x3dWriter::writeTemplate().

|
inlinenoexcept |
Set handling of field data to face/point data.
Definition at line 49 of file surfaceWriterI.H.
References isPointData_.
|
inlinenoexcept |
Should a time directory be spliced into the output path?
Definition at line 57 of file surfaceWriterI.H.
References Foam::noexcept, and useTimeDir_.
Referenced by foamWriter::write(), nastranWriter::write(), proxyWriter::write(), rawWriter::write(), starcdWriter::write(), vtkWriter::write(), x3dWriter::write(), rawWriter::writeTemplate(), foamWriter::writeTemplate(), starcdWriter::writeTemplate(), and x3dWriter::writeTemplate().

|
inlinenoexcept |
Enable/disable use of spliced output path.
Definition at line 63 of file surfaceWriterI.H.
References useTimeDir_.
|
inlinenoexcept |
Get output verbosity.
Definition at line 71 of file surfaceWriterI.H.
References Foam::noexcept, and verbose_.
|
inlinenoexcept |
Enable/disable verbose output.
Definition at line 77 of file surfaceWriterI.H.
References verbose_.
|
inlinenoexcept |
The current value of the point merge dimension (metre).
Definition at line 85 of file surfaceWriterI.H.
References mergeDim_, and Foam::noexcept.
|
inlinenoexcept |
Change the point merge dimension (metre).
Definition at line 91 of file surfaceWriterI.H.
References mergeDim_.
|
inlinenoexcept |
The current value of the geometry scaling.
Definition at line 99 of file surfaceWriterI.H.
References geometryScale_, and Foam::noexcept.
|
inlinenoexcept |
Change the geometry scaling.
Definition at line 105 of file surfaceWriterI.H.
References geometryScale_.
|
inlinenoexcept |
The current (cartesian) coordinate system transformation.
Definition at line 115 of file surfaceWriterI.H.
References geometryTransform_, and Foam::noexcept.
|
inline |
True if there is a known time.
Definition at line 121 of file surfaceWriterI.H.
References currTime_.
Referenced by vtkWriter::write().

|
inline |
The current time value/name.
Definition at line 127 of file surfaceWriterI.H.
References currTime_.
Referenced by setTime(), and rawWriter::writeTemplate().

|
inline |
The current time value/name.
Definition at line 133 of file surfaceWriterI.H.
References currTime_.
Referenced by setTime(), and setTime().

| void setTime | ( | const instant & | inst | ) |
| void setTime | ( | scalar | timeValue | ) |
Set current time from timeValue, auto generating the name.
Definition at line 276 of file surfaceWriter.C.
References currTime_, and timeValue().

| void setTime | ( | scalar | timeValue, |
| const word & | timeName ) |
Set current time from timeValue and timeName.
Definition at line 282 of file surfaceWriter.C.
References currTime_, timeName(), and timeValue().

| void unsetTime | ( | ) |
Clear the current time.
Definition at line 289 of file surfaceWriter.C.
References currTime_.
Referenced by endTime().

|
virtual |
Begin a time-step.
Reimplemented in vtkWriter.
Definition at line 296 of file surfaceWriter.C.
References setTime(), Time::timeName(), and dimensioned< Type >::value().
Referenced by vtkWriter::beginTime(), and vtkWriter::beginTime().


|
virtual |
Begin a time-step.
Reimplemented in vtkWriter.
Definition at line 302 of file surfaceWriter.C.
References setTime().

|
virtual |
End a time-step.
Reimplemented in vtkWriter.
Definition at line 308 of file surfaceWriter.C.
References unsetTime().
Referenced by vtkWriter::endTime().


|
virtual |
Open for output on specified path, using existing surface.
Reimplemented in nullWriter.
Definition at line 314 of file surfaceWriter.C.
References outputPath_, and wroteGeom_.
Referenced by abaqusWriter::abaqusWriter(), abaqusWriter::abaqusWriter(), boundaryDataWriter::boundaryDataWriter(), boundaryDataWriter::boundaryDataWriter(), debugWriter::debugWriter(), debugWriter::debugWriter(), ensightWriter::ensightWriter(), ensightWriter::ensightWriter(), foamWriter::foamWriter(), foamWriter::foamWriter(), nastranWriter::nastranWriter(), nastranWriter::nastranWriter(), open(), open(), open(), open(), proxyWriter::proxyWriter(), proxyWriter::proxyWriter(), rawWriter::rawWriter(), rawWriter::rawWriter(), starcdWriter::starcdWriter(), starcdWriter::starcdWriter(), vtkWriter::vtkWriter(), vtkWriter::vtkWriter(), x3dWriter::x3dWriter(), and x3dWriter::x3dWriter().

|
virtual |
Open from components.
Definition at line 334 of file surfaceWriter.C.
References close(), open(), points, and setSurface().

|
virtual |
Open from components.
Definition at line 321 of file surfaceWriter.C.
References close(), open(), and setSurface().

|
virtual |
Open from components, with the current parallel/serial treatment.
Definition at line 360 of file surfaceWriter.C.
References close(), open(), parallel_, points, and setSurface().

|
virtual |
Open from components, with the current parallel/serial treatment.
Definition at line 348 of file surfaceWriter.C.
References close(), open(), parallel_, and setSurface().

|
virtual |
Finish output, performing any necessary cleanup.
Reimplemented in ensightWriter, and vtkWriter.
Definition at line 373 of file surfaceWriter.C.
References outputPath_, and wroteGeom_.
Referenced by clear(), ensightWriter::close(), vtkWriter::close(), open(), open(), open(), open(), surfaceWriter(), and ~surfaceWriter().

|
pure virtual |
Write separate surface geometry to file.
Implemented in abaqusWriter, boundaryDataWriter, debugWriter, ensightWriter, foamWriter, nastranWriter, nullWriter, proxyWriter, rawWriter, starcdWriter, vtkWriter, and x3dWriter.
References write().
Referenced by write(), and writeTemplate().


Write field of label (per face or vertex).
| fieldName | Name of field |
| values | Field values to write |
Write field of scalar (per face or vertex).
| fieldName | Name of field |
| values | Field values to write |
Write field of vector (per face or vertex).
| fieldName | Name of field |
| values | Field values to write |
|
pure virtual |
Write field of sphericalTensor (per face or vertex).
| fieldName | Name of field |
| values | Field values to write |
|
pure virtual |
Write field of symmTensor (per face or vertex).
| fieldName | Name of field |
| values | Field values to write |
Write field of tensor (per face or vertex).
| fieldName | Name of field |
| values | Field values to write |
|
inlinevirtualnoexcept |
Return info proxy, used to print information to a stream.
Definition at line 852 of file surfaceWriter.H.
References Foam::noexcept.
| Foam::tmp< Foam::Field< Type > > mergeFieldTemplate | ( | const Field< Type > & | fld | ) | const |
Definition at line 593 of file surfaceWriter.C.
References commType_, Foam::endl(), fld(), globalIndex::gather(), gatherv_, Foam::Info, Foam::inplaceReorder(), isPointData(), UPstream::master(), merge(), mergedSurf_, globalIndex::mpiGather(), UPstream::msgType(), Foam::New(), parallel_, UPstream::parRun(), upToDate_, and UPstream::worldComm.

| Foam::tmp< Foam::Field< Type > > adjustFieldTemplate | ( | const word & | fieldName, |
| const tmp< Field< Type > > & | tfield ) const |
Definition at line 672 of file surfaceWriter.C.
References Foam::equal(), fieldLevel_, fieldScale_, geometryTransform_, Foam::Info, Foam::is_rotational_vectorspace_v, Foam::is_vectorspace_v, tmp< T >::ref(), keyType::REGEX, tmp< T >::reset(), Foam::transform(), and verbose_.

|
friend |
|
protected |
Reference to surface or surface components.
Definition at line 190 of file surfaceWriter.H.
Referenced by clear(), empty(), hasSurface(), merge(), setSurface(), setSurface(), size(), surface(), and surfaceWriter().
|
mutableprotected |
Surface after merging (parallel).
Definition at line 195 of file surfaceWriter.H.
Referenced by expire(), merge(), mergeFieldTemplate(), surface(), and surfaceWriter().
|
mutableprotected |
The surface after point coordinate transforms and scaling.
Definition at line 200 of file surfaceWriter.H.
Referenced by adjustSurface(), expire(), merge(), and surfaceWriter().
|
protected |
Dimension for merging.
Definition at line 205 of file surfaceWriter.H.
Referenced by merge(), mergeDim(), mergeDim(), and surfaceWriter().
|
protected |
Output geometry scaling after rotate/translate.
Definition at line 210 of file surfaceWriter.H.
Referenced by adjustSurface(), scale(), scale(), surfaceWriter(), and surfaceWriter().
|
protected |
The centre of rotation (untranslate, translate).
Definition at line 215 of file surfaceWriter.H.
Referenced by adjustSurface(), surfaceWriter(), and surfaceWriter().
|
protected |
Local coordinate system transformation.
Definition at line 220 of file surfaceWriter.H.
Referenced by adjustFieldTemplate(), adjustSurface(), surfaceWriter(), surfaceWriter(), and transform().
|
mutableprotected |
The topology/surface is up-to-date?
Definition at line 230 of file surfaceWriter.H.
Referenced by adjustSurface(), expire(), merge(), mergeFieldTemplate(), needsUpdate(), and surfaceWriter().
|
mutableprotected |
Track if geometry has been written since the last open.
Definition at line 235 of file surfaceWriter.H.
Referenced by close(), expire(), merge(), open(), surfaceWriter(), boundaryDataWriter::write(), debugWriter::write(), foamWriter::write(), nastranWriter::write(), nullWriter::write(), proxyWriter::write(), rawWriter::write(), starcdWriter::write(), vtkWriter::write(), x3dWriter::write(), writeTemplate(), boundaryDataWriter::writeTemplate(), debugWriter::writeTemplate(), foamWriter::writeTemplate(), starcdWriter::writeTemplate(), x3dWriter::writeTemplate(), and wroteData().
|
protected |
Writing in parallel (via master).
Definition at line 240 of file surfaceWriter.H.
Referenced by empty(), merge(), mergeFieldTemplate(), open(), open(), setSurface(), setSurface(), setSurface(), setSurface(), size(), surface(), surfaceWriter(), boundaryDataWriter::write(), debugWriter::write(), foamWriter::write(), nastranWriter::write(), proxyWriter::write(), rawWriter::write(), starcdWriter::write(), vtkWriter::write(), x3dWriter::write(), rawWriter::writeTemplate(), boundaryDataWriter::writeTemplate(), debugWriter::writeTemplate(), starcdWriter::writeTemplate(), and x3dWriter::writeTemplate().
|
protected |
Insert additional time sub-directory in the output path.
Definition at line 245 of file surfaceWriter.H.
Referenced by surfaceWriter(), useTimeDir(), and useTimeDir().
|
protected |
Is point vs cell data.
Definition at line 250 of file surfaceWriter.H.
Referenced by isPointData(), isPointData(), and surfaceWriter().
|
protected |
Additional output verbosity.
Definition at line 255 of file surfaceWriter.H.
Referenced by adjustFieldTemplate(), surfaceWriter(), surfaceWriter(), verbose(), verbose(), debugWriter::write(), foamWriter::write(), nastranWriter::write(), proxyWriter::write(), rawWriter::write(), starcdWriter::write(), vtkWriter::write(), x3dWriter::write(), boundaryDataWriter::writeTemplate(), debugWriter::writeTemplate(), foamWriter::writeTemplate(), starcdWriter::writeTemplate(), x3dWriter::writeTemplate(), and x3dWriter::x3dWriter().
|
protected |
Communication type (for field merging).
Definition at line 260 of file surfaceWriter.H.
Referenced by debugWriter::debugWriter(), mergeFieldTemplate(), surfaceWriter(), and surfaceWriter().
|
protected |
Prefer MPI gatherv intrinsic (for field merging) [experimental].
Definition at line 265 of file surfaceWriter.H.
Referenced by debugWriter::debugWriter(), mergeFieldTemplate(), surfaceWriter(), and surfaceWriter().
|
protected |
The number of fields.
Definition at line 270 of file surfaceWriter.H.
Referenced by nFields(), nFields(), operator<<, surfaceWriter(), and vtkWriter::write().
|
protected |
The current time value/name.
Definition at line 275 of file surfaceWriter.H.
Referenced by hasTime(), setTime(), setTime(), setTime(), surfaceWriter(), timeName(), timeValue(), unsetTime(), and vtkWriter::write().
|
protected |
The full output directory and file (surface) name.
Definition at line 280 of file surfaceWriter.H.
Referenced by close(), is_open(), open(), surfaceWriter(), boundaryDataWriter::write(), debugWriter::write(), foamWriter::write(), nastranWriter::write(), proxyWriter::write(), rawWriter::write(), starcdWriter::write(), vtkWriter::write(), x3dWriter::write(), boundaryDataWriter::writeTemplate(), debugWriter::writeTemplate(), foamWriter::writeTemplate(), starcdWriter::writeTemplate(), and x3dWriter::writeTemplate().
|
protected |
Field level to remove (on output).
Definition at line 285 of file surfaceWriter.H.
Referenced by adjustFieldTemplate(), surfaceWriter(), and surfaceWriter().
|
protected |
Field scaling (on output).
Definition at line 290 of file surfaceWriter.H.
Referenced by adjustFieldTemplate(), surfaceWriter(), and surfaceWriter().
|
static |
The default merge dimension (1e-8).
Definition at line 379 of file surfaceWriter.H.
Referenced by surfaceWriter(), and topOVariablesBase::writeSurfaceFiles().