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, IOstreamOption streamOpt=IOstreamOption(), const dictionary &options=dictionary::null) const
 Write surface mesh to file. More...
 
- Public Member Functions inherited from UnsortedMeshedSurface< Face >
 TypeName ("UnsortedMeshedSurface")
 Declare type-name, virtual type (with debug switch) More...
 
 UnsortedMeshedSurface ()
 Default construct. More...
 
 UnsortedMeshedSurface (const UnsortedMeshedSurface< Face > &surf)
 Copy construct. 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 &fileType)
 Construct from file name with given format type. More...
 
 UnsortedMeshedSurface (Istream &is)
 Construct from Istream. More...
 
 UnsortedMeshedSurface (const Time &runTime)
 Construct from database (as surfMesh) with default name. More...
 
 UnsortedMeshedSurface (const Time &runTime, const word &surfName)
 Construct from database (as surfMesh) with given surface name. More...
 
 UnsortedMeshedSurface (const IOobject &io, const dictionary &dict, const bool isGlobal=true)
 Read construct using IO to find the file location. 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, IOstreamOption streamOpt, const dictionary &options),(name, surf, streamOpt, 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 >
void subsetMeshMap (const BoolListType &include, labelList &pointMap, labelList &faceMap) const
 Create mappings for a sub-surface. More...
 
UnsortedMeshedSurface subsetMesh (const UList< bool > &include, labelList &pointMap, labelList &faceMap) const
 Return a new surface subsetted on the selected faces. More...
 
UnsortedMeshedSurface subsetMesh (const bitSet &include, labelList &pointMap, labelList &faceMap) const
 Return a new surface subsetted on the selected faces. More...
 
UnsortedMeshedSurface subsetMesh (const UList< bool > &include) const
 Return a new surface subsetted on the selected faces. More...
 
UnsortedMeshedSurface subsetMesh (const bitSet &include) const
 Return a new surface subsetted on the selected faces. 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 &fileType)
 Read from file with given format type. More...
 
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. 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...
 

Static Public Member Functions

static void write (const fileName &filename, const MeshedSurface< Face > &surf, IOstreamOption streamOpt=IOstreamOption(), const dictionary &=dictionary::null)
 Write MeshedSurface. More...
 
static void write (const fileName &filename, const UnsortedMeshedSurface< Face > &surf, IOstreamOption streamOpt=IOstreamOption(), const dictionary &=dictionary::null)
 Write UnsortedMeshedSurface, the output remains unsorted. More...
 
- Static Public Member Functions inherited from UnsortedMeshedSurface< Face >
static wordHashSet readTypes ()
 Known readable file-types, without friends or proxies. More...
 
static wordHashSet writeTypes ()
 Known writable file-types, without friends or proxies. More...
 
static bool canReadType (const word &fileType, bool verbose=false)
 Can we read this file format? Also checks friend types. More...
 
static bool canWriteType (const word &fileType, bool verbose=false)
 Can we write this file format? Also checks friend types. More...
 
static bool canRead (const fileName &name, bool verbose=false)
 Can we read this file format? More...
 
static autoPtr< UnsortedMeshedSurfaceNew (const fileName &name, const word &fileType, bool mandatory=true)
 Read construct from filename with given file type. More...
 
static autoPtr< UnsortedMeshedSurfaceNew (const fileName &name)
 Read construct from filename (implicit extension) More...
 
static void write (const fileName &name, const UnsortedMeshedSurface< Face > &surf, IOstreamOption streamOpt=IOstreamOption(), const dictionary &options=dictionary::null)
 Write to file, select based on its extension. More...
 
static void write (const fileName &name, const word &fileType, const UnsortedMeshedSurface< Face > &surf, IOstreamOption streamOpt=IOstreamOption(), const dictionary &options=dictionary::null)
 Write to file with given format type. More...
 

Additional Inherited Members

- Public Types inherited from UnsortedMeshedSurface< Face >
typedef Face face_type
 The face type (same as the underlying PrimitivePatch) More...
 
typedef point point_type
 The point type (same as the underlying PrimitivePatch) 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 &faceMapNewToOld)
 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.

Output stream options:

  • ASCII only
  • compression on/off

Output dictionary options: ignored

Source files

Definition at line 65 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,
IOstreamOption  streamOpt = IOstreamOption(),
const dictionary = dictionary::null 
)
static

Write MeshedSurface.

Definition at line 250 of file GTSsurfaceFormat.C.

References Foam::constant::electromagnetic::e, Foam::exit(), Foam::FatalError, FatalErrorInFunction, forAll, IOstreamOption::format(), Foam::nl, os(), 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,
IOstreamOption  streamOpt = IOstreamOption(),
const dictionary = dictionary::null 
)
static

Write UnsortedMeshedSurface, the output remains unsorted.

Definition at line 342 of file GTSsurfaceFormat.C.

References Foam::constant::electromagnetic::e, Foam::exit(), Foam::FatalError, FatalErrorInFunction, forAll, IOstreamOption::format(), Foam::nl, os(), 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::nl, nPoints, edge::otherVertex(), x, and y.

Here is the call graph for this function:

◆ write() [3/3]

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

Write surface mesh to file.

Reimplemented from UnsortedMeshedSurface< Face >.

Definition at line 116 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: