GTSsurfaceFormat< Face > Class Template Reference

Read/write GTS format. More...

Inheritance diagram for GTSsurfaceFormat< Face >:
[legend]
Collaboration diagram for GTSsurfaceFormat< Face >:
[legend]

Public Member Functions

 GTSsurfaceFormat (const fileName &filename)
 Construct from file name. More...
 
virtual ~GTSsurfaceFormat ()=default
 Destructor. More...
 
virtual bool read (const fileName &filename)
 Read from file. More...
 
virtual void write (const fileName &name, const dictionary &options=dictionary::null) const
 Write surface mesh to file. More...
 
- Public Member Functions inherited from UnsortedMeshedSurface< Face >
 TypeName ("UnsortedMeshedSurface")
 Runtime type information. More...
 
 UnsortedMeshedSurface ()
 Construct null. More...
 
 UnsortedMeshedSurface (const UnsortedMeshedSurface< Face > &surf)
 Construct as copy. More...
 
 UnsortedMeshedSurface (const MeshedSurface< Face > &surf)
 Construct from a MeshedSurface. More...
 
 UnsortedMeshedSurface (UnsortedMeshedSurface< Face > &&surf)
 Move construct from a UnsortedMeshedSurface. More...
 
 UnsortedMeshedSurface (MeshedSurface< Face > &&surf)
 Move construct from MeshedSurface. More...
 
 UnsortedMeshedSurface (pointField &&pointLst, List< Face > &&faceLst, List< label > &&zoneIds, UList< surfZoneIdentifier > &tocInfo)
 Move construct from components (points, faces, zone ids). More...
 
 UnsortedMeshedSurface (const fileName &name)
 Construct from file name (uses extension to determine type) More...
 
 UnsortedMeshedSurface (const fileName &name, const word &ext)
 Construct from file name (uses extension to determine type) More...
 
 UnsortedMeshedSurface (Istream &is)
 Construct from Istream. More...
 
 UnsortedMeshedSurface (const Time &t, const word &surfName=word::null)
 Construct from objectRegistry and a named surface. More...
 
 declareRunTimeSelectionTable (autoPtr, UnsortedMeshedSurface, fileExtension,(const fileName &name),(name))
 
virtual ~UnsortedMeshedSurface ()=default
 Destructor. More...
 
 declareMemberFunctionSelectionTable (void, UnsortedMeshedSurface, write, fileExtension,(const fileName &name, const UnsortedMeshedSurface< Face > &surf, const dictionary &options),(name, surf, options))
 
label size () const
 The surface size is the number of faces. More...
 
void setSize (const label)
 Reset size of face and zone list. More...
 
virtual const labelListzoneIds () const
 Return const access to the zone ids. More...
 
const List< surfZoneIdentifier > & zoneToc () const
 Return const access to the zone table-of-contents. More...
 
surfZoneList sortedZones (labelList &faceMap) const
 Sort faces according to zoneIds. More...
 
void setOneZone ()
 Set zones to 0 and set a single zone. More...
 
void setZones (const surfZoneList &zoneLst)
 Set zone ids and zones. More...
 
void setZones (const labelUList &sizes, const UList< word > &names)
 Set zone ids and zones. More...
 
void setZones (const labelUList &sizes)
 Set zone ids and zones with default names. More...
 
virtual void clear ()
 Clear all storage. More...
 
template<class BoolListType >
UnsortedMeshedSurface subsetMesh (const BoolListType &include, labelList &pointMap, labelList &faceMap) const
 Return new surface. More...
 
UnsortedMeshedSurface subsetMesh (const bitSet &include) const
 Return new surface. More...
 
UnsortedMeshedSurface subsetMesh (const labelHashSet &include) const
 Return new surface. More...
 
void swap (MeshedSurface< Face > &surf)=delete
 Swap contents - disabled. More...
 
void swap (UnsortedMeshedSurface< Face > &surf)
 Swap contents. More...
 
void transfer (UnsortedMeshedSurface< Face > &surf)
 Transfer the contents of the argument and annul the argument. More...
 
void transfer (MeshedSurface< Face > &surf)
 Transfer the contents of the argument and annul the argument. More...
 
autoPtr< labelListreleaseZoneIds ()
 Release (clear) stored zoneIds and return for reuse. More...
 
bool read (const fileName &name, const word &ext)
 Read from file. Chooses reader based on explicit extension. More...
 
void write (const Time &t, const word &surfName=word::null) const
 Write to database. More...
 
void operator= (const UnsortedMeshedSurface< Face > &surf)
 Copy assignment. More...
 
void operator= (UnsortedMeshedSurface< Face > &&surf)
 Move assignment. More...
 
 operator MeshedSurfaceProxy< Face > () const
 Conversion operator to MeshedSurfaceProxy. More...
 
