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:
listClass that bundles all boundary conditions for all axes.
Initialize with a list of boundaries.
- check_value_rank(rank)[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
- Return type:
None
- Throws:
RuntimeError: if any value does not have rank rank
- classmethod from_data(grid, boundaries, rank=0)[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
- Return type:
- classmethod get_help()[source]
Return information on how boundary conditions can be set.
- Return type:
- get_mathematical_representation(field_name='C')[source]
Return mathematical representation of the boundary condition.
- make_ghost_cell_setter()[source]
Return function that sets the ghost cells on a full array.
- Return type:
- property periodic: list[bool]
a boolean array indicating which dimensions are periodic according to the boundary conditions.
- Type: