PLaSK library

Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
plask::BoundaryConditions< BoundaryT, ValueT > Struct Template Reference

Set of boundary conditions for given mesh type and boundary condition description type. More...

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

## Public Types
typedef BoundaryT | Boundary
| Boundary type for a mesh of type MeshType.
typedef Boundary::MeshType | MeshType
| type of mesh
typedef ValueT | ValueType
| type which describes boundary condition
typedef BoundaryCondition< Boundary, ValueType > | Element
| One boundary-condition pair.
typedef elements_container_t::iterator | iterator
typedef elements_container_t::const_iterator | const_iterator

## Public Member Functions
iterator | begin ()
const_iterator | begin () const
iterator | end ()
const_iterator | end () const
template<typename... ArgsTypes>
| BoundaryConditions (ArgsTypes &&... args)
| Delegate all constructors to underline container (which is std::list<Element>).
iterator | getIteratorForIndex (std::size_t index)
| Get iterator to element with given `index`.
const_iterator | getIteratorForIndex (std::size_t index) const
| Get iterator to element with given `index`.
Element & | operator[] (std::size_t index)
| Get reference to boundary condition with given `index`.
const Element & | operator[] (std::size_t index) const
| Get const reference to boundary condition with given `index`.
iterator | add (Element &&element)
| Add new boundary condition to this (to end of elements list).
template<typename... ConditionArgumentsTypes>
iterator | add (Boundary &&place, ConditionArgumentsTypes &&... value_args)
| Add new boundary condition to this (to end of elements list).
iterator | insert (std::size_t index, Element &&element)
| Insert new boundary condition to this at specified position.
template<typename... ConditionArgumentsTypes>
iterator | insert (std::size_t index, Boundary &&place, ConditionArgumentsTypes &&... value_args)
| Insert new boundary condition to this at specified position.
void | clear ()
| Delete all boundary conditions from this set.
void | erase (iterator to_erase)
| Remove the element point by `to_erase` from list.
void | erase (iterator first, iterator last)
| Remove the elements in the range [first, last) from list.
void | erase (std::size_t index)
| Remove the element with given `index` from list.
std::size_t | size () const
| Get number of elements.
bool | empty () const
| Check if this is empty.
BoundaryConditionsWithMesh< Boundary, ValueType > | get (const typename Boundary::MeshType &mesh, const shared_ptr< const GeometryD< MeshType::DIM > > &geometry) const
| Get BoundaryConditionsWithMesh<Boundary,ValueType>
BoundaryConditionsWithMesh< Boundary, ValueType > | get (const shared_ptr< const typename Boundary::MeshType > &mesh, const shared_ptr< const GeometryD< MeshType::DIM > > &geometry) const
| Get BoundaryConditionsWithMesh<Boundary,ValueType>
BoundaryConditionsWithMesh< Boundary, ValueType > | operator() (const MeshType &mesh, const shared_ptr< const GeometryD< MeshType::DIM > > &geometry) const
| Get BoundaryConditionsWithMesh<Boundary,ValueType>
BoundaryConditionsWithMesh< Boundary, ValueType > | operator() (const shared_ptr< const MeshType > &mesh, const shared_ptr< const GeometryD< MeshType::DIM > > &geometry) const
| Get BoundaryConditionsWithMesh<Boundary,ValueType>

## Detailed Description

template<typename BoundaryT, typename ValueT>
struct plask::BoundaryConditions< BoundaryT, ValueT >

Set of boundary conditions for given mesh type and boundary condition description type.

Template Parameters

  BoundaryT | type of boundary
  ValueT | type which describe boundary condition Boundaries

Definition at line 197 of file boundary_conditions.hpp.

## Member Typedef Documentation

## ◆ Boundary

template<typename BoundaryT , typename ValueT >

typedef BoundaryT plask::BoundaryConditions< BoundaryT, ValueT >::Boundary

Boundary type for a mesh of type MeshType.

Definition at line 199 of file boundary_conditions.hpp.

