PLaSK library

Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Friends | List of all members
plask::TriangularMesh2D Struct Reference

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

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

## Classes
struct | Builder
| Instance of this class allows for adding triangles to the mesh effectively. More...
struct | Element
| Represent FEM-like element (triangle) in TriangularMesh2D. More...
struct | ElementIndex
| Index which allows for fast finding elements which includes particular points. More...
class | ElementMesh
struct | Elements
| Wrapper to TriangularMesh2D which allows for accessing FEM-like elements. More...

## Public Types
typedef plask::Boundary< TriangularMesh2D > | Boundary
| Boundary type.
typedef std::vector< LocalCoords > | LocalCoordsVec
typedef LocalCoordsVec::const_iterator | const_iterator
typedef const_iterator | iterator
typedef std::array< std::size_t, 3 > | TriangleNodeIndexes
typedef std::function< bool(const Element &)> | Predicate
| Type of predicate function which returns bool for given element of a mesh.
typedef std::pair< std::size_t, std::size_t > | Segment
| Segment (two-element set of node indices) represented by a pair of indices such that first < second.
typedef std::unordered_map< TriangularMesh2D::Segment, std::size_t, boost::hash< Segment > > | SegmentsCounts
| Map segments to their counts.
Public Types inherited from plask::MeshD< 2 >
enum |
| Number of dimensions. More...
typedef Primitive< DIM >::DVec | LocalCoords
| Type of vector representing coordinates in local space.
typedef IndexedIterator< const MeshD< dimension >, LocalCoords > | const_iterator
| Random access iterator type which allow iterate over all points in this mesh, in order appointed by operator[].
typedef const_iterator | iterator
typedef const_iterator | Iterator

## Public Member Functions
Elements | getElements () const
Elements | elements () const
Element | getElement (std::size_t elementIndex) const
Element | element (std::size_t elementIndex) const
std::size_t | getElementsCount () const
| Get number of elements (triangles) in this mesh.
shared_ptr< ElementMesh > | getElementMesh () const
| Return a mesh that enables iterating over middle points of the rectangles.
LocalCoords | at (std::size_t index) const override
| Get point with given mesh index.
std::size_t | size () const override
bool | empty () const override
const_iterator | begin () const
const_iterator | end () const
TriangularMesh2D | masked (const Predicate &predicate) const
| Construct masked mesh with elements of `this` chosen by a `predicate`.
TriangularMesh2D | masked (const GeometryD< 2 > &geom, const std::function< bool(shared_ptr< const Material >)> materialPredicate) const
| Construct masked mesh with all elements of `this` which have required materials in the midpoints.
TriangularMesh2D | masked (const GeometryD< 2 > &geom, unsigned materialKinds) const
| Construct masked mesh with all elements of `this` which have required kinds of materials (in the midpoints).
void | writeXML (XMLElement &object) const override
| Write mesh to XML.
SegmentsCounts | countSegments () const
| Calculate numbers of segments (sides of triangles).
SegmentsCounts | countSegmentsIn (const Box2D &box) const
| Calculate numbers of segments (sides of triangles) inside a `box`.
SegmentsCounts | countSegmentsIn (const std::vector< Box2D > &boxes) const
| Calculate numbers of segments (sides of triangles) inside any of `boxes` member.
SegmentsCounts | countSegmentsIn (const GeometryD< 2 > &geometry, const GeometryObject &object, const PathHints *path=nullptr) const
| Calculate numbers of segments (sides of triangles) inside of `object`.
Public Member Functions inherited from plask::MeshD< 2 >
LocalCoords | operator[] (std::size_t index) const
| Get point with given mesh index.
const_iterator | begin () const
const_iterator | end () const
| MeshD (const MeshD &PLASK_UNUSED(to_copy))
| Initialize this to be the same as `to_copy` but don't copy any changes observer.
| MeshD ()
MeshD & | operator= (const MeshD &PLASK_UNUSED(to_copy))
| Set this to be the same as `to_copy` but doesn't changed changes observer.
bool | operator== (const MeshD &to_compare) const
| Check if this mesh and `to_compare` represent the same sequence of points (have exactly the same points in the same order).
bool | operator!= (const MeshD &to_compare) const
| Check if this mesh and `to_compare` represent different sequences of points.
void | print (std::ostream &out) const override
| Print this to stream `out`.
Public Member Functions inherited from plask::Mesh
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 | ~Mesh ()
Public Member Functions inherited from plask::Printable
virtual | ~Printable ()
std::string | str () const
| Get string representation of this using print method.
Public Member Functions inherited from plask::MeshBase
virtual | ~MeshBase ()