template<class BoolListType >
Foam::UnsortedMeshedSurface< Face > subsetMesh (const BoolListType &include, labelList &pointMap, labelList &faceMap) const
 

Static Public Member Functions

static void write (const fileName &filename, const MeshedSurface< Face > &surf, const dictionary &options=dictionary::null)
 Write MeshedSurface. More...
 
static void write (const fileName &filename, const UnsortedMeshedSurface< Face > &surf, const dictionary &options=dictionary::null)
 Write UnsortedMeshedSurface, the output remains unsorted. More...
 
- Static Public Member Functions inherited from UnsortedMeshedSurface< Face >
static bool canReadType (const word &ext, bool verbose=false)
 Can we read this file format type? More...
 
static bool canRead (const fileName &name, bool verbose=false)
 Can we read this file format? More...
 
static bool canWriteType (const word &ext, bool verbose=false)
 Can we write this file format type? More...
 
static wordHashSet readTypes ()
 Known readable file-types. More...
 
static wordHashSet writeTypes ()
 Known writable file-types. More...
 
static autoPtr< UnsortedMeshedSurfaceNew (const fileName &name, const word &ext)
 Select constructed from filename (explicit extension) More...
 
static autoPtr< UnsortedMeshedSurfaceNew (const fileName &name)
 Select constructed from filename (implicit extension) More...
 
static void write (const fileName &name, const UnsortedMeshedSurface< Face > &surf, const dictionary &options=dictionary::null)
 Write to file, select based on its extension. More...
 
static void write (const fileName &name, const word &ext, const UnsortedMeshedSurface< Face > &surf, const dictionary &options)
 Write to file, selected based on given extension. More...
 

Additional Inherited Members

- Public Types inherited from UnsortedMeshedSurface< Face >
typedef Face FaceType
 Face type used. More...
 
- Protected Member Functions inherited from UnsortedMeshedSurface< Face >
labelListstoredZoneIds ()
 Return non-const access to the zone Ids. More...
 
List< surfZoneIdentifier > & storedZoneToc ()
 Return non-const access to the zone table-of-contents. More...
 
virtual void remapFaces (const labelUList &faceMap)
 Set new zones from faceMap. More...
 

Detailed Description

template<class Face>
class Foam::fileFormats::GTSsurfaceFormat< Face >

Read/write GTS format.

The output is never sorted by zone and is only written if it consists entirely of triangles.

Source files

Definition at line 59 of file GTSsurfaceFormat.H.

Constructor & Destructor Documentation

◆ GTSsurfaceFormat()

GTSsurfaceFormat ( const fileName filename)

Construct from file name.

Definition at line 73 of file GTSsurfaceFormat.C.

References Foam::blockMeshTools::read().

Here is the call graph for this function:

◆ ~GTSsurfaceFormat()

virtual ~GTSsurfaceFormat ( )
virtualdefault

Destructor.

Member Function Documentation

◆ write() [1/3]

void write ( const fileName filename,
const MeshedSurface< Face > &  surf,
const dictionary options = dictionary::null 
)
static

Write MeshedSurface.

Definition at line 249 of file GTSsurfaceFormat.C.

References Foam::constant::electromagnetic::e, Foam::exit(), Foam::FatalError, FatalErrorInFunction, forAll, IOstream::good(), Foam::nl, UList< T >::size(), MeshedSurface< Face >::size(), MeshedSurface< Face >::surfFaces(), and MeshedSurface< Face >::surfZones().

Referenced by GTSsurfaceFormat< Face >::write().

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

◆ write() [2/3]

void write ( const fileName filename,
const UnsortedMeshedSurface< Face > &  surf,
const dictionary options = dictionary::null 
)
static

Write UnsortedMeshedSurface, the output remains unsorted.

Definition at line 336 of file GTSsurfaceFormat.C.

References Foam::constant::electromagnetic::e, Foam::exit(), Foam::FatalError, FatalErrorInFunction, forAll, IOstream::good(), Foam::nl, UList< T >::size(), UnsortedMeshedSurface< Face >::size(), UnsortedMeshedSurface< Face >::zoneIds(), and UnsortedMeshedSurface< Face >::zoneToc().

Here is the call graph for this function:

◆ read()

bool read ( const fileName filename)
virtual

Read from file.

Reimplemented from UnsortedMeshedSurface< Face >.

Definition at line 85 of file GTSsurfaceFormat.C.

References IOstream::bad(), clear(), edge::commonVertex(), stdFoam::end(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, forAll, IOstream::good(), Foam::name(), Foam::nl, nPoints, edge::otherVertex(), List< T >::setSize(), x, and y.

Here is the call graph for this function:

◆ write() [3/3]

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

Write surface mesh to file.

Reimplemented from UnsortedMeshedSurface< Face >.

Definition at line 108 of file GTSsurfaceFormat.H.

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

Here is the call graph for this function:

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