## ◆ const_iterator

template<typename BoundaryT , typename ValueT >

typedef elements_container_t::const_iterator plask::BoundaryConditions< BoundaryT, ValueT >::const_iterator

Definition at line 212 of file boundary_conditions.hpp.

## ◆ Element

template<typename BoundaryT , typename ValueT >

typedef BoundaryCondition<Boundary, ValueType> plask::BoundaryConditions< BoundaryT, ValueT >::Element

One boundary-condition pair.

Definition at line 204 of file boundary_conditions.hpp.

## ◆ iterator

template<typename BoundaryT , typename ValueT >

typedef elements_container_t::iterator plask::BoundaryConditions< BoundaryT, ValueT >::iterator

Definition at line 211 of file boundary_conditions.hpp.

## ◆ MeshType

template<typename BoundaryT , typename ValueT >

typedef Boundary::MeshType plask::BoundaryConditions< BoundaryT, ValueT >::MeshType

type of mesh

Definition at line 200 of file boundary_conditions.hpp.

## ◆ ValueType

template<typename BoundaryT , typename ValueT >

typedef ValueT plask::BoundaryConditions< BoundaryT, ValueT >::ValueType

type which describes boundary condition

Definition at line 201 of file boundary_conditions.hpp.

## Constructor & Destructor Documentation

## ◆ BoundaryConditions()

template<typename BoundaryT , typename ValueT >
template<typename... ArgsTypes>

plask::BoundaryConditions< BoundaryT, ValueT >::BoundaryConditions | ( | ArgsTypes &&... | args | ) |
| inline

Delegate all constructors to underline container (which is std::list<Element>).

Parameters

  args | arguments to delegate

Definition at line 231 of file boundary_conditions.hpp.

## Member Function Documentation

## ◆ add() [1/2]

template<typename BoundaryT , typename ValueT >
template<typename... ConditionArgumentsTypes>

iterator plask::BoundaryConditions< BoundaryT, ValueT >::add | ( | Boundary && | place,
|  | ConditionArgumentsTypes &&... | value_args
| ) |  |
| inline

Add new boundary condition to this (to end of elements list).

It doesn't invalidate any iterators. It has constant time complexity.

Parameters

  place | boundary
  value_args | arguments for condition constructor, can be just one argument of ValueType to use copy/move-constructor

Returns
  iterator to added element which allow to change or erase added element in future

Definition at line 308 of file boundary_conditions.hpp.

## ◆ add() [2/2]

template<typename BoundaryT , typename ValueT >

iterator plask::BoundaryConditions< BoundaryT, ValueT >::add | ( | Element && | element | ) |
| inline

Add new boundary condition to this (to end of elements list).

It doesn't invalidate any iterators. It has constant time complexity.

Parameters

  element | boundary condition to add

Returns
  iterator to added element which allow to change or erase added element in future

Definition at line 294 of file boundary_conditions.hpp.

## ◆ begin() [1/2]

template<typename BoundaryT , typename ValueT >

iterator plask::BoundaryConditions< BoundaryT, ValueT >::begin | ( |  | ) |
| inline

Definition at line 214 of file boundary_conditions.hpp.

## ◆ begin() [2/2]

template<typename BoundaryT , typename ValueT >

const_iterator plask::BoundaryConditions< BoundaryT, ValueT >::begin | ( |  | ) | const
| inline

Definition at line 215 of file boundary_conditions.hpp.

## ◆ clear()

template<typename BoundaryT , typename ValueT >

void plask::BoundaryConditions< BoundaryT, ValueT >::clear | ( |  | ) |
| inline

Delete all boundary conditions from this set.

Definition at line 344 of file boundary_conditions.hpp.

## ◆ empty()

template<typename BoundaryT , typename ValueT >

bool plask::BoundaryConditions< BoundaryT, ValueT >::empty | ( |  | ) | const
| inline

Check if this is empty.

It has constant time complexity.

Returns
  `true` only if this container contains no conditions boundaries

