PLaSK library
Loading...
Searching...
No Matches
plask::Boundary< MeshT > Struct Template Reference

Instance of this class represents predicate which chooses a subset of points (strictly: indices of points) from a mesh. More...

#include <plask/mesh/boundary.hpp>

Public Types

typedef MeshT MeshType
 

Public Member Functions

 Boundary (std::function< BoundaryNodeSet(const MeshType &, const shared_ptr< const GeometryD< MeshType::DIM > > &)> create_fun)
 
 Boundary ()
 Construct null boundary.
 
BoundaryNodeSet operator() (const MeshType &mesh, const shared_ptr< const GeometryD< MeshType::DIM > > &geometry) const
 Get boundary-mesh pair for this boundary and given mesh.
 
BoundaryNodeSet operator() (const shared_ptr< const MeshType > &mesh, const shared_ptr< const GeometryD< MeshType::DIM > > &geometry) const
 Get boundary-mesh pair for this boundary and given mesh.
 
BoundaryNodeSet get (const MeshType &mesh, const shared_ptr< const GeometryD< MeshType::DIM > > &geometry) const
 Get boundary-mesh pair for this boundary and given mesh.
 
BoundaryNodeSet get (const shared_ptr< const MeshType > &mesh, const shared_ptr< const GeometryD< MeshType::DIM > > &geometry) const
 Get boundary-mesh pair for this boundary and given mesh.
 
bool empty (const MeshType &mesh) const
 Check if boundary, for given mesh, represents empty set of indexes.
 
bool isNull () const
 Check if boundary is null (doesn't hold valid creator).
 

Protected Attributes

std::function< BoundaryNodeSet(const MeshType &, const shared_ptr< const GeometryD< MeshType::DIM > > &)> create
 

Detailed Description

template<typename MeshT>
struct plask::Boundary< MeshT >

Instance of this class represents predicate which chooses a subset of points (strictly: indices of points) from a mesh.

The mesh must be a specific type MeshType.

Technically, Boundary is a factory of BoundaryNodeSet (objects that hold a pointer to abstract class BoundaryNodeSetImpl).

Template Parameters
MeshTypetype of mesh Boundaries

Definition at line 336 of file boundary.hpp.

Member Typedef Documentation

◆ MeshType

template<typename MeshT >
typedef MeshT plask::Boundary< MeshT >::MeshType

Definition at line 338 of file boundary.hpp.

Constructor & Destructor Documentation

◆ Boundary() [1/2]

template<typename MeshT >
plask::Boundary< MeshT >::Boundary ( std::function< BoundaryNodeSet(const MeshType &, const shared_ptr< const GeometryD< MeshType::DIM > > &)>  create_fun)
inline

Definition at line 348 of file boundary.hpp.

◆ Boundary() [2/2]

template<typename MeshT >
plask::Boundary< MeshT >::Boundary ( )
inline

Construct null boundary.

Definition at line 351 of file boundary.hpp.

Member Function Documentation

◆ empty()

template<typename MeshT >
bool plask::Boundary< MeshT >::empty ( const MeshType mesh) const
inline

Check if boundary, for given mesh, represents empty set of indexes.

Parameters
meshmesh
Returns
true only if this represents empty set of indexes of given mesh

Definition at line 401 of file boundary.hpp.

◆ get() [1/2]

template<typename MeshT >
BoundaryNodeSet plask::Boundary< MeshT >::get ( const MeshType mesh,
const shared_ptr< const GeometryD< MeshType::DIM > > &  geometry 
) const
inline

Get boundary-mesh pair for this boundary and given mesh.

Parameters
meshmesh
Returns
wrapper for this boundary and given mesh, it is valid only to time when both mesh and this are valid (not deleted)

Definition at line 381 of file boundary.hpp.

◆ get() [2/2]

template<typename MeshT >
BoundaryNodeSet plask::Boundary< MeshT >::get ( const shared_ptr< const MeshType > &  mesh,
const shared_ptr< const GeometryD< MeshType::DIM > > &  geometry 
) const
inline

Get boundary-mesh pair for this boundary and given mesh.

Parameters
meshmesh
Returns
wrapper for this boundary and given mesh, it is valid only to time when both mesh and this are valid (not deleted)

Definition at line 391 of file boundary.hpp.

◆ isNull()

template<typename MeshT >
bool plask::Boundary< MeshT >::isNull ( ) const
inline

Check if boundary is null (doesn't hold valid creator).

Null boundary behaves similar to empty one.

Returns
true only if boundary doesn't hold valid creator

Definition at line 410 of file boundary.hpp.

◆ operator()() [1/2]

template<typename MeshT >
BoundaryNodeSet plask::Boundary< MeshT >::operator() ( const MeshType mesh,
const shared_ptr< const GeometryD< MeshType::DIM > > &  geometry 
) const
inline

Get boundary-mesh pair for this boundary and given mesh.

Parameters
meshmesh
Returns
wrapper for this boundary and given mesh, it is valid only to time when both mesh and this are valid (not deleted)

Definition at line 361 of file boundary.hpp.

◆ operator()() [2/2]

template<typename MeshT >
BoundaryNodeSet plask::Boundary< MeshT >::operator() ( const shared_ptr< const MeshType > &  mesh,
const shared_ptr< const GeometryD< MeshType::DIM > > &  geometry 
) const
inline

Get boundary-mesh pair for this boundary and given mesh.

Parameters
meshmesh
Returns
wrapper for this boundary and given mesh, it is valid only to time when both mesh and this are valid (not deleted)

Definition at line 371 of file boundary.hpp.

Member Data Documentation

◆ create

template<typename MeshT >
std::function<BoundaryNodeSet(const MeshType&, const shared_ptr<const GeometryD<MeshType::DIM>>&)> plask::Boundary< MeshT >::create
protected

Definition at line 341 of file boundary.hpp.


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