PLaSK library
Loading...
Searching...
No Matches
plask::RectangularMeshRefinedGenerator< dim > Struct Template Referenceabstract

Dividing generator ensuring no rapid change of element size. More...

#include <plask/mesh/generator_rectangular.hpp>

Inheritance diagram for plask::RectangularMeshRefinedGenerator< dim >:
[legend]
Collaboration diagram for plask::RectangularMeshRefinedGenerator< dim >:
[legend]

Public Types

typedef Rectangular_t< dim >::Rectilinear GeneratedMeshType
 
typedef std::map< std::pair< weak_ptr< const GeometryObjectD< DIM > >, PathHints >, std::set< double > > Refinements
 
- Public Types inherited from plask::MeshGeneratorD< dim >
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.
 

Public Member Functions

shared_ptr< OrderedAxisgetAxis (shared_ptr< OrderedAxis > axis, const shared_ptr< GeometryObjectD< DIM > > &geometry, size_t dir)
 
virtual shared_ptr< OrderedAxisprocessAxis (shared_ptr< OrderedAxis > axis, const shared_ptr< GeometryObjectD< DIM > > &geometry, size_t dir)=0
 
virtual const charname ()=0
 
void fromXML (XMLReader &, Manager &)
 
std::pair< double, doublegetMinMax (const shared_ptr< OrderedAxis > &axis)
 
void divideLargestSegment (shared_ptr< OrderedAxis > axis)
 
 RectangularMeshRefinedGenerator ()
 Create new generator.
 
shared_ptr< MeshD< dim > > generate (const shared_ptr< GeometryObjectD< DIM > > &geometry) override
 
double getAspect () const
 
void setAspect (double value)
 
const RefinementsgetRefinements (typename Primitive< DIM >::Direction direction) const
 
void addRefinement (typename Primitive< DIM >::Direction direction, const weak_ptr< const GeometryObjectD< DIM > > &object, const PathHints &path, double position)
 Add refinement to the mesh.
 
void addRefinement (typename Primitive< DIM >::Direction direction, const weak_ptr< const GeometryObjectD< DIM > > &object, double position)
 Add refinement to the mesh.
 
void addRefinement (typename Primitive< DIM >::Direction direction, const Path &path, double position)
 Add refinement to the mesh.
 
void addRefinement (typename Primitive< DIM >::Direction direction, const GeometryObject::Subtree &subtree, double position)
 Add refinement to the mesh.
 
void removeRefinement (typename Primitive< DIM >::Direction direction, const weak_ptr< const GeometryObjectD< DIM > > &object, const PathHints &path, double position)
 Remove refinement to the mesh.
 
void removeRefinement (typename Primitive< DIM >::Direction direction, const weak_ptr< const GeometryObjectD< DIM > > &object, double position)
 Remove refinement to the mesh.
 
void removeRefinement (typename Primitive< DIM >::Direction direction, const Path &path, double position)
 Remove refinement from the mesh.
 
void removeRefinement (typename Primitive< DIM >::Direction direction, const GeometryObject::Subtree &subtree, double position)
 Remove refinement from the mesh.
 
void removeRefinements (const weak_ptr< const GeometryObjectD< DIM > > &object, const PathHints &path=PathHints())
 Remove all refinements from the object.
 
void clearRefinements ()
 Remove all refinements from all objects.
 
void removeRefinements (const Path &path)
 Remove all refinements from the object.
 
void removeRefinements (const GeometryObject::Subtree &subtree)
 Remove all refinements from the object.
 
shared_ptr< MeshD< 1 > > generate (const boost::shared_ptr< plask::GeometryObjectD< 2 > > &geometry)
 
shared_ptr< MeshD< 2 > > generate (const boost::shared_ptr< plask::GeometryObjectD< 2 > > &geometry)
 
shared_ptr< MeshD< 3 > > generate (const boost::shared_ptr< plask::GeometryObjectD< 3 > > &geometry)
 
shared_ptr< MeshD< 1 > > generate (const boost::shared_ptr< plask::GeometryObjectD< 2 > > &geometry)
 
shared_ptr< MeshD< 2 > > generate (const boost::shared_ptr< plask::GeometryObjectD< 2 > > &geometry)
 
shared_ptr< MeshD< 3 > > generate (const boost::shared_ptr< plask::GeometryObjectD< 3 > > &geometry)
 
- Public Member Functions inherited from plask::MeshGeneratorD< dim >
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

double aspect
 
Refinements refinements [dim]
 
- Public Attributes inherited from plask::MeshGenerator
boost::signals2::signal< void(Event &)> changed
 Changed signal, fired when space was changed.
 

Additional Inherited Members

- Protected Member Functions inherited from plask::MeshGeneratorD< dim >
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< dim >
static shared_ptr< RequiredType > cast (const shared_ptr< MeshType > &res)
 
- Protected Attributes inherited from plask::MeshGeneratorD< dim >
WeakCache< GeometryObject, MeshType, CacheRemoveOnEachChangecache
 

Detailed Description

template<int dim>
struct plask::RectangularMeshRefinedGenerator< dim >

Dividing generator ensuring no rapid change of element size.

Definition at line 245 of file generator_rectangular.hpp.

Member Typedef Documentation

◆ GeneratedMeshType

template<int dim>
typedef Rectangular_t<dim>::Rectilinear plask::RectangularMeshRefinedGenerator< dim >::GeneratedMeshType

Definition at line 247 of file generator_rectangular.hpp.

◆ Refinements

template<int dim>
typedef std::map<std::pair<weak_ptr<const GeometryObjectD<DIM> >,PathHints>, std::set<double> > plask::RectangularMeshRefinedGenerator< dim >::Refinements

Definition at line 250 of file generator_rectangular.hpp.

Constructor & Destructor Documentation

◆ RectangularMeshRefinedGenerator()

template<int dim>
plask::RectangularMeshRefinedGenerator< dim >::RectangularMeshRefinedGenerator ( )
inline

Create new generator.

Definition at line 271 of file generator_rectangular.hpp.

Member Function Documentation

◆ addRefinement() [1/4]

template<int dim>
void plask::RectangularMeshRefinedGenerator< dim >::addRefinement ( typename Primitive< DIM >::Direction  direction,
const GeometryObject::Subtree subtree,
double  position 
)
inline

Add refinement to the mesh.

Parameters
directiondirection in which the object should be refined
subtreesubtree to the refined object (only the last path is used)
positionposition of the additional grid line in the refined object

Definition at line 333 of file generator_rectangular.hpp.

◆ addRefinement() [2/4]

template<int dim>
void plask::RectangularMeshRefinedGenerator< dim >::addRefinement ( typename Primitive< DIM >::Direction  direction,
const Path path,
double  position 
)
inline

Add refinement to the mesh.

Parameters
directiondirection in which the object should be refined
pathpath to the refined object
positionposition of the additional grid line in the refined object

Definition at line 323 of file generator_rectangular.hpp.

◆ addRefinement() [3/4]

template<int dim>
void plask::RectangularMeshRefinedGenerator< dim >::addRefinement ( typename Primitive< DIM >::Direction  direction,
const weak_ptr< const GeometryObjectD< DIM > > &  object,
const PathHints path,
double  position 
)
inline

Add refinement to the mesh.

Parameters
directiondirection in which the object should be refined
objectrefined object
pathadditional path hints pointing to the refined object
positionposition of the additional grid line in the refined object

Definition at line 300 of file generator_rectangular.hpp.

◆ addRefinement() [4/4]

template<int dim>
void plask::RectangularMeshRefinedGenerator< dim >::addRefinement ( typename Primitive< DIM >::Direction  direction,
const weak_ptr< const GeometryObjectD< DIM > > &  object,
double  position 
)
inline

Add refinement to the mesh.