## Static Public Member Functions
static TriangularMesh2D | read (XMLReader &reader)
| Construct new mesh with data from XPL file.
template<typename Predicate >
static Boundary | getBoundary (Predicate predicate)
static Boundary | getAllBoundary ()
| Get boundary which describes all nodes which lies on all (outer and inner) boundaries of the whole mesh.
static Boundary | getRightBoundary ()
| Get boundary which describes all nodes which lies on outer right boundary of the whole mesh.
static Boundary | getTopBoundary ()
| Get boundary which describes all nodes which lies on outer top boundary of the whole mesh.
static Boundary | getLeftBoundary ()
| Get boundary which describes all nodes which lies on outer left boundary of the whole mesh.
static Boundary | getBottomBoundary ()
| Get boundary which describes all nodes which lies on outer bottom boundary of the whole mesh.
static Boundary | getAllBoundaryIn (const Box2D &box)
| Get boundary which describes all nodes which lies on all (outer and inner) boundaries of a given `box`.
static Boundary | getRightOfBoundary (const Box2D &box)
| Get boundary which describes all nodes which lies on right boundary of a given `box`.
static Boundary | getLeftOfBoundary (const Box2D &box)
| Get boundary which describes all nodes which lies on left boundary of a given `box`.
static Boundary | getTopOfBoundary (const Box2D &box)
| Get boundary which describes all nodes which lies on top boundary of a given `box`.
static Boundary | getBottomOfBoundary (const Box2D &box)
| Get boundary which describes all nodes which lies on bottom boundary of a given `box`.
static Boundary | getAllBoundaryIn (const std::vector< Box2D > &boxes)
| Get boundary which describes all nodes which lies on all (outer and inner) boundaries of a given `boxes`.
static Boundary | getRightOfBoundary (const std::vector< Box2D > &boxes)
| Get boundary which describes all nodes which lies on right boundaries of a given `boxes`.
static Boundary | getLeftOfBoundary (const std::vector< Box2D > &boxes)
| Get boundary which describes all nodes which lies on left boundaries of a given `boxes`.
static Boundary | getTopOfBoundary (const std::vector< Box2D > &boxes)
| Get boundary which describes all nodes which lies on top boundaries of a given `boxes`.
static Boundary | getBottomOfBoundary (const std::vector< Box2D > &boxes)
| Get boundary which describes all nodes which lies on bottom boundaries of a given `boxes`.
static Boundary | getAllBoundaryIn (shared_ptr< const GeometryObject > object)
| Get boundary which describes all nodes which lies on all (outer and inner) boundaries of a given `object`.
static Boundary | getRightOfBoundary (shared_ptr< const GeometryObject > object)
| Get boundary which describes all nodes which lies on outer right boundary of a given `object`.
static Boundary | getLeftOfBoundary (shared_ptr< const GeometryObject > object)
| Get boundary which describes all nodes which lies on outer left boundary of a given `object`.
static Boundary | getTopOfBoundary (shared_ptr< const GeometryObject > object)
| Get boundary which describes all nodes which lies on outer top boundary of a given `object`.
static Boundary | getBottomOfBoundary (shared_ptr< const GeometryObject > object)
| Get boundary which describes all nodes which lies on outer bottom boundary of a given `object`.
static Boundary | getAllBoundaryIn (shared_ptr< const GeometryObject > object, const PathHints &path)
| Get boundary which describes all nodes which lies on all (outer and inner) boundaries of a given `object`.
static Boundary | getAllBoundaryIn (shared_ptr< const GeometryObject > object, const PathHints *path)
| Get boundary which describes all nodes which lies on all (outer and inner) boundaries of a given `object`.
static Boundary | getRightOfBoundary (shared_ptr< const GeometryObject > object, const PathHints &path)
| Get boundary which describes all nodes which lies on outer right boundary of a given `object`.
static Boundary | getRightOfBoundary (shared_ptr< const GeometryObject > object, const PathHints *path)
| Get boundary which describes all nodes which lies on outer right boundary of a given `object`.
static Boundary | getLeftOfBoundary (shared_ptr< const GeometryObject > object, const PathHints &path)
| Get boundary which describes all nodes which lies on outer left boundary of a given `object`.
static Boundary | getLeftOfBoundary (shared_ptr< const GeometryObject > object, const PathHints *path)
| Get boundary which describes all nodes which lies on outer left boundary of a given `object`.
static Boundary | getTopOfBoundary (shared_ptr< const GeometryObject > object, const PathHints &path)
| Get boundary which describes all nodes which lies on outer top boundary of a given `object`.
static Boundary | getTopOfBoundary (shared_ptr< const GeometryObject > object, const PathHints *path)
| Get boundary which describes all nodes which lies on outer top boundary of a given `object`.
static Boundary | getBottomOfBoundary (shared_ptr< const GeometryObject > object, const PathHints &path)
| Get boundary which describes all nodes which lies on outer bottom boundary of a given `object`.
static Boundary | getBottomOfBoundary (shared_ptr< const GeometryObject > object, const PathHints *path)
| Get boundary which describes all nodes which lies on outer bottom boundary of a given `object`.
static Boundary | getBoundary (const std::string &boundary_desc)
static Boundary | getBoundary (XMLReader &boundary_desc, Manager &manager)

