Required
policy| Type: | IntralayerCoarseningPolicy |
| Description: | The intralayer policy. |
def construct_mesh_block(
policy: IntralayerCoarseningPolicy,
windowed_n_elm_h: tuple[list[list[int]], list[list[int]], list[list[int]]],
ct: list[tuple[int, _InterlayerConnectorProtocol]],
cb: list[tuple[int, _InterlayerConnectorProtocol]],
epw: tuple[float, ...],
i_bot: Interface,
i_top: Interface,
mw: realized.RealizedParameter,
cs: CoordinateSystem,
) -> list[MeshBlock]: ...| Type: | IntralayerCoarseningPolicy |
| Description: | The intralayer policy. |
| Type: | tuple[list[list[int]], list[list[int]], list[list[int]]] |
| Description: | The number of elements in the horizontal directions. Should be a 3-tuple, with each entry a list of the number of elements per horizontal dimension. Index 0 of the tuple contain a list of the number of elements in the layer above, index 1 the number of elements in the current layer, and index 2 the number of elements below. |
| Type: | list[tuple[int, _InterlayerConnectorProtocol]] |
| Description: | A list of connectors for the layer's top. |
| Type: | list[tuple[int, _InterlayerConnectorProtocol]] |
| Description: | A list of connectors to the layer's bottom. |
| Type: | tuple[float, ...] |
| Description: | The requested elements per wavelength. |
| Type: | Interface |
| Description: | The bottom bounding interface. |
| Type: | Interface |
| Description: | The top bounding interface. |
| Type: | realized.RealizedParameter |
| Description: | The minimum wavelength. |
| Type: | CoordinateSystem |
| Description: | The coordinate system. |
list[MeshBlock]def elm_locs_horizontal(
fixed_horizontal_boundaries: list[list[float]],
h_bounds: list[tuple[float, float]],
n_elem: list[int],
) -> list[np.ndarray]: ...| Type: | list[list[float]] |
| Description: | Horizontal element boundaries that should be respected. |
| Type: | list[tuple[float, float]] |
| Description: | A list of (min, max) horizontal boundaries. |
| Type: | list[int] |
| Description: | A list of elements in each horizontal direction. |
list[np.ndarray]def fix_horizontal_spacing(
fixed_horizontal_boundaries: list[list[float]],
h_bounds: list[tuple[float, float]],
n_elem: list[int],
cs: CoordinateSystem,
) -> list[np.ndarray] | None: ...| Type: | list[list[float]] |
| Description: | Horizontal element boundaries that should be respected. |
| Type: | list[tuple[float, float]] |
| Description: | A list of (min, max) horizontal boundaries. |
| Type: | list[int] |
| Description: | A list of elements in each horizontal direction. |
| Type: | CoordinateSystem |
| Description: | The coordinate system. |
list[np.ndarray] | Nonedef get_chunk_dimensions(
n_elm: list[int],
bounds: dict[str, tuple[float, float]],
cs: CoordinateSystem,
) -> typing.Sequence[EquiAzimuthalGrid]: ...| Type: | list[int] |
| Description: | List of elements in the x, [y] direction. |
| Type: | dict[str, tuple[float, float]] |
| Description: | The coordinate bounds of the layer. |
| Type: | CoordinateSystem |
| Description: | The coordinate system. |
typing.Sequence[EquiAzimuthalGrid]def get_horizontal_node_locations(
n_elm_h: list[int],
layer_bounds: dict[str, tuple[float, float]],
cs: CoordinateSystem,
) -> tuple[npt.NDArray, list[int], list[float] | None]: ...| Type: | list[int] |
| Description: | The number of elements in each horizontal direction. |
| Type: | dict[str, tuple[float, float]] |
| Description: | The bounds of the layer. Dictionary of {coordinate name: bounds}; should be populated for all bounding coordinates. |
| Type: | CoordinateSystem |
| Description: | The coordinate system. |
tuple[npt.NDArray, list[int], list[float] | None]None (as this is not well defined in the spherical 3D case.)cubed_sphere_vertical_refine.... If we're not constructing this case,
just return a list with a single element, containing the trivial layer
bounds as passed in.def get_layer_bounds(
bounds: dict[str, tuple[float, float]], cs: CoordinateSystem
) -> list[dict[str, tuple[float, float]]]: ...| Type: | dict[str, tuple[float, float]] |
| Description: | The bounds of the layer. |
| Type: | CoordinateSystem |
| Description: | The coordinate system. |
list[dict[str, tuple[float, float]]]def h_dict(
bounds: dict[str, tuple[float, float]], cs: CoordinateSystem
) -> dict[str, float]: ...| Type: | dict[str, tuple[float, float]] |
| Description: | The horizontal boundaries. |
| Type: | CoordinateSystem |
| Description: | The coordinate system. |
dict[str, float]def max_constant_elm_size(
mw: float, epw: tuple[float_, ...]
) -> tuple[float, ...]: ...| Type: | float |
| Description: | The minimum wavelength in a layer. |
| Type: | tuple[float_, ...] |
| Description: | Elements per wavelength. |
tuple[float, ...]def n_elm_vertical(
i_bot: Interface,
i_top: Interface,
epw: tuple[float_, ...],
nh: list[int],
mw: realized.RealizedParameter,
cs: CoordinateSystem,
thickness_reduction: typing.Callable[[npt.NDArray[np.float64]], float],
allow_crossing: bool = False,
) -> int: ...| Type: | Interface |
| Description: | The bottom bounding interface. |
| Type: | Interface |
| Description: | The top bounding interface. |
| Type: | tuple[float_, ...] |
| Description: | Elements per wavelength. |
| Type: | list[int] |
| Description: | The number of elements in the horizontal dimensions. |
| Type: | realized.RealizedParameter |
| Description: | The minimum wavelength. |
| Type: | CoordinateSystem |
| Description: | The coordinate system. |
| Type: | typing.Callable[[npt.NDArray[np.float64]], float] |
| Description: | How to reduce the point-wise thickness for the n_elm calculation. For example can be max, min, mean, ... |
| Type: | bool |
| Default value: | False |
| Description: | Allow for interfaces with 0.0 (or negative) thickness. |
intdef simplify_connectors(
connectors: tuple[
list[tuple[int, _InterlayerConnectorProtocol]],
list[tuple[int, _InterlayerConnectorProtocol]],
],
n_elm_h: tuple,
attempt: bool,
) -> tuple[
list[tuple[int, _InterlayerConnectorProtocol]],
list[tuple[int, _InterlayerConnectorProtocol]],
list[int],
]: ...| Type: | tuple[list[tuple[int, _InterlayerConnectorProtocol]], list[tuple[int, _InterlayerConnectorProtocol]]] |
| Description: | A tuple information regarding the connectors at the top and bottom of this layer. This information should be in the form of: a list of tuples, one for each connector, with the first element of the information tuple the number of vertical elements the connector takes up, and the second the protocol's partial constructor (as returned from its policy). |
| Type: | tuple |
| Description: | The number of elements in the horizontal directions. Should be a 3-tuple, with each entry a list of the number of elements per horizontal dimension. Index 0 of the tuple contain a list of the number of elements in the layer above, index 1 the number of elements in the current layer, and index 2 the number of elements below. Relevant for this function is that the entries representing the off-the-end direction of bounding layers should be of length 0. |
| Type: | bool |
| Description: | Whether or not to attempt the simplification. Usually should be a condition that is True if the number of connector layers is close to the minimum number of vertical elements in the layer. |
tuple[list[tuple[int, _InterlayerConnectorProtocol]], list[tuple[int, _InterlayerConnectorProtocol]], list[int]]def v_dict(
min_v: float, max_v: float, cs: CoordinateSystem
) -> dict[str, float]: ...| Type: | float |
| Description: | The minimum vertical coordinate. |
| Type: | float |
| Description: | The maximum vertical coordinate. |
| Type: | CoordinateSystem |
| Description: | The coordinate system. |
dict[str, float]