Definition at line 399 of file boundary_conditions.hpp.

## ◆ end() [1/2]

template<typename BoundaryT , typename ValueT >

iterator plask::BoundaryConditions< BoundaryT, ValueT >::end | ( |  | ) |
| inline

Definition at line 217 of file boundary_conditions.hpp.

## ◆ end() [2/2]

template<typename BoundaryT , typename ValueT >

const_iterator plask::BoundaryConditions< BoundaryT, ValueT >::end | ( |  | ) | const
| inline

Definition at line 218 of file boundary_conditions.hpp.

## ◆ erase() [1/3]

template<typename BoundaryT , typename ValueT >

void plask::BoundaryConditions< BoundaryT, ValueT >::erase | ( | iterator | first,
|  | iterator | last
| ) |  |
| inline

Remove the elements in the range [first, last) from list.

It doesn't invalidate any iterators from outside of deleted range. It has linear time complexity dependent on the length of the range.

Parameters

  first,last | range of elements to remove

Definition at line 364 of file boundary_conditions.hpp.

## ◆ erase() [2/3]

template<typename BoundaryT , typename ValueT >

void plask::BoundaryConditions< BoundaryT, ValueT >::erase | ( | iterator | to_erase | ) |
| inline

Remove the element point by `to_erase` from list.

It doesn't invalidate any iterators other than `to_erase`. It has constant time complexity.

Parameters

  to_erase | iterator which show element to erase

Definition at line 354 of file boundary_conditions.hpp.

## ◆ erase() [3/3]

template<typename BoundaryT , typename ValueT >

void plask::BoundaryConditions< BoundaryT, ValueT >::erase | ( | std::size_t | index | ) |
| inline

Remove the element with given `index` from list.

Do nothing if `index` is not valid.

It doesn't invalidate any iterators which not point to deleted element. It has linear time complexity.

Parameters

  index | index of element to remove

Definition at line 377 of file boundary_conditions.hpp.

## ◆ get() [1/2]

template<typename BoundaryT , typename ValueT >

BoundaryConditionsWithMesh< Boundary, ValueType > plask::BoundaryConditions< BoundaryT, ValueT >::get | ( | const shared_ptr< const typename Boundary::MeshType > & | mesh,
|  | const shared_ptr< const GeometryD< MeshType::DIM > > & | geometry
| ) |  | const
| inline

Get BoundaryConditionsWithMesh<Boundary,ValueType>

Parameters

  mesh | mesh
  geometry | geometry at which the boundary conditions are defines

Definition at line 427 of file boundary_conditions.hpp.

## ◆ get() [2/2]

template<typename BoundaryT , typename ValueT >

BoundaryConditionsWithMesh< Boundary, ValueType > plask::BoundaryConditions< BoundaryT, ValueT >::get | ( | const typename Boundary::MeshType & | mesh,
|  | const shared_ptr< const GeometryD< MeshType::DIM > > & | geometry
| ) |  | const
| inline

Get BoundaryConditionsWithMesh<Boundary,ValueType>

Parameters

  mesh | mesh

Definition at line 407 of file boundary_conditions.hpp.

## ◆ getIteratorForIndex() [1/2]

template<typename BoundaryT , typename ValueT >

iterator plask::BoundaryConditions< BoundaryT, ValueT >::getIteratorForIndex | ( | std::size_t | index | ) |
| inline

Get iterator to element with given `index`.

This method has linear time complexity.

Parameters

  [in] | index | index of element

Returns
  iterator to element with given `index` or `end()` if `index` is not valid

Definition at line 240 of file boundary_conditions.hpp.

## ◆ getIteratorForIndex() [2/2]

template<typename BoundaryT , typename ValueT >

const_iterator plask::BoundaryConditions< BoundaryT, ValueT >::getIteratorForIndex | ( | std::size_t | index | ) | const
| inline

Get iterator to element with given `index`.

This method has linear time complexity.

Parameters

  [in] | index | index of element