## Public Attributes
LocalCoordsVec | nodes
std::vector< TriangleNodeIndexes > | elementNodes
Public Attributes inherited from plask::Mesh
boost::signals2::signal< void(Event &)> | changed
| Changed signal, fired when mesh was changed.

## Friends
struct | ExtrudedTriangularMesh3D

## Additional Inherited Members
Protected Member Functions inherited from plask::MeshD< 2 >
virtual bool | hasSameNodes (const MeshD< dimension > &to_compare) const
| Check if this mesh and `to_compare` represent the same sequence of points (have exactly the same points in the same order).
Protected Member Functions inherited from plask::Mesh
virtual void | onChange (const Event &evt)
| This method is called when the mesh is changed, just before changed signal.

## Detailed Description

Definition at line 32 of file triangular2d.hpp.

## Member Typedef Documentation

## ◆ Boundary

typedef plask::Boundary<TriangularMesh2D> plask::TriangularMesh2D::Boundary

Boundary type.

Definition at line 37 of file triangular2d.hpp.

## ◆ const_iterator

typedef LocalCoordsVec::const_iterator plask::TriangularMesh2D::const_iterator

Definition at line 41 of file triangular2d.hpp.

## ◆ iterator

typedef const_iterator plask::TriangularMesh2D::iterator

Definition at line 42 of file triangular2d.hpp.

## ◆ LocalCoordsVec

typedef std::vector<LocalCoords> plask::TriangularMesh2D::LocalCoordsVec

Definition at line 40 of file triangular2d.hpp.

## ◆ Predicate

typedef std::function<bool(const Element&)> plask::TriangularMesh2D::Predicate

Type of predicate function which returns bool for given element of a mesh.

Definition at line 321 of file triangular2d.hpp.

## ◆ Segment

typedef std::pair<std::size_t, std::size_t> plask::TriangularMesh2D::Segment

Segment (two-element set of node indices) represented by a pair of indices such that first < second.

Definition at line 377 of file triangular2d.hpp.

## ◆ SegmentsCounts

typedef std::unordered_map<TriangularMesh2D::Segment, std::size_t, boost::hash<Segment> > plask::TriangularMesh2D::SegmentsCounts

Map segments to their counts.

