Loading...
Searching...
No Matches
MeshedSurfaceProxy< Face > Class Template Reference

A proxy for writing MeshedSurface, UnsortedMeshedSurface and surfMesh to various file formats. More...

#include <MeshedSurfaceProxy.H>

Inheritance diagram for MeshedSurfaceProxy< Face >:
Collaboration diagram for MeshedSurfaceProxy< Face >:

Public Types

typedef Face face_type
 The face type.
typedef point point_type
 The point type.

Public Member Functions

 ClassName ("MeshedSurfaceProxy")
 Declare type-name (with debug switch).
 MeshedSurfaceProxy (const pointField &pointLst, const UList< Face > &faceLst, const UList< surfZone > &zoneLst=UList< surfZone >::null(), const labelUList &faceMap=labelUList::null(), const labelUList &faceIdLst=labelUList::null())
 Construct from component references.
virtual ~MeshedSurfaceProxy ()=default
 Destructor.
 declareMemberFunctionSelectionTable (void, MeshedSurfaceProxy, write, fileExtension,(const fileName &name, const MeshedSurfaceProxy< Face > &surf, IOstreamOption streamOpt, const dictionary &options),(name, surf, streamOpt, options))
label size () const noexcept
 The surface size is the number of faces.
const pointFieldpoints () const noexcept
 Return const access to the points.
const UList< Face > & surfFaces () const noexcept
 Return const access to the faces.
const UList< surfZone > & surfZones () const noexcept
 Const access to the surface zones.
const labelUListfaceMap () const noexcept
 Const access to the faceMap, zero-sized when unused.
const labelUListfaceIds () const noexcept
 Const access to the faceIds, zero-sized when unused.
bool useFaceMap () const noexcept
 Can/should use faceMap?
bool useFaceIds () const noexcept
 Possible to use faceIds?
label nTriangles () const
 Count number of triangles.
virtual void write (const fileName &name, IOstreamOption streamOpt=IOstreamOption(), const dictionary &options=dictionary::null) const
 Write to file, choosing writer based on the file extension.
virtual void write (const fileName &name, const word &fileType, IOstreamOption streamOpt=IOstreamOption(), const dictionary &options=dictionary::null) const
 Write to file with given format type.
virtual void write (const Time &t, const word &surfName=word::null) const
 Write to database.
Public Member Functions inherited from surfaceFormatsCore
 surfaceFormatsCore ()=default
 Default construct.
virtual ~surfaceFormatsCore ()=default
 Destructor.

Static Public Member Functions

static wordHashSet writeTypes ()
 The file format types that can be written via MeshedSurfaceProxy.
static bool canWriteType (const word &fileType, bool verbose=false)
 Can this file format type be written via MeshedSurfaceProxy?
static void write (const fileName &name, const MeshedSurfaceProxy &surf, IOstreamOption streamOpt=IOstreamOption(), const dictionary &options=dictionary::null)
 Write to file, select based on its extension.
static void write (const fileName &name, const word &fileType, const MeshedSurfaceProxy &surf, IOstreamOption streamOpt=IOstreamOption(), const dictionary &options=dictionary::null)
 Write to file with given format type.
Static Public Member Functions inherited from surfaceFormatsCore
static bool checkSupport (const wordHashSet &available, const word &fileType, const bool verbose=false, const char *functionName=nullptr)
 Verbose checking of fileType in the list of available types.
static fileName findFile (const IOobject &io, const bool isGlobal=true)
 Use IOobject information to resolve file to load from, or empty if the file does not exist.
static fileName findFile (const IOobject &io, const dictionary &dict, const bool isGlobal=true)
 Use IOobject information to resolve file to load from, or empty if the file does not exist.

Additional Inherited Members

Static Public Attributes inherited from surfaceFormatsCore
static word nativeExt
 The file extension corresponding to 'native' surface format.
Static Protected Member Functions inherited from surfaceFormatsCore
static string getLineNoComment (ISstream &is, const char comment='#')
 Read non-empty and non-comment line.
template<class Container>
static List< surfZoneoneZone (const Container &container, const word &name="zone0")
 Return a surfZone list with a single entry, the size of which corresponds to that of the container.
static labelList getSelectedPatches (const surfZoneList &patches, const wordRes &allow, const wordRes &deny=wordRes())
 Return ids for zone/patch that match by name.
static fileName relativeFilePath (const IOobject &io, const fileName &f, const bool isGlobal=true)
 Return fileName.
static fileName checkFile (const IOobject &io, const bool isGlobal=true)
 Return fileName to load IOobject from.
static fileName checkFile (const IOobject &io, const dictionary &dict, const bool isGlobal=true)
 Return fileName to load IOobject from.

Detailed Description

template<class Face>
class Foam::MeshedSurfaceProxy< Face >

A proxy for writing MeshedSurface, UnsortedMeshedSurface and surfMesh to various file formats.

The constructor interface is fat and ugly, but is largely encapsulated by conversion operators in other classes.

Source files

Definition at line 60 of file MeshedSurfaceProxy.H.

Member Typedef Documentation

◆ face_type

template<class Face>
typedef Face face_type

The face type.

Definition at line 84 of file MeshedSurfaceProxy.H.

◆ point_type

template<class Face>
typedef point point_type

The point type.

Definition at line 89 of file MeshedSurfaceProxy.H.

Constructor & Destructor Documentation