Returns
  iterator to element with given `index` or `end()` if `index` is not valid

Definition at line 253 of file boundary_conditions.hpp.

## ◆ insert() [1/2]

template<typename BoundaryT , typename ValueT >
template<typename... ConditionArgumentsTypes>

iterator plask::BoundaryConditions< BoundaryT, ValueT >::insert | ( | std::size_t | index,
|  | Boundary && | place,
|  | ConditionArgumentsTypes &&... | value_args
| ) |  |
| inline

Insert new boundary condition to this at specified position.

It doesn't invalidate any iterators. It has constant time complexity.

Parameters

  index | insert position
  place | boundary
  value_args | arguments for condition constructor, can be just one argument of ValueType to use copy/move-constructor

Returns
  iterator to inserted element which allow to change or erase added element in future

Definition at line 337 of file boundary_conditions.hpp.

## ◆ insert() [2/2]

template<typename BoundaryT , typename ValueT >

iterator plask::BoundaryConditions< BoundaryT, ValueT >::insert | ( | std::size_t | index,
|  | Element && | element
| ) |  |
| inline

Insert new boundary condition to this at specified position.

It doesn't invalidate any iterators. It has constant time complexity.

Parameters

  index | insert position
  element | boundary condition to add

Returns
  iterator to inserted element which allow to change or erase added element in future

Definition at line 321 of file boundary_conditions.hpp.

## ◆ operator()() [1/2]

template<typename BoundaryT , typename ValueT >

BoundaryConditionsWithMesh< Boundary, ValueType > plask::BoundaryConditions< BoundaryT, ValueT >::operator() | ( | const MeshType & | mesh,
|  | const shared_ptr< const GeometryD< MeshType::DIM > > & | geometry
| ) |  | const
| inline

Get BoundaryConditionsWithMesh<Boundary,ValueType>

Parameters

  mesh | mesh
  geometry | geometry at which the boundary conditions are defines

Definition at line 437 of file boundary_conditions.hpp.

## ◆ operator()() [2/2]

template<typename BoundaryT , typename ValueT >

BoundaryConditionsWithMesh< Boundary, ValueType > plask::BoundaryConditions< BoundaryT, ValueT >::operator() | ( | const shared_ptr< const MeshType > & | mesh,
|  | const shared_ptr< const GeometryD< MeshType::DIM > > & | geometry
| ) |  | const
| inline

Get BoundaryConditionsWithMesh<Boundary,ValueType>

Parameters

  mesh | mesh
  geometry | geometry at which the boundary conditions are defines

Definition at line 447 of file boundary_conditions.hpp.

## ◆ operator[]() [1/2]

template<typename BoundaryT , typename ValueT >

Element & plask::BoundaryConditions< BoundaryT, ValueT >::operator[] | ( | std::size_t | index | ) |
| inline

Get reference to boundary condition with given `index`.

This method has linear time complexity.

Parameters

  index | index of element

Returns
  reference to boundary condition with given `index`

Exceptions

  OutOfBoundsException | if `index` is not valid

Definition at line 267 of file boundary_conditions.hpp.

## ◆ operator[]() [2/2]

template<typename BoundaryT , typename ValueT >

const Element & plask::BoundaryConditions< BoundaryT, ValueT >::operator[] | ( | std::size_t | index | ) | const
| inline

Get const reference to boundary condition with given `index`.

This method has linear time complexity.

Parameters

  index | index of element

Returns
  const reference to boundary condition with given `index`

Exceptions

  OutOfBoundsException | if `index` is not valid

Definition at line 281 of file boundary_conditions.hpp.

## ◆ size()

template<typename BoundaryT , typename ValueT >

std::size_t plask::BoundaryConditions< BoundaryT, ValueT >::size | ( |  | ) | const
| inline

Get number of elements.

This method has linear time complexity.

Returns
  number of elements

Definition at line 389 of file boundary_conditions.hpp.

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

- plask/mesh/boundary_conditions.hpp