Definition at line 380 of file triangular2d.hpp.

## ◆ TriangleNodeIndexes

typedef std::array<std::size_t, 3> plask::TriangularMesh2D::TriangleNodeIndexes

Definition at line 46 of file triangular2d.hpp.

## Member Function Documentation

## ◆ at()

LocalCoords plask::TriangularMesh2D::at | ( | std::size_t | index | ) | const
| inline override virtual

Get point with given mesh index.

Parameters

  index | index of point, from 0 to size()-1

Returns
  point with given `index`

Implements plask::MeshD< 2 >.

Definition at line 301 of file triangular2d.hpp.

## ◆ begin()

const_iterator plask::TriangularMesh2D::begin | ( |  | ) | const
| inline

Definition at line 315 of file triangular2d.hpp.

## ◆ countSegments()

TriangularMesh2D::SegmentsCounts plask::TriangularMesh2D::countSegments | ( |  | ) | const

Calculate numbers of segments (sides of triangles).

Returns
  the numbers of segments

Definition at line 149 of file triangular2d.cpp.

## ◆ countSegmentsIn() [1/3]

TriangularMesh2D::SegmentsCounts plask::TriangularMesh2D::countSegmentsIn | ( | const Box2D & | box | ) | const

Calculate numbers of segments (sides of triangles) inside a `box`.

Parameters

  box | a region in which segments should be counted

Returns
  the numbers of segments

Definition at line 155 of file triangular2d.cpp.

## ◆ countSegmentsIn() [2/3]

TriangularMesh2D::SegmentsCounts plask::TriangularMesh2D::countSegmentsIn | ( | const GeometryD< 2 > & | geometry,
|  | const GeometryObject & | object,
|  | const PathHints * | path = `nullptr`
| ) |  | const

Calculate numbers of segments (sides of triangles) inside of `object`.

Parameters

  geometry | geometry (of the mesh) which contains an object
  object | object to test
  path | path hints specifying the object

Returns
  the numbers of segments

Definition at line 180 of file triangular2d.cpp.

## ◆ countSegmentsIn() [3/3]

TriangularMesh2D::SegmentsCounts plask::TriangularMesh2D::countSegmentsIn | ( | const std::vector< Box2D > & | boxes | ) | const

Calculate numbers of segments (sides of triangles) inside any of `boxes` member.

Parameters

  box | vector of boxes that describes a region in which segments should be counted

Returns
  the numbers of segments

Definition at line 163 of file triangular2d.cpp.

## ◆ element()

Element plask::TriangularMesh2D::element | ( | std::size_t | elementIndex | ) | const
| inline

Definition at line 177 of file triangular2d.hpp.

## ◆ elements()

Elements plask::TriangularMesh2D::elements | ( |  | ) | const
| inline

Definition at line 171 of file triangular2d.hpp.

## ◆ empty()

bool plask::TriangularMesh2D::empty | ( |  | ) | const
| inline override virtual

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

Reimplemented from plask::Mesh.

Definition at line 310 of file triangular2d.hpp.

## ◆ end()

const_iterator plask::TriangularMesh2D::end | ( |  | ) | const
| inline

Definition at line 316 of file triangular2d.hpp.

## ◆ getAllBoundary()

static Boundary plask::TriangularMesh2D::getAllBoundary | ( |  | ) |
| inline static

Get boundary which describes all nodes which lies on all (outer and inner) boundaries of the whole mesh.

Returns
  the boundary

Definition at line 463 of file triangular2d.hpp.

## ◆ getAllBoundaryIn() [1/5]

static Boundary plask::TriangularMesh2D::getAllBoundaryIn | ( | const Box2D & | box | ) |
| inline static

Get boundary which describes all nodes which lies on all (outer and inner) boundaries of a given `box`.

Parameters

  box | box which describes a region

Returns
  the boundary

Definition at line 498 of file triangular2d.hpp.

## ◆ getAllBoundaryIn() [2/5]

static Boundary plask::TriangularMesh2D::getAllBoundaryIn | ( | const std::vector< Box2D > & | boxes | ) |
| inline static

