PLaSK library
Loading...
Searching...
No Matches
plask::RectangularMeshDivideGenerator< dim > Struct Template Reference

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

#include <plask/mesh/generator_rectangular.hpp>

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

Public Types

typedef Rectangular_t< dim >::Rectilinear GeneratedMeshType
 
- Public Types inherited from plask::RectangularMeshRefinedGenerator< dim >
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< OrderedAxisprocessAxis (shared_ptr< OrderedAxis > axis, const shared_ptr< GeometryObjectD< DIM > > &geometry, size_t dir) override
 
const charname () override
 
 RectangularMeshDivideGenerator ()
 Create new generator.
 
size_t getPreDivision (typename Primitive< DIM >::Direction direction) const
 Get initial division of the smallest object in the mesh.
 
void setPreDivision (typename Primitive< DIM >::Direction direction, size_t div)
 Set initial division of the smallest object in the mesh.
 
size_t getPostDivision (typename Primitive< DIM >::Direction direction) const
 Get final division of the smallest object in the mesh.
 
void setPostDivision (typename Primitive< DIM >::Direction direction, size_t div)
 Set final division of the smallest object in the mesh.
 
bool getGradual (size_t dir) const
 
void setGradual (size_t dir, bool value)
 
bool getGradual (typename Primitive< DIM >::Direction direction) const
 
void setGradual (typename Primitive< DIM >::Direction direction, bool value)
 
- Public Member Functions inherited from plask::RectangularMeshRefinedGenerator< dim >
shared_ptr< OrderedAxisgetAxis (shared_ptr< OrderedAxis > axis, const shared_ptr< GeometryObjectD< DIM > > &geometry, size_t dir)
 
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

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

Friends

template<int fd>
shared_ptr< MeshGeneratorreadRectangularDivideGenerator (XMLReader &, Manager &)
 

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::RectangularMeshDivideGenerator< dim >

Dividing generator ensuring no rapid change of element size.

Definition at line 447 of file generator_rectangular.hpp.

Member Typedef Documentation

◆ GeneratedMeshType

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

Definition at line 449 of file generator_rectangular.hpp.

Constructor & Destructor Documentation

◆ RectangularMeshDivideGenerator()

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

Create new generator.

Definition at line 467 of file generator_rectangular.hpp.

Member Function Documentation

◆ getGradual() [1/2]

template<int dim>
bool plask::RectangularMeshDivideGenerator< dim >::getGradual ( size_t  dir) const
inline
Returns
true if the adjacent mesh elements cannot differ more than twice in size along axis dir

Definition at line 502 of file generator_rectangular.hpp.

◆ getGradual() [2/2]

template<int dim>
bool plask::RectangularMeshDivideGenerator< dim >::getGradual ( typename Primitive< DIM >::Direction  direction) const
inline
Returns
true if the adjacent mesh elements cannot differ more than twice in size along axis direction

Definition at line 516 of file generator_rectangular.hpp.

◆ getPostDivision()

template<int dim>
size_t plask::RectangularMeshDivideGenerator< dim >::getPostDivision ( typename Primitive< DIM >::Direction  direction) const
inline

Get final division of the smallest object in the mesh.

Definition at line 489 of file generator_rectangular.hpp.

◆ getPreDivision()

template<int dim>
size_t plask::RectangularMeshDivideGenerator< dim >::getPreDivision ( typename Primitive< DIM >::Direction  direction) const
inline

Get initial division of the smallest object in the mesh.

Definition at line 476 of file generator_rectangular.hpp.

◆ name()

template<int dim>
const char * plask::RectangularMeshDivideGenerator< dim >::name ( )
inlineoverridevirtual

◆ processAxis()

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

◆ setGradual() [1/2]

template<int dim>
void plask::RectangularMeshDivideGenerator< dim >::setGradual ( size_t  dir,
bool  value 
)
inline
Parameters
valuetrue if the adjacent mesh elements cannot differ more than twice in size along axis dir

Definition at line 508 of file generator_rectangular.hpp.

◆ setGradual() [2/2]

template<int dim>
void plask::RectangularMeshDivideGenerator< dim >::setGradual ( typename Primitive< DIM >::Direction  direction,
bool  value 
)
inline
Parameters
valuetrue if the adjacent mesh elements cannot differ more than twice in size along axis direction

Definition at line 521 of file generator_rectangular.hpp.

◆ setPostDivision()

template<int dim>
void plask::RectangularMeshDivideGenerator< dim >::setPostDivision ( typename Primitive< DIM >::Direction  direction,
size_t  div 
)
inline

Set final division of the smallest object in the mesh.

Definition at line 495 of file generator_rectangular.hpp.

◆ setPreDivision()

template<int dim>
void plask::RectangularMeshDivideGenerator< dim >::setPreDivision ( typename Primitive< DIM >::Direction  direction,
size_t  div 
)
inline

Set initial division of the smallest object in the mesh.

Definition at line 482 of file generator_rectangular.hpp.

Friends And Related Symbol Documentation

◆ readRectangularDivideGenerator

template<int dim>
template<int fd>
shared_ptr< MeshGenerator > readRectangularDivideGenerator ( XMLReader reader,
Manager manager 
)
friend

Definition at line 564 of file generator_rectangular.cpp.

Member Data Documentation

◆ gradual

template<int dim>
char plask::RectangularMeshDivideGenerator< dim >::gradual

Definition at line 455 of file generator_rectangular.hpp.

◆ post_divisions

template<int dim>
size_t plask::RectangularMeshDivideGenerator< dim >::post_divisions[dim]

Definition at line 453 of file generator_rectangular.hpp.

◆ pre_divisions

template<int dim>
size_t plask::RectangularMeshDivideGenerator< dim >::pre_divisions[dim]

Definition at line 452 of file generator_rectangular.hpp.


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