4.2.1.3. pde.grids.boundaries.axes module¶
This module handles the boundaries of all axes of a grid. It only defines
Boundaries
, which acts as a list of
BoundaryAxisBase
.
- class Boundaries(boundaries)[source]¶
Bases:
list
class that bundles all boundary conditions for all axes
initialize with a list of boundaries
- check_value_rank(rank: int) None [source]¶
check whether the values at the boundaries have the correct rank
- Parameters
rank (int) – The tensorial rank of the field for this boundary condition
- Throws:
RuntimeError: if any value does not have rank rank
- copy() Boundaries [source]¶
create a copy of the current boundaries
- extract_component(*indices) Boundaries [source]¶
extracts the boundary conditions of the given component of the tensor.
- Parameters
*indices – One or two indices for vector or tensor fields, respectively
- classmethod from_data(grid: GridBase, boundaries, rank: int = 0, normal: bool = False) Boundaries [source]¶
Creates all boundaries from given data
- Parameters
grid (
GridBase
) – The grid with which the boundary condition is associatedboundaries (str or list or tuple or dict) –
Data that describes the boundaries. This can either be a list of specifications for each dimension or a single one, which is then applied to all dimensions. The boundary for a dimensions can be specified by one of the following formats:
string specifying a single type for all boundaries
dictionary specifying the type and values for all boundaries
tuple pair specifying the low and high boundary individually
rank (int) – The tensorial rank of the field for this boundary condition
normal (bool) – Flag indicating whether the condition is only applied in the normal direction.
- get_mathematical_representation(field_name: str = 'C') str [source]¶
return mathematical representation of the boundary condition
- make_ghost_cell_setter() Callable[[...], None] [source]¶
return function that sets the ghost cells on a full array