Get boundary which describes all nodes which lies on all (outer and inner) boundaries of a given `boxes`.

Parameters

  boxes | vector of boxes that describes a region

Returns
  the boundary

Definition at line 537 of file triangular2d.hpp.

## ◆ getAllBoundaryIn() [3/5]

static Boundary plask::TriangularMesh2D::getAllBoundaryIn | ( | shared_ptr< const GeometryObject > | object | ) |
| inline static

Get boundary which describes all nodes which lies on all (outer and inner) boundaries of a given `object`.

Parameters

  object | object to test

Returns
  the boundary

Definition at line 576 of file triangular2d.hpp.

## ◆ getAllBoundaryIn() [4/5]

static Boundary plask::TriangularMesh2D::getAllBoundaryIn | ( | shared_ptr< const GeometryObject > | object,
|  | const PathHints & | path
| ) |  |
| inline static

Get boundary which describes all nodes which lies on all (outer and inner) boundaries of a given `object`.

Parameters

  object | object to test
  path | path hints specifying the object

Returns
  the boundary

Definition at line 617 of file triangular2d.hpp.

## ◆ getAllBoundaryIn() [5/5]

static Boundary plask::TriangularMesh2D::getAllBoundaryIn | ( | shared_ptr< const GeometryObject > | object,
|  | const PathHints * | path
| ) |  |
| inline static

Get boundary which describes all nodes which lies on all (outer and inner) boundaries of a given `object`.

Parameters

  object | object to test
  path | (optional) path hints specifying the object

Returns
  the boundary

Definition at line 629 of file triangular2d.hpp.

## ◆ getBottomBoundary()

TriangularMesh2D::Boundary plask::TriangularMesh2D::getBottomBoundary | ( |  | ) |
| static

Get boundary which describes all nodes which lies on outer bottom boundary of the whole mesh.

Returns
  the boundary

Definition at line 350 of file triangular2d.cpp.

## ◆ getBottomOfBoundary() [1/5]

TriangularMesh2D::Boundary plask::TriangularMesh2D::getBottomOfBoundary | ( | const Box2D & | box | ) |
| static

Get boundary which describes all nodes which lies on bottom boundary of a given `box`.

Parameters

  box | box which describes a region

Returns
  the boundary

Definition at line 374 of file triangular2d.cpp.

## ◆ getBottomOfBoundary() [2/5]

TriangularMesh2D::Boundary plask::TriangularMesh2D::getBottomOfBoundary | ( | const std::vector< Box2D > & | boxes | ) |
| static

Get boundary which describes all nodes which lies on bottom boundaries of a given `boxes`.

Parameters

  boxes | vector of boxes that describes a region

Returns
  the boundary

Definition at line 398 of file triangular2d.cpp.

## ◆ getBottomOfBoundary() [3/5]

TriangularMesh2D::Boundary plask::TriangularMesh2D::getBottomOfBoundary | ( | shared_ptr< const GeometryObject > | object | ) |
| static

Get boundary which describes all nodes which lies on outer bottom boundary of a given `object`.

Parameters

  object | object to test

Returns
  the boundary

Definition at line 440 of file triangular2d.cpp.

## ◆ getBottomOfBoundary() [4/5]

TriangularMesh2D::Boundary plask::TriangularMesh2D::getBottomOfBoundary | ( | shared_ptr< const GeometryObject > | object,
|  | const PathHints & | path
| ) |  |
| static

Get boundary which describes all nodes which lies on outer bottom boundary of a given `object`.

Parameters

  object | object to test
  path | path hints specifying the object

Returns
  the boundary

Definition at line 446 of file triangular2d.cpp.

## ◆ getBottomOfBoundary() [5/5]

static Boundary plask::TriangularMesh2D::getBottomOfBoundary | ( | shared_ptr< const GeometryObject > | object,
|  | const PathHints * | path
| ) |  |
| inline static

Get boundary which describes all nodes which lies on outer bottom boundary of a given `object`.

Parameters

  object | object to test
  path | (optional) path hints specifying the object