◆ MeshedSurfaceProxy()

template<class Face>
MeshedSurfaceProxy ( const pointField & pointLst,
const UList< Face > & faceLst,
const UList< surfZone > & zoneLst = UList<surfZone>::null(),
const labelUList & faceMap = labelUList::null(),
const labelUList & faceIdLst = labelUList::null() )

Construct from component references.

Definition at line 229 of file MeshedSurfaceProxy.C.

References faceMap().

Referenced by declareMemberFunctionSelectionTable(), write(), and write().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ~MeshedSurfaceProxy()

template<class Face>
virtual ~MeshedSurfaceProxy ( )
virtualdefault

Destructor.

Member Function Documentation

◆ ClassName()

template<class Face>
ClassName ( "MeshedSurfaceProxy< Face >" )

Declare type-name (with debug switch).

References faceMap(), UList< T >::null(), and UList< label >::null().

Here is the call graph for this function:

◆ writeTypes()

template<class Face>
Foam::wordHashSet writeTypes ( )
static

The file format types that can be written via MeshedSurfaceProxy.

Definition at line 32 of file MeshedSurfaceProxy.C.

Referenced by MeshedSurface< Face >::canWriteType(), canWriteType(), surfaceWriter::New(), surfaceWriter::New(), MeshedSurface< Face >::write(), write(), UnsortedMeshedSurface< Face >::write(), and triSurface::writeTypes().

Here is the caller graph for this function:

◆ canWriteType()

template<class Face>
bool canWriteType ( const word & fileType,
bool verbose = false )
static

Can this file format type be written via MeshedSurfaceProxy?

Definition at line 39 of file MeshedSurfaceProxy.C.

References surfaceFormatsCore::checkSupport(), and writeTypes().

Referenced by surfaceWriter::supportedType(), proxyWriter::TryNew(), proxyWriter::TryNew(), and triSurface::write().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ declareMemberFunctionSelectionTable()

template<class Face>
declareMemberFunctionSelectionTable ( void ,
MeshedSurfaceProxy< Face > ,
write ,
fileExtension ,
(const fileName &name, const MeshedSurfaceProxy< Face > &surf, IOstreamOption streamOpt, const dictionary &options) ,
(name, surf, streamOpt, options)  )

References MeshedSurfaceProxy(), Foam::name(), dictionary::null, and write().

Here is the call graph for this function:

◆ write() [1/5]

template<class Face>
void write ( const fileName & name,
const MeshedSurfaceProxy< Face > & surf,
IOstreamOption streamOpt = IOstreamOption(),
const dictionary & options = dictionary::null )
static

◆ write() [2/5]

template<class Face>
void write ( const fileName & name,
const word & fileType,
const MeshedSurfaceProxy< Face > & surf,
IOstreamOption streamOpt = IOstreamOption(),
const dictionary & options = dictionary::null )
static

Write to file with given format type.

If the format type is "", uses the file extension.

Definition at line 69 of file MeshedSurfaceProxy.C.

References DebugInFunction, Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::flatOutput(), MeshedSurfaceProxy(), Foam::name(), Foam::nl, write(), and writeTypes().

Here is the call graph for this function:

◆ size()

template<class Face>
label size ( ) const
inlinenoexcept

The surface size is the number of faces.

Definition at line 182 of file MeshedSurfaceProxy.H.

References Foam::noexcept.

Referenced by nTriangles().

Here is the caller graph for this function:

◆ points()

◆ surfFaces()

◆ surfZones()

◆ faceMap()

◆ faceIds()

template<class Face>
const labelUList & faceIds ( ) const
inlinenoexcept

Const access to the faceIds, zero-sized when unused.

Definition at line 210 of file MeshedSurfaceProxy.H.

References Foam::noexcept.

Referenced by ABAQUSsurfaceFormat< Face >::write(), NASsurfaceFormat< Face >::write(), and STARCDsurfaceFormat< Face >::write().

Here is the caller graph for this function:

◆ useFaceMap()

◆ useFaceIds()

template<class Face>
bool useFaceIds ( ) const
inlinenoexcept

Possible to use faceIds?

Definition at line 223 of file MeshedSurfaceProxy.H.

References Foam::noexcept.

◆ nTriangles()

template<class Face>
Foam::label nTriangles ( ) const
inline

Count number of triangles.

Definition at line 249 of file MeshedSurfaceProxy.C.

References f(), faceTraits< FaceType >::isTri(), and size().

Referenced by STLsurfaceFormat< Face >::writeBinary().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ write() [3/5]

template<class Face>
virtual void write ( const fileName & name,
IOstreamOption streamOpt = IOstreamOption(),
const dictionary & options = dictionary::null ) const
inlinevirtual

Write to file, choosing writer based on the file extension.

Definition at line 239 of file MeshedSurfaceProxy.H.

References Foam::name(), dictionary::null, and write().

Here is the call graph for this function:

◆ write() [4/5]

template<class Face>
virtual void write ( const fileName & name,
const word & fileType,
IOstreamOption streamOpt = IOstreamOption(),
const dictionary & options = dictionary::null ) const
inlinevirtual

Write to file with given format type.

If the format type is "", uses the file extension.

Definition at line 254 of file MeshedSurfaceProxy.H.

References Foam::name(), dictionary::null, and write().

Here is the call graph for this function:

◆ write() [5/5]


The documentation for this class was generated from the following files: