Geophysical Inversion and Modelling Library  v1.5.2-5-g042d7f36
GIMLI::TriangleWrapper Class Reference
+ Collaboration diagram for GIMLI::TriangleWrapper:

Public Member Functions

 TriangleWrapper (const Mesh &inMesh)
 
 TriangleWrapper (const Mesh &inMesh, Mesh &outMesh, const std::string &triSwitches)
 
virtual ~TriangleWrapper ()
 
void setSwitches (const std::string &s)
 
const std::string & switches () const
 
void generate (Mesh &mesh)
 
Mesh generate ()
 

Protected Member Functions

void init_ ()
 
void transformTriangleToMesh_ (const triangulateio &trimesh, Mesh &mesh)
 
void transformMeshToTriangle_ (const Mesh &mesh, triangulateio &trimesh)
 
void allocateOutMemory_ ()
 
void freeMemory_ ()
 

Protected Attributes

struct triangulateio * mesh_input_
 
struct triangulateio * mesh_output_
 
struct triangulateio * mesh_voronoi_output_
 
std::string switches_
 
const MeshinMesh_
 

Constructor & Destructor Documentation

◆ TriangleWrapper() [1/2]

GIMLI::TriangleWrapper::TriangleWrapper ( const Mesh inMesh)

Construct a PLC from nodes and edges in inMesh and initialize the trianglewrapper. Add region and hole marker later.

References init_().

◆ TriangleWrapper() [2/2]

GIMLI::TriangleWrapper::TriangleWrapper ( const Mesh inMesh,
Mesh outMesh,
const std::string &  triSwitches 
)

Constructor initialize with input mesh (nodes and edges where used for input and also region marker, if added to the mesh) and generate the 2d mesh with corresponding triSwitches

References generate(), and init_().

◆ ~TriangleWrapper()

GIMLI::TriangleWrapper::~TriangleWrapper ( )
virtual

Default destructur

References freeMemory_().

Member Function Documentation

◆ allocateOutMemory_()

void GIMLI::TriangleWrapper::allocateOutMemory_ ( )
protected

For internal use only.

Referenced by generate(), and init_().

◆ freeMemory_()

void GIMLI::TriangleWrapper::freeMemory_ ( )
protected

For internal use only.

Referenced by generate(), and ~TriangleWrapper().

◆ generate() [1/2]

Mesh GIMLI::TriangleWrapper::generate ( )

Generate and return the new mesh.

Referenced by TriangleWrapper().

◆ generate() [2/2]

void GIMLI::TriangleWrapper::generate ( Mesh mesh)

Generate the mesh and store in mesh.

References allocateOutMemory_(), freeMemory_(), transformMeshToTriangle_(), and transformTriangleToMesh_().

◆ init_()

void GIMLI::TriangleWrapper::init_ ( )
protected

For internal use only.

References allocateOutMemory_().

Referenced by TriangleWrapper().

◆ setSwitches()

void GIMLI::TriangleWrapper::setSwitches ( const std::string &  s)

Set the triangle commandline switches

◆ switches()

const std::string& GIMLI::TriangleWrapper::switches ( ) const
inline

Return the triangle switches.

◆ transformMeshToTriangle_()

void GIMLI::TriangleWrapper::transformMeshToTriangle_ ( const Mesh mesh,
triangulateio &  trimesh 
)
protected

For internal use only. Only Edges and nodes(x,y) from mesh are used.

References GIMLI::MeshEntity::center(), GIMLI::Mesh::holeMarker(), and GIMLI::BaseEntity::id().

Referenced by generate().

◆ transformTriangleToMesh_()

void GIMLI::TriangleWrapper::transformTriangleToMesh_ ( const triangulateio &  trimesh,
Mesh mesh 
)
protected

For internal use only.

References GIMLI::Mesh::clear().

Referenced by generate().