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 225 of file generator_rectangular.hpp.

Member Typedef Documentation

◆ GeneratedMeshType

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

Definition at line 226 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 229 of file generator_rectangular.hpp.

Constructor & Destructor Documentation

◆ RectangularMeshRefinedGenerator()

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

Create new generator.

Definition at line 252 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 318 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 308 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 280 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 296 of file generator_rectangular.hpp.

◆ clearRefinements()

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

Remove all refinements from all objects.

Definition at line 405 of file generator_rectangular.hpp.

◆ divideLargestSegment()

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

Definition at line 144 of file generator_rectangular.cpp.

◆ fromXML()

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

Definition at line 403 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 196 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 204 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 229 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 257 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 159 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 134 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 268 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 376 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 366 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 330 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 354 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 423 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 415 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 386 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 260 of file generator_rectangular.hpp.

Member Data Documentation

◆ aspect

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

Definition at line 231 of file generator_rectangular.hpp.

◆ refinements

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

Definition at line 233 of file generator_rectangular.hpp.


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