Returns
  the boundary

Definition at line 701 of file triangular2d.hpp.

## ◆ getBoundary() [1/3]

TriangularMesh2D::Boundary plask::TriangularMesh2D::getBoundary | ( | const std::string & | boundary_desc | ) |
| static

Definition at line 452 of file triangular2d.cpp.

## ◆ getBoundary() [2/3]

template<typename Predicate >

static Boundary plask::TriangularMesh2D::getBoundary | ( | Predicate | predicate | ) |
| inline static

Definition at line 372 of file triangular2d.hpp.

## ◆ getBoundary() [3/3]

TriangularMesh2D::Boundary plask::TriangularMesh2D::getBoundary | ( | XMLReader & | boundary_desc,
|  | Manager & | manager
| ) |  |
| static

Definition at line 461 of file triangular2d.cpp.

## ◆ getElement()

Element plask::TriangularMesh2D::getElement | ( | std::size_t | elementIndex | ) | const
| inline

Definition at line 173 of file triangular2d.hpp.

## ◆ getElementMesh()

shared_ptr< ElementMesh > plask::TriangularMesh2D::getElementMesh | ( |  | ) | const
| inline

Return a mesh that enables iterating over middle points of the rectangles.

Returns
  the mesh

Definition at line 264 of file triangular2d.hpp.

## ◆ getElements()

Elements plask::TriangularMesh2D::getElements | ( |  | ) | const
| inline

Definition at line 170 of file triangular2d.hpp.

## ◆ getElementsCount()

std::size_t plask::TriangularMesh2D::getElementsCount | ( |  | ) | const
| inline

Get number of elements (triangles) in this mesh.

Returns
  number of elements

Definition at line 185 of file triangular2d.hpp.

## ◆ getLeftBoundary()

TriangularMesh2D::Boundary plask::TriangularMesh2D::getLeftBoundary | ( |  | ) |
| static

Get boundary which describes all nodes which lies on outer left boundary of the whole mesh.

Returns
  the boundary

Definition at line 344 of file triangular2d.cpp.

## ◆ getLeftOfBoundary() [1/5]

TriangularMesh2D::Boundary plask::TriangularMesh2D::getLeftOfBoundary | ( | const Box2D & | box | ) |
| static

Get boundary which describes all nodes which lies on left boundary of a given `box`.

Parameters

  box | box which describes a region

Returns
  the boundary

Definition at line 368 of file triangular2d.cpp.

## ◆ getLeftOfBoundary() [2/5]

TriangularMesh2D::Boundary plask::TriangularMesh2D::getLeftOfBoundary | ( | const std::vector< Box2D > & | boxes | ) |
| static

Get boundary which describes all nodes which lies on left boundaries of a given `boxes`.

Parameters

  boxes | vector of boxes that describes a region

Returns
  the boundary

Definition at line 392 of file triangular2d.cpp.

## ◆ getLeftOfBoundary() [3/5]

TriangularMesh2D::Boundary plask::TriangularMesh2D::getLeftOfBoundary | ( | shared_ptr< const GeometryObject > | object | ) |
| static

Get boundary which describes all nodes which lies on outer left boundary of a given `object`.

Parameters

  object | object to test
  path | path hints specifying the object

Returns
  the boundary

Definition at line 428 of file triangular2d.cpp.

## ◆ getLeftOfBoundary() [4/5]

TriangularMesh2D::Boundary plask::TriangularMesh2D::getLeftOfBoundary | ( | shared_ptr< const GeometryObject > | object,
|  | const PathHints & | path
| ) |  |
| static

Get boundary which describes all nodes which lies on outer left boundary of a given `object`.

Parameters

  object | object to test
  path | path hints specifying the object

Returns
  the boundary

Definition at line 434 of file triangular2d.cpp.

## ◆ getLeftOfBoundary() [5/5]

static Boundary plask::TriangularMesh2D::getLeftOfBoundary | ( | shared_ptr< const GeometryObject > | object,
|  | const PathHints * | path
| ) |  |
| inline static

