PLaSK library

Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
plask::MeshGeneratorD< MESH_DIM > Class Template Referenceabstract

Base class for specific mesh generator. More...

`#include <plask/mesh/mesh.hpp>`

Inheritance diagram for plask::MeshGeneratorD< MESH_DIM >:
[legend]
Collaboration diagram for plask::MeshGeneratorD< MESH_DIM >:
[legend]

## Public Types
enum | { DIM = (MESH_DIM < 2) ? 2 : MESH_DIM }
| 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< MeshGenerator > | Event
| Mesh generator event.

## Public Member Functions
virtual shared_ptr< MeshType > | generate (const GeometryPtr &geometry)=0
| Generate new mesh.
void | clearCache ()
| Clear the cache of generated meshes.
shared_ptr< MeshType > | operator() (const GeometryPtr &geometry)
| Get generated mesh if it is cached or create a new one.
template<typename RequiredType >
shared_ptr< RequiredType > | get (const shared_ptr< GeometryObjectD< DIM > > &geometry)
template<typename RequiredType >
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 ()

## Protected Member Functions
void | onChange (const Event &) override
| This method is called when the generator is changed, just before changed signal.

## Static Protected Member Functions
template<typename RequiredType >
static shared_ptr< RequiredType > | cast (const shared_ptr< MeshType > &res)

## Protected Attributes
WeakCache< GeometryObject, MeshType, CacheRemoveOnEachChange > | cache

## Additional Inherited Members
Public Attributes inherited from plask::MeshGenerator
boost::signals2::signal< void(Event &)> | changed
| Changed signal, fired when space was changed.

## Detailed Description

template<int MESH_DIM>
class plask::MeshGeneratorD< MESH_DIM >

Base class for specific mesh generator.

Definition at line 378 of file mesh.hpp.

## Member Typedef Documentation

## ◆ GeometryPtr

template<int MESH_DIM>

typedef shared_ptr<GeometryObjectD<DIM> > plask::MeshGeneratorD< MESH_DIM >::GeometryPtr

Definition at line 401 of file mesh.hpp.

## ◆ MeshType

template<int MESH_DIM>

typedef MeshD<MESH_DIM> plask::MeshGeneratorD< MESH_DIM >::MeshType

Type of the generated mesh.

Definition at line 382 of file mesh.hpp.

## Member Enumeration Documentation

## ◆ anonymous enum

template<int MESH_DIM>

anonymous enum

Number of geometry dimensions.

Enumerator
DIM |

Definition at line 385 of file mesh.hpp.

## Member Function Documentation

## ◆ cast()

template<int MESH_DIM>
template<typename RequiredType >

static shared_ptr< RequiredType > plask::MeshGeneratorD< MESH_DIM >::cast | ( | const shared_ptr< MeshType > & | res | ) |
| inline static protected

Definition at line 393 of file mesh.hpp.

## ◆ clearCache()

template<int MESH_DIM>

void plask::MeshGeneratorD< MESH_DIM >::clearCache | ( |  | ) |
| inline

Clear the cache of generated meshes.

This method should be called each time any parameter of generator is changed

Definition at line 414 of file mesh.hpp.

## ◆ generate()

template<int MESH_DIM>

virtual shared_ptr< MeshType > plask::MeshGeneratorD< MESH_DIM >::generate | ( | const GeometryPtr & | geometry | ) |
| pure virtual

Generate new mesh.

Parameters

  geometry | on which the mesh should be generated

Returns
  new generated mesh

## ◆ generate_t()

template<int MESH_DIM>
template<typename RequiredType >

shared_ptr< RequiredType > plask::MeshGeneratorD< MESH_DIM >::generate_t | ( | const shared_ptr< GeometryObjectD< DIM > > & | geometry | ) |
| inline

Definition at line 427 of file mesh.hpp.

## ◆ get()

template<int MESH_DIM>
template<typename RequiredType >

shared_ptr< RequiredType > plask::MeshGeneratorD< MESH_DIM >::get | ( | const shared_ptr< GeometryObjectD< DIM > > & | geometry | ) |
| inline

Definition at line 422 of file mesh.hpp.

## ◆ onChange()

template<int MESH_DIM>

void plask::MeshGeneratorD< MESH_DIM >::onChange | ( | const Event & | evt | ) |
| inline override protected virtual

This method is called when the generator is changed, just before changed signal.

Parameters

  evt | triggering event

Reimplemented from plask::MeshGenerator.

Definition at line 390 of file mesh.hpp.

## ◆ operator()()

template<int MESH_DIM>

shared_ptr< typename MeshGeneratorD< MESH_DIM >::MeshType > plask::MeshGeneratorD< MESH_DIM >::operator() | ( | const GeometryPtr & | geometry | ) |

Get generated mesh if it is cached or create a new one.

Definition at line 71 of file mesh.cpp.

## Member Data Documentation

## ◆ cache

template<int MESH_DIM>

WeakCache<GeometryObject, MeshType, CacheRemoveOnEachChange> plask::MeshGeneratorD< MESH_DIM >::cache
| protected

Definition at line 388 of file mesh.hpp.

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

- plask/mesh/mesh.hpp
- plask/mesh/mesh.cpp