MeshedSurfaceProxy< Face > Class Template Reference

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

Public Types

typedef Face FaceType
 Face type used. More...
 

Public Member Functions

 ClassName ("MeshedSurfaceProxy")
 Runtime type information. More...
 
 MeshedSurfaceProxy (const pointField &pointLst, const UList< Face > &faceLst, const UList< surfZone > &zoneLst=List< surfZone >(), const labelUList &faceMap=labelUList::null())
 Construct from component references. More...
 
virtual ~MeshedSurfaceProxy ()=default
 Destructor. More...
 
 declareMemberFunctionSelectionTable (void, MeshedSurfaceProxy, write, fileExtension,(const fileName &name, const MeshedSurfaceProxy< Face > &surf, const dictionary &options),(name, surf, options))
 
label size () const
 The surface size is the number of faces. More...
 
const pointFieldpoints () const
 Return const access to the points. More...
 
const UList< Face > & surfFaces () const
 Return const access to the faces. More...
 
const UList< surfZone > & surfZones () const
 Const access to the surface zones. More...
 
const labelUListfaceMap () const
 Const access to the faceMap, zero-sized when unused. More...
 
bool useFaceMap () const
 Use faceMap? More...
 
label nTriangles () const
 Count number of triangles. More...
 
virtual void write (const fileName &name, const dictionary &options=dictionary::null) const
 Generic write routine. Chooses writer based on its extension. More...
 
virtual void write (const fileName &name, const word &ext, const dictionary &options=dictionary::null) const
 Generic write routine. Chooses writer based on extension. More...
 
virtual void write (const Time &t, const word &surfName=word::null) const
 Write to database. More...
 

Static Public Member Functions

static wordHashSet writeTypes ()
 The file format types that can be written via MeshedSurfaceProxy. More...
 
static bool canWriteType (const word &ext, const bool verbose=false)
 Can this file format type be written via MeshedSurfaceProxy? More...
 
static void write (const fileName &name, const MeshedSurfaceProxy &surf, const dictionary &options)
 Write to file, select based on its extension. More...
 
static void write (const fileName &name, const word &ext, const MeshedSurfaceProxy &surf, const dictionary &options)
 Write to file, selected based on given extension. More...
 

Detailed Description

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

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

Source files

Definition at line 78 of file MeshedSurface.H.

Member Typedef Documentation

◆ FaceType

typedef Face FaceType

Face type used.

Definition at line 84 of file MeshedSurfaceProxy.H.

Constructor & Destructor Documentation

◆ MeshedSurfaceProxy()

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

Construct from component references.

Definition at line 231 of file MeshedSurfaceProxy.C.

◆ ~MeshedSurfaceProxy()

virtual ~MeshedSurfaceProxy ( )
virtualdefault

Destructor.

Member Function Documentation

◆ ClassName()

ClassName ( "MeshedSurfaceProxy< Face >"  )

Runtime type information.

◆ writeTypes()

Foam::wordHashSet writeTypes ( )
static

The file format types that can be written via MeshedSurfaceProxy.

Definition at line 40 of file MeshedSurfaceProxy.C.

Referenced by surfaceWriter::New(), and triSurface::writeTypes().

Here is the caller graph for this function:

◆ canWriteType()

bool canWriteType ( const word ext,
const bool  verbose = false 
)
static

Can this file format type be written via MeshedSurfaceProxy?

Definition at line 48 of file MeshedSurfaceProxy.C.

Referenced by surfaceWriter::supportedType().

Here is the caller graph for this function:

◆ declareMemberFunctionSelectionTable()

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

◆ write() [1/5]

void write ( const fileName name,
const MeshedSurfaceProxy< Face > &  surf,
const dictionary options 
)
static

Write to file, select based on its extension.

Definition at line 62 of file MeshedSurfaceProxy.C.

References word::ext(), Foam::name(), and Foam::vtk::write().

Referenced by MeshedSurfaceProxy< Face >::write(), UnsortedMeshedSurface< Face >::write(), MeshedSurface< Foam::face >::write(), and surfMesh::write().

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

◆ write() [2/5]

void write ( const fileName name,
const word ext,
const MeshedSurfaceProxy< Face > &  surf,
const dictionary options 
)
static

Write to file, selected based on given extension.

Definition at line 74 of file MeshedSurfaceProxy.C.

References Foam::expressions::patchExpr::debug, Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::flatOutput(), InfoInFunction, Foam::name(), and Foam::nl.

Here is the call graph for this function:

◆ size()

label size ( ) const
inline

The surface size is the number of faces.

Definition at line 154 of file MeshedSurfaceProxy.H.

◆ points()

◆ surfFaces()

◆ surfZones()

const UList<surfZone>& surfZones ( ) const
inline

Const access to the surface zones.

If zones are defined, they must be contiguous and cover the entire surface

Definition at line 174 of file MeshedSurfaceProxy.H.

Referenced by FLMAsurfaceFormat< Face >::write(), OBJsurfaceFormat< Face >::write(), X3DsurfaceFormat< Face >::write(), SMESHsurfaceFormat< Face >::write(), AC3DsurfaceFormat< Face >::write(), OFFsurfaceFormat< Face >::write(), TRIsurfaceFormat< Face >::write(), STARCDsurfaceFormat< Face >::write(), NASsurfaceFormat< Face >::write(), VTPsurfaceFormat< Face >::write(), VTKsurfaceFormat< Face >::write(), STLsurfaceFormat< Face >::writeAscii(), and STLsurfaceFormat< Face >::writeBinary().

Here is the caller graph for this function:

◆ faceMap()

◆ useFaceMap()

◆ nTriangles()

Foam::label nTriangles ( ) const
inline

Count number of triangles.

Definition at line 248 of file MeshedSurfaceProxy.C.

References f().

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

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

◆ write() [3/5]

virtual void write ( const fileName name,
const dictionary options = dictionary::null 
) const
inlinevirtual

Generic write routine. Chooses writer based on its extension.

Definition at line 199 of file MeshedSurfaceProxy.H.

References Foam::name(), and MeshedSurfaceProxy< Face >::write().

Here is the call graph for this function:

◆ write() [4/5]

virtual void write ( const fileName name,
const word ext,
const dictionary options = dictionary::null 
) const
inlinevirtual

Generic write routine. Chooses writer based on extension.

Definition at line 209 of file MeshedSurfaceProxy.H.

References Foam::name(), and MeshedSurfaceProxy< Face >::write().

Here is the call graph for this function:

◆ write() [5/5]

void write ( const Time t,
const word surfName = word::null 
) const
virtual

Write to database.

Definition at line 103 of file MeshedSurfaceProxy.C.

References Foam::expressions::patchExpr::debug, Foam::defaultName, Foam::endl(), Foam::faceMap(), InfoInFunction, Foam::isDir(), Foam::mkDir(), IOobject::name(), Foam::name(), points, Time::timeName(), Time::timePath(), IOobject::writeEndDivider(), and IOobject::writeHeader().

Here is the call graph for this function:

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