Get boundary which describes all nodes which lies on outer left boundary of a given `object`.

Parameters

  object | object to test
  path | (optional) path hints specifying the object

Returns
  the boundary

Definition at line 665 of file triangular2d.hpp.

## ◆ getRightBoundary()

TriangularMesh2D::Boundary plask::TriangularMesh2D::getRightBoundary | ( |  | ) |
| static

Get boundary which describes all nodes which lies on outer right boundary of the whole mesh.

Returns
  the boundary

Definition at line 332 of file triangular2d.cpp.

## ◆ getRightOfBoundary() [1/5]

TriangularMesh2D::Boundary plask::TriangularMesh2D::getRightOfBoundary | ( | const Box2D & | box | ) |
| static

Get boundary which describes all nodes which lies on right boundary of a given `box`.

Parameters

  box | box which describes a region

Returns
  the boundary

Definition at line 356 of file triangular2d.cpp.

## ◆ getRightOfBoundary() [2/5]

TriangularMesh2D::Boundary plask::TriangularMesh2D::getRightOfBoundary | ( | const std::vector< Box2D > & | boxes | ) |
| static

Get boundary which describes all nodes which lies on right boundaries of a given `boxes`.

Parameters

  boxes | vector of boxes that describes a region

Returns
  the boundary

Definition at line 380 of file triangular2d.cpp.

## ◆ getRightOfBoundary() [3/5]

TriangularMesh2D::Boundary plask::TriangularMesh2D::getRightOfBoundary | ( | shared_ptr< const GeometryObject > | object | ) |
| static

Get boundary which describes all nodes which lies on outer right boundary of a given `object`.

Parameters

  object | object to test

Returns
  the boundary

Definition at line 404 of file triangular2d.cpp.

## ◆ getRightOfBoundary() [4/5]

TriangularMesh2D::Boundary plask::TriangularMesh2D::getRightOfBoundary | ( | shared_ptr< const GeometryObject > | object,
|  | const PathHints & | path
| ) |  |
| static

Get boundary which describes all nodes which lies on outer right boundary of a given `object`.

Parameters

  object | object to test
  path | path hints specifying the object

Returns
  the boundary

Definition at line 410 of file triangular2d.cpp.

## ◆ getRightOfBoundary() [5/5]

static Boundary plask::TriangularMesh2D::getRightOfBoundary | ( | shared_ptr< const GeometryObject > | object,
|  | const PathHints * | path
| ) |  |
| inline static

Get boundary which describes all nodes which lies on outer right boundary of a given `object`.

Parameters

  object | object to test
  path | (optional) path hints specifying the object

Returns
  the boundary

Definition at line 647 of file triangular2d.hpp.

## ◆ getTopBoundary()

TriangularMesh2D::Boundary plask::TriangularMesh2D::getTopBoundary | ( |  | ) |
| static

Get boundary which describes all nodes which lies on outer top boundary of the whole mesh.

Returns
  the boundary

Definition at line 338 of file triangular2d.cpp.

## ◆ getTopOfBoundary() [1/5]

TriangularMesh2D::Boundary plask::TriangularMesh2D::getTopOfBoundary | ( | const Box2D & | box | ) |
| static

Get boundary which describes all nodes which lies on top boundary of a given `box`.

Parameters

  box | box which describes a region

Returns
  the boundary

Definition at line 362 of file triangular2d.cpp.

## ◆ getTopOfBoundary() [2/5]

TriangularMesh2D::Boundary plask::TriangularMesh2D::getTopOfBoundary | ( | const std::vector< Box2D > & | boxes | ) |
| static

Get boundary which describes all nodes which lies on top boundaries of a given `boxes`.

Parameters

  boxes | vector of boxes that describes a region

Returns
  the boundary

Definition at line 386 of file triangular2d.cpp.

## ◆ getTopOfBoundary() [3/5]

TriangularMesh2D::Boundary plask::TriangularMesh2D::getTopOfBoundary | ( | shared_ptr< const GeometryObject > | object | ) |
| static

Get boundary which describes all nodes which lies on outer top boundary of a given `object`.

