PLaSK library

Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | Friends | List of all members
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< MeshGenerator > | Event
| Mesh generator event.

## Public Member Functions
shared_ptr< OrderedAxis > | processAxis (shared_ptr< OrderedAxis > axis, const shared_ptr< GeometryObjectD< DIM > > &geometry, size_t dir) override
const char * | name () 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< OrderedAxis > | getAxis (shared_ptr< OrderedAxis > axis, const shared_ptr< GeometryObjectD< DIM > > &geometry, size_t dir)
void | fromXML (XMLReader &, Manager &)
std::pair< double, double > | getMinMax (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 Refinements & | getRefinements (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< 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.
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]
unsigned 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< MeshGenerator > | readRectangularDivideGenerator (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, CacheRemoveOnEachChange > | cache

## Detailed Description

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

Dividing generator ensuring no rapid change of element size.

Definition at line 443 of file generator_rectangular.hpp.

## Member Typedef Documentation

## ◆ GeneratedMeshType

template<int dim>

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

Definition at line 444 of file generator_rectangular.hpp.

## Constructor & Destructor Documentation

## ◆ RectangularMeshDivideGenerator()

template<int dim>

plask::RectangularMeshDivideGenerator< dim >::RectangularMeshDivideGenerator | ( |  | ) |
| inline

Create new generator.

Definition at line 463 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 497 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 511 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 484 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 471 of file generator_rectangular.hpp.

## ◆ name()

template<int dim>

const char * plask::RectangularMeshDivideGenerator< dim >::name | ( |  | ) |
| inline override virtual

Implements plask::RectangularMeshRefinedGenerator< dim >.

Definition at line 456 of file generator_rectangular.hpp.

## ◆ processAxis()

template<int dim>

shared_ptr< OrderedAxis > plask::RectangularMeshDivideGenerator< dim >::processAxis | ( | shared_ptr< OrderedAxis > | axis,
|  | const shared_ptr< GeometryObjectD< DIM > > & | geometry,
|  | size_t | dir
| ) |  |
| override virtual

Implements plask::RectangularMeshRefinedGenerator< dim >.

Definition at line 260 of file generator_rectangular.cpp.

## ◆ setGradual() [1/2]

template<int dim>

void plask::RectangularMeshDivideGenerator< dim >::setGradual | ( | size_t | dir,
|  | bool | value
| ) |  |
| inline

Parameters

  value | true if the adjacent mesh elements cannot differ more than twice in size along axis `dir`

Definition at line 503 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

  value | true if the adjacent mesh elements cannot differ more than twice in size along axis `direction`

Definition at line 514 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 490 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 477 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 555 of file generator_rectangular.cpp.

## Member Data Documentation

## ◆ gradual

template<int dim>

unsigned char plask::RectangularMeshDivideGenerator< dim >::gradual

Definition at line 450 of file generator_rectangular.hpp.

## ◆ post_divisions

template<int dim>

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

Definition at line 448 of file generator_rectangular.hpp.

## ◆ pre_divisions

template<int dim>

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

Definition at line 447 of file generator_rectangular.hpp.

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

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