Parameters
directiondirection in which the object should be refined
objectrefined object
positionposition of the additional grid line in the refined object

Definition at line 313 of file generator_rectangular.hpp.

◆ clearRefinements()

template<int dim>
void plask::RectangularMeshRefinedGenerator< dim >::clearRefinements ( )
inline

Remove all refinements from all objects.

Definition at line 410 of file generator_rectangular.hpp.

◆ divideLargestSegment()

template<int dim>
void plask::RectangularMeshRefinedGenerator< dim >::divideLargestSegment ( shared_ptr< OrderedAxis axis)

Definition at line 151 of file generator_rectangular.cpp.

◆ fromXML()

template<int dim>
void plask::RectangularMeshRefinedGenerator< dim >::fromXML ( XMLReader reader,
Manager manager 
)

Definition at line 412 of file generator_rectangular.cpp.

◆ generate() [1/7]

shared_ptr< MeshD< 1 > > plask::RectangularMeshRefinedGenerator< 1 >::generate ( const boost::shared_ptr< plask::GeometryObjectD< 2 > > &  geometry)

Definition at line 205 of file generator_rectangular.cpp.

◆ generate() [2/7]

shared_ptr< MeshD< 2 > > plask::RectangularMeshRefinedGenerator< 2 >::generate ( const boost::shared_ptr< plask::GeometryObjectD< 2 > > &  geometry)

Definition at line 213 of file generator_rectangular.cpp.

◆ generate() [3/7]

shared_ptr< MeshD< 1 > > plask::RectangularMeshRefinedGenerator< 1 >::generate ( const boost::shared_ptr< plask::GeometryObjectD< 2 > > &  geometry)

◆ generate() [4/7]

shared_ptr< MeshD< 2 > > plask::RectangularMeshRefinedGenerator< 2 >::generate ( const boost::shared_ptr< plask::GeometryObjectD< 2 > > &  geometry)

◆ generate() [5/7]

shared_ptr< MeshD< 3 > > plask::RectangularMeshRefinedGenerator< 3 >::generate ( const boost::shared_ptr< plask::GeometryObjectD< 3 > > &  geometry)

Definition at line 238 of file generator_rectangular.cpp.

◆ generate() [6/7]

shared_ptr< MeshD< 3 > > plask::RectangularMeshRefinedGenerator< 3 >::generate ( const boost::shared_ptr< plask::GeometryObjectD< 3 > > &  geometry)

◆ generate() [7/7]

template<int dim>
shared_ptr< MeshD< dim > > plask::RectangularMeshRefinedGenerator< dim >::generate ( const shared_ptr< GeometryObjectD< DIM > > &  geometry)
override

◆ getAspect()

template<int dim>
double plask::RectangularMeshRefinedGenerator< dim >::getAspect ( ) const
inline
Returns
true if the adjacent mesh elements cannot differ more than twice in size along each axis

Definition at line 276 of file generator_rectangular.hpp.

◆ getAxis()

template<int dim>
shared_ptr< OrderedAxis > plask::RectangularMeshRefinedGenerator< dim >::getAxis ( shared_ptr< OrderedAxis axis,
const shared_ptr< GeometryObjectD< DIM > > &  geometry,
size_t  dir 
)

Definition at line 166 of file generator_rectangular.cpp.

◆ getMinMax()

template<int dim>
std::pair< double, double > plask::RectangularMeshRefinedGenerator< dim >::getMinMax ( const shared_ptr< OrderedAxis > &  axis)

Definition at line 141 of file generator_rectangular.cpp.

◆ getRefinements()

template<int dim>
const Refinements & plask::RectangularMeshRefinedGenerator< dim >::getRefinements ( typename Primitive< DIM >::Direction  direction) const
inline
Returns
map of refinements
Parameters
directiondirection of the refinements

Definition at line 288 of file generator_rectangular.hpp.

◆ name()

◆ processAxis()

