PLaSK library
|
Dividing generator ensuring no rapid change of element size. More...
#include <plask/mesh/generator_rectangular.hpp>
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< MeshGenerator > | Event |
Mesh generator event. | |
Public Member Functions | |
shared_ptr< OrderedAxis > | getAxis (shared_ptr< OrderedAxis > axis, const shared_ptr< GeometryObjectD< DIM > > &geometry, size_t dir) |
virtual shared_ptr< OrderedAxis > | processAxis (shared_ptr< OrderedAxis > axis, const shared_ptr< GeometryObjectD< DIM > > &geometry, size_t dir)=0 |
virtual const char * | name ()=0 |
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 | |
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, CacheRemoveOnEachChange > | cache |
Dividing generator ensuring no rapid change of element size.
Definition at line 245 of file generator_rectangular.hpp.
typedef Rectangular_t<dim>::Rectilinear plask::RectangularMeshRefinedGenerator< dim >::GeneratedMeshType |
Definition at line 247 of file generator_rectangular.hpp.
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.
|
inline |
Create new generator.
Definition at line 271 of file generator_rectangular.hpp.
|
inline |
Add refinement to the mesh.
direction | direction in which the object should be refined |
subtree | subtree to the refined object (only the last path is used) |
position | position of the additional grid line in the refined object |
Definition at line 333 of file generator_rectangular.hpp.
|
inline |
Add refinement to the mesh.
direction | direction in which the object should be refined |
path | path to the refined object |
position | position of the additional grid line in the refined object |
Definition at line 323 of file generator_rectangular.hpp.
|
inline |
Add refinement to the mesh.
direction | direction in which the object should be refined |
object | refined object |
path | additional path hints pointing to the refined object |
position | position of the additional grid line in the refined object |
Definition at line 300 of file generator_rectangular.hpp.
|
inline |
Add refinement to the mesh.
direction | direction in which the object should be refined |
object | refined object |
position | position of the additional grid line in the refined object |
Definition at line 313 of file generator_rectangular.hpp.
|
inline |
Remove all refinements from all objects.
Definition at line 410 of file generator_rectangular.hpp.
void plask::RectangularMeshRefinedGenerator< dim >::divideLargestSegment | ( | shared_ptr< OrderedAxis > | axis | ) |
Definition at line 151 of file generator_rectangular.cpp.
void plask::RectangularMeshRefinedGenerator< dim >::fromXML | ( | XMLReader & | reader, |
Manager & | manager | ||
) |
Definition at line 412 of file generator_rectangular.cpp.
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.
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.
shared_ptr< MeshD< 1 > > plask::RectangularMeshRefinedGenerator< 1 >::generate | ( | const boost::shared_ptr< plask::GeometryObjectD< 2 > > & | geometry | ) |
shared_ptr< MeshD< 2 > > plask::RectangularMeshRefinedGenerator< 2 >::generate | ( | const boost::shared_ptr< plask::GeometryObjectD< 2 > > & | geometry | ) |
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.
shared_ptr< MeshD< 3 > > plask::RectangularMeshRefinedGenerator< 3 >::generate | ( | const boost::shared_ptr< plask::GeometryObjectD< 3 > > & | geometry | ) |
|
override |
|
inline |
Definition at line 276 of file generator_rectangular.hpp.
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.
std::pair< double, double > plask::RectangularMeshRefinedGenerator< dim >::getMinMax | ( | const shared_ptr< OrderedAxis > & | axis | ) |
Definition at line 141 of file generator_rectangular.cpp.
|
inline |
direction | direction of the refinements |
Definition at line 288 of file generator_rectangular.hpp.
|
pure virtual |
Implemented in plask::RectangularMeshDivideGenerator< dim >, and plask::RectangularMeshSmoothGenerator< dim >.
|
pure virtual |
Implemented in plask::RectangularMeshDivideGenerator< dim >, and plask::RectangularMeshSmoothGenerator< dim >.
|
inline |
Remove refinement from the mesh.
direction | direction in which the object was refined |
subtree | subtree to the refined object (only the last path is used) |
position | position of the additional grid line in the refined object |
Definition at line 383 of file generator_rectangular.hpp.
|
inline |
Remove refinement from the mesh.
direction | direction in which the object was refined |
path | path to the refined object |
position | position of the additional grid line in the refined object |
Definition at line 373 of file generator_rectangular.hpp.
|
inline |
Remove refinement to the mesh.
direction | direction in which the object was refined |
object | refined object |
path | additional path hints pointing to the refined object |
position | position of the additional grid line in the refined object |
Definition at line 345 of file generator_rectangular.hpp.
|
inline |
Remove refinement to the mesh.
direction | direction in which the object was refined |
object | refined object |
position | position of the additional grid line in the refined object |
Definition at line 363 of file generator_rectangular.hpp.
|
inline |
Remove all refinements from the object.
subtree | subtree to the refined object (only the last path is used) |
Definition at line 428 of file generator_rectangular.hpp.
|
inline |
Remove all refinements from the object.
path | path to the refined object |
Definition at line 420 of file generator_rectangular.hpp.
|
inline |
Remove all refinements from the object.
object | refined object |
path | additional path hints pointing to the refined object |
Definition at line 393 of file generator_rectangular.hpp.
|
inline |
value | true if the adjacent mesh elements cannot differ more than twice in size along each axis |
Definition at line 279 of file generator_rectangular.hpp.
double plask::RectangularMeshRefinedGenerator< dim >::aspect |
Definition at line 252 of file generator_rectangular.hpp.
Refinements plask::RectangularMeshRefinedGenerator< dim >::refinements[dim] |
Definition at line 254 of file generator_rectangular.hpp.