PLaSK library
Loading...
Searching...
No Matches
plask::TriangleGenerator Struct Reference

Generator which creates triangular mesh by Triangle library authored by Jonathan Richard Shewchuk. More...

#include <plask/mesh/generator_triangular.hpp>

Inheritance diagram for plask::TriangleGenerator:
[legend]
Collaboration diagram for plask::TriangleGenerator:
[legend]

Public Member Functions

shared_ptr< MeshD< 2 > > generate (const shared_ptr< GeometryObjectD< DIM > > &geometry) override
 
void setMaxTriangleArea (double area)
 Set maximum triangle area.
 
void clearMaxTriangleArea ()
 Clear maximum triangle area.
 
void setMinTriangleAngle (double angle)
 Set minimum angle.
 
void clearMinTriangleAngle ()
 Clear minimum angle.
 
void setFull (bool value)
 Set full.
 
- Public Member Functions inherited from plask::MeshGeneratorD< 2 >
virtual shared_ptr< MeshTypegenerate (const GeometryPtr &geometry)=0
 Generate new mesh.
 
void clearCache ()
 Clear the cache of generated meshes.
 
shared_ptr< MeshTypeoperator() (const GeometryPtr &geometry)
 Get generated mesh if it is cached or create a new one.
 
shared_ptr< RequiredType > get (const shared_ptr< GeometryObjectD< DIM > > &geometry)
 
shared_ptr< RequiredType > generate_t (const shared_ptr< GeometryObjectD< DIM > > &geometry)
 
- Public Member Functions inherited from plask::MeshGenerator
template<typename ClassT , typename methodT >
void changedConnectMethod (ClassT *obj, methodT method, boost::signals2::connect_position at=boost::signals2::at_back)
 Connect a method to changed signal.
 
template<typename ClassT , typename methodT >
void changedDisconnectMethod (ClassT *obj, methodT method)
 
template<typename EventT = Event, typename ... Args>
void fireChanged (Args &&... event_constructor_params_without_source)
 Call changed with this as event source.
 
virtual ~MeshGenerator ()
 
- Public Member Functions inherited from plask::MeshBase
virtual ~MeshBase ()
 

Public Attributes

optional< doublemaxTriangleArea
 A maximum triangle area constraint.
 
optional< doubleminTriangleAngle
 Minimum angle (if this is NaN, Triangle default is used, 20 degrees).
 
bool delaunay = true
 Use true Delaunay triangulation.
 
bool full = false
 Use full mesh.
 
- Public Attributes inherited from plask::MeshGenerator
boost::signals2::signal< void(Event &)> changed
 Changed signal, fired when space was changed.
 

Additional Inherited Members

- Public Types inherited from plask::MeshGeneratorD< 2 >
enum  
 Number of geometry dimensions. More...
 
typedef MeshD< MESH_DIM > MeshType
 Type of the generated mesh.
 
typedef shared_ptr< GeometryObjectD< DIM > > GeometryPtr
 
- Public Types inherited from plask::MeshGenerator
typedef EventWithSourceAndFlags< MeshGeneratorEvent
 Mesh generator event.
 
- Protected Member Functions inherited from plask::MeshGeneratorD< 2 >
void onChange (const Event &) override
 This method is called when the generator is changed, just before changed signal.
 
- Static Protected Member Functions inherited from plask::MeshGeneratorD< 2 >
static shared_ptr< RequiredType > cast (const shared_ptr< MeshType > &res)
 
- Protected Attributes inherited from plask::MeshGeneratorD< 2 >
WeakCache< GeometryObject, MeshType, CacheRemoveOnEachChangecache
 

Detailed Description

Generator which creates triangular mesh by Triangle library authored by Jonathan Richard Shewchuk.

Triangle generates exact Delaunay triangulations, constrained Delaunay triangulations, conforming Delaunay triangulations, Voronoi diagrams, and high-quality triangular meshes. The latter can be generated with no small or large angles, and are thus suitable for finite element analysis.

See: https://www.cs.cmu.edu/~quake/triangle.html

Definition at line 31 of file generator_triangular.hpp.

Member Function Documentation

◆ clearMaxTriangleArea()

void plask::TriangleGenerator::clearMaxTriangleArea ( )
inline

Clear maximum triangle area.

Definition at line 47 of file generator_triangular.hpp.

◆ clearMinTriangleAngle()

void plask::TriangleGenerator::clearMinTriangleAngle ( )
inline

Clear minimum angle.

Definition at line 64 of file generator_triangular.hpp.

◆ generate()

shared_ptr< MeshD< 2 > > plask::TriangleGenerator::generate ( const shared_ptr< GeometryObjectD< DIM > > &  geometry)
override

Definition at line 32 of file generator_triangular.cpp.

◆ setFull()

void plask::TriangleGenerator::setFull ( bool  value)
inline

Set full.

Definition at line 80 of file generator_triangular.hpp.

◆ setMaxTriangleArea()

void plask::TriangleGenerator::setMaxTriangleArea ( double  area)
inline

Set maximum triangle area.

Definition at line 41 of file generator_triangular.hpp.

◆ setMinTriangleAngle()

void plask::TriangleGenerator::setMinTriangleAngle ( double  angle)
inline

Set minimum angle.

Definition at line 58 of file generator_triangular.hpp.

Member Data Documentation

◆ delaunay

bool plask::TriangleGenerator::delaunay = true

Use true Delaunay triangulation.

Definition at line 72 of file generator_triangular.hpp.

◆ full

bool plask::TriangleGenerator::full = false

Use full mesh.

Definition at line 77 of file generator_triangular.hpp.

◆ maxTriangleArea

optional<double> plask::TriangleGenerator::maxTriangleArea

A maximum triangle area constraint.

Definition at line 38 of file generator_triangular.hpp.

◆ minTriangleAngle

optional<double> plask::TriangleGenerator::minTriangleAngle

Minimum angle (if this is NaN, Triangle default is used, 20 degrees).

Definition at line 55 of file generator_triangular.hpp.


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