template<int dim>
virtual shared_ptr< OrderedAxis > plask::RectangularMeshRefinedGenerator< dim >::processAxis ( shared_ptr< OrderedAxis axis,
const shared_ptr< GeometryObjectD< DIM > > &  geometry,
size_t  dir 
)
pure virtual

◆ removeRefinement() [1/4]

template<int dim>
void plask::RectangularMeshRefinedGenerator< dim >::removeRefinement ( typename Primitive< DIM >::Direction  direction,
const GeometryObject::Subtree subtree,
double  position 
)
inline

Remove refinement from the mesh.

Parameters
directiondirection in which the object was refined
subtreesubtree to the refined object (only the last path is used)
positionposition of the additional grid line in the refined object

Definition at line 383 of file generator_rectangular.hpp.

◆ removeRefinement() [2/4]

template<int dim>
void plask::RectangularMeshRefinedGenerator< dim >::removeRefinement ( typename Primitive< DIM >::Direction  direction,
const Path path,
double  position 
)
inline

Remove refinement from the mesh.

Parameters
directiondirection in which the object was refined
pathpath to the refined object
positionposition of the additional grid line in the refined object

Definition at line 373 of file generator_rectangular.hpp.

◆ removeRefinement() [3/4]

template<int dim>
void plask::RectangularMeshRefinedGenerator< dim >::removeRefinement ( typename Primitive< DIM >::Direction  direction,
const weak_ptr< const GeometryObjectD< DIM > > &  object,
const PathHints path,
double  position 
)
inline

Remove refinement to the mesh.

Parameters
directiondirection in which the object was refined
objectrefined object
pathadditional path hints pointing to the refined object
positionposition of the additional grid line in the refined object

Definition at line 345 of file generator_rectangular.hpp.

◆ removeRefinement() [4/4]

template<int dim>
void plask::RectangularMeshRefinedGenerator< dim >::removeRefinement ( typename Primitive< DIM >::Direction  direction,
const weak_ptr< const GeometryObjectD< DIM > > &  object,
double  position 
)
inline

Remove refinement to the mesh.

Parameters
directiondirection in which the object was refined
objectrefined object
positionposition of the additional grid line in the refined object

Definition at line 363 of file generator_rectangular.hpp.

◆ removeRefinements() [1/3]

template<int dim>
void plask::RectangularMeshRefinedGenerator< dim >::removeRefinements ( const GeometryObject::Subtree subtree)
inline

Remove all refinements from the object.

Parameters
subtreesubtree to the refined object (only the last path is used)

Definition at line 428 of file generator_rectangular.hpp.

◆ removeRefinements() [2/3]

template<int dim>
void plask::RectangularMeshRefinedGenerator< dim >::removeRefinements ( const Path path)
inline

Remove all refinements from the object.

Parameters
pathpath to the refined object

Definition at line 420 of file generator_rectangular.hpp.

◆ removeRefinements() [3/3]

template<int dim>
void plask::RectangularMeshRefinedGenerator< dim >::removeRefinements ( const weak_ptr< const GeometryObjectD< DIM > > &  object,
const PathHints path = PathHints() 
)
inline

Remove all refinements from the object.

Parameters
objectrefined object
pathadditional path hints pointing to the refined object

Definition at line 393 of file generator_rectangular.hpp.

◆ setAspect()

template<int dim>
void plask::RectangularMeshRefinedGenerator< dim >::setAspect ( double  value)
inline
Parameters
valuetrue if the adjacent mesh elements cannot differ more than twice in size along each axis

Definition at line 279 of file generator_rectangular.hpp.

Member Data Documentation

◆ aspect

template<int dim>
double plask::RectangularMeshRefinedGenerator< dim >::aspect

Definition at line 252 of file generator_rectangular.hpp.

◆ refinements

template<int dim>
Refinements plask::RectangularMeshRefinedGenerator< dim >::refinements[dim]

Definition at line 254 of file generator_rectangular.hpp.


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