Parameters

  object | object to test

Returns
  the boundary

Definition at line 416 of file triangular2d.cpp.

## ◆ getTopOfBoundary() [4/5]

TriangularMesh2D::Boundary plask::TriangularMesh2D::getTopOfBoundary | ( | shared_ptr< const GeometryObject > | object,
|  | const PathHints & | path
| ) |  |
| static

Get boundary which describes all nodes which lies on outer top boundary of a given `object`.

Parameters

  object | object to test
  path | path hints specifying the object

Returns
  the boundary

Definition at line 422 of file triangular2d.cpp.

## ◆ getTopOfBoundary() [5/5]

static Boundary plask::TriangularMesh2D::getTopOfBoundary | ( | shared_ptr< const GeometryObject > | object,
|  | const PathHints * | path
| ) |  |
| inline static

Get boundary which describes all nodes which lies on outer top boundary of a given `object`.

Parameters

  object | object to test
  path | (optional) path hints specifying the object

Returns
  the boundary

Definition at line 683 of file triangular2d.hpp.

## ◆ masked() [1/3]

TriangularMesh2D plask::TriangularMesh2D::masked | ( | const GeometryD< 2 > & | geom,
|  | const std::function< bool(shared_ptr< const Material >)> | materialPredicate
| ) |  | const
| inline

Construct masked mesh with all elements of `this` which have required materials in the midpoints.

Preserve order of elements of `this`.

Parameters

  geom | geometry to get materials from
  materialPredicate | predicate which returns either `true` for accepting material or `false` for rejecting it

Returns
  the masked mesh constructed

Definition at line 338 of file triangular2d.hpp.

## ◆ masked() [2/3]

TriangularMesh2D plask::TriangularMesh2D::masked | ( | const GeometryD< 2 > & | geom,
|  | unsigned | materialKinds
| ) |  | const
| inline

Construct masked mesh with all elements of `this` which have required kinds of materials (in the midpoints).

Preserve order of elements of `this`.

Parameters

  geom | geometry to get materials from
  materialKinds | one or more kinds of material encoded with bit `or` operation, e.g. `DIELECTRIC|METAL` for selecting all dielectrics and metals, or `~`(DIELECTRIC|METAL) for selecting everything else

Returns
  the masked mesh constructed

Definition at line 351 of file triangular2d.hpp.

## ◆ masked() [3/3]

TriangularMesh2D plask::TriangularMesh2D::masked | ( | const Predicate & | predicate | ) | const

Construct masked mesh with elements of `this` chosen by a `predicate`.

Preserve order of elements of `this`.

Parameters

  predicate | predicate which returns either `true` for accepting element or `false` for rejecting it

Returns
  the masked mesh constructed

Definition at line 123 of file triangular2d.cpp.

## ◆ read()

TriangularMesh2D plask::TriangularMesh2D::read | ( | XMLReader & | reader | ) |
| static

Construct new mesh with data from XPL file.

Parameters

  reader |

Returns
  the mesh constructed

Definition at line 486 of file triangular2d.cpp.

## ◆ size()

std::size_t plask::TriangularMesh2D::size | ( |  | ) | const
| inline override virtual

Returns
  number of points in mesh

Implements plask::Mesh.

Definition at line 306 of file triangular2d.hpp.

## ◆ writeXML()

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

Write mesh to XML.

Parameters

  object | XML object to write to

Reimplemented from plask::Mesh.

Definition at line 131 of file triangular2d.cpp.

## Friends And Related Symbol Documentation

## ◆ ExtrudedTriangularMesh3D

friend struct ExtrudedTriangularMesh3D
| friend

Definition at line 34 of file triangular2d.hpp.

## Member Data Documentation

## ◆ elementNodes

std::vector< TriangleNodeIndexes > plask::TriangularMesh2D::elementNodes

Definition at line 48 of file triangular2d.hpp.

## ◆ nodes

LocalCoordsVec plask::TriangularMesh2D::nodes

Definition at line 44 of file triangular2d.hpp.

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

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