PLaSK library

Loading...
Searching...
No Matches
Classes | Public Member Functions | Public Attributes | Protected Member Functions | List of all members
plask::Mesh Struct Referenceabstract

Base class for all the meshes. More...

`#include <plask/mesh/mesh.hpp>`

Inheritance diagram for plask::Mesh:
[legend]
Collaboration diagram for plask::Mesh:
[legend]

## Classes
struct | Event
| Store information about event connected with mesh. More...

## Public Member Functions
template<typename ClassT , typename methodT >
boost::signals2::connection | 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.
void | fireResized ()
| This method is called when the mesh is resized.
virtual std::size_t | size () const =0
virtual bool | empty () const
virtual void | writeXML (XMLElement &object) const
| Write mesh to XML.
virtual | ~Mesh ()
Public Member Functions inherited from plask::Printable
virtual void | print (std::ostream &out) const =0
| Print this to stream `out`.
virtual | ~Printable ()
std::string | str () const
| Get string representation of this using print method.
Public Member Functions inherited from plask::MeshBase
virtual | ~MeshBase ()

## Public Attributes
boost::signals2::signal< void(Event &)> | changed
| Changed signal, fired when mesh was changed.

## Protected Member Functions
virtual void | onChange (const Event &evt)
| This method is called when the mesh is changed, just before changed signal.

## Detailed Description

Base class for all the meshes.

Mesh represent a set of points in 2D or 3D space and:

- knows number of points,
- allows for iterate over this points,
- can calculate interpolated value for given destination points, source values, and the interpolation method,
- inform about self changes.

See also
  Meshes

Definition at line 134 of file mesh.hpp.

## Constructor & Destructor Documentation

## ◆ ~Mesh()

virtual plask::Mesh::~Mesh | ( |  | ) |
| inline virtual

Definition at line 223 of file mesh.hpp.

## Member Function Documentation

## ◆ changedConnectMethod()

template<typename ClassT , typename methodT >

boost::signals2::connection plask::Mesh::changedConnectMethod | ( | ClassT * | obj,
|  | methodT | method,
|  | boost::signals2::connect_position | at = `boost::signals2::at_back`
| ) |  |
| inline

Connect a method to changed signal.

Parameters

  obj,method | slot to connect, object and it's method
  at | specifies where the slot should be connected: boost::signals2::at_front indicates that the slot will be connected at the front of the list or group of slots boost::signals2::at_back (default) indicates that the slot will be connected at the back of the list or group of slots

Definition at line 188 of file mesh.hpp.

## ◆ changedDisconnectMethod()

template<typename ClassT , typename methodT >

void plask::Mesh::changedDisconnectMethod | ( | ClassT * | obj,
|  | methodT | method
| ) |  |
| inline

Definition at line 193 of file mesh.hpp.

## ◆ empty()

virtual bool plask::Mesh::empty | ( |  | ) | const
| inline virtual

Returns
  `true` only if mesh is empty (there are no points in mesh)

Reimplemented in plask::ExtrudedTriangularMesh3D, plask::RectangularMesh2D, plask::RectangularMaskedMeshBase< DIM >::ElementMeshBase< MaskedMeshType >, plask::RectilinearMesh3D, plask::RegularAxis, and plask::TriangularMesh2D.

Definition at line 215 of file mesh.hpp.

## ◆ fireChanged()

template<typename EventT = Event, typename ... Args>

void plask::Mesh::fireChanged | ( | Args &&... | event_constructor_params_without_source | ) |
| inline

Call changed with this as event source.

Parameters

  event_constructor_params_without_source | parameters for event constructor (without first - source)

Definition at line 202 of file mesh.hpp.

## ◆ fireResized()

void plask::Mesh::fireResized | ( |  | ) |
| inline

This method is called when the mesh is resized.

Definition at line 209 of file mesh.hpp.

## ◆ onChange()

void plask::Mesh::onChange | ( | const Event & | evt | ) |
| protected virtual

This method is called when the mesh is changed, just before changed signal.

Parameters

  evt | triggering event

Definition at line 22 of file mesh.cpp.

## ◆ size()

virtual std::size_t plask::Mesh::size | ( |  | ) | const
| pure virtual

Returns
  number of points in mesh

Implemented in plask::optical::modal::LevelsAdapterRectangular< dim >::Mesh, plask::optical::modal::LevelsAdapterRectangular< dim >::Mesh, plask::MidpointAxis, plask::OnePointAxis, plask::OnePointMesh< DIM >, plask::TranslatedMesh< DIM >, plask::EquilateralMesh3D::Transformed, plask::ExtrudedTriangularMesh3D, plask::ExtrudedTriangularMesh3D::ElementMesh, plask::detail::FlatMesh, plask::LateralMesh3D< MeshT >, plask::MultiLateralMesh3D< MeshT >, plask::OrderedAxis, plask::RectangularMesh2D, plask::RectangularMaskedMeshBase< DIM >::ElementMeshBase< MaskedMeshType >, plask::RectilinearMesh3D, plask::RegularAxis, plask::ReductionTo2DMesh, plask::CylReductionTo2DMesh, plask::CartesianMesh2DTo3D, plask::CartesianMesh2DTo3DExtend, plask::PointsOnCircleMeshExtend, plask::TriangularMesh2D, plask::TriangularMesh2D::ElementMesh, plask::gain::freecarrier::ActiveRegionMesh, plask::optical::modal::LevelsAdapterGeneric< dim >::Mesh, and plask::optical::modal::LevelsAdapterRectangular< dim >::Mesh.

## ◆ writeXML()

void plask::Mesh::writeXML | ( | XMLElement & | object | ) | const
| virtual

Write mesh to XML.

Parameters

  object | XML object to write to

Reimplemented in plask::OnePointMesh< DIM >, plask::OnePointMesh< DIM >, plask::OnePointMesh< DIM >, plask::OnePointMesh< DIM >, plask::OnePointMesh< DIM >, plask::ExtrudedTriangularMesh3D, plask::OrderedAxis, plask::RectangularMesh2D, plask::RectangularMesh3D, plask::RegularAxis, and plask::TriangularMesh2D.

Definition at line 18 of file mesh.cpp.

## Member Data Documentation

## ◆ changed

boost::signals2::signal<void(Event&)> plask::Mesh::changed

Changed signal, fired when mesh was changed.

Definition at line 178 of file mesh.hpp.

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

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