Mondaic

salvus.mesh.layered_meshing.meshing_protocol.coarsening_policy.interlayer_constant

salvus.mesh.layered_meshing.meshing_protocol.coarsening_policy.interlayer_constant salvus mesh layered_meshing meshing_protocol coarsening_policy interlayer_constant

Enforce a constant number of elements between layers.

Classes

InterlayerConstant

class InterlayerConstant(
    salvus.mesh.layered_meshing.meshing_protocol.coarsening_policy.InterlayerCoarseningPolicy
):
    def __init__(self) -> None: ...

Ensure an equal number of elements across adjacent layers.

Attributes
coarsening_factor None

No coarsening is allowed across the boundary.

Returns: None, requiring an equal number of elements in both layers.

max_coarsening int

The largest number of successive coarsenings allowed at a boundary.

Returns: 0, as no coarsening may take place across this boundary.

Methods
interlayer_connector()
def interlayer_connector(
    self,
    l0: tuple[list[int], int],
    l1: tuple[list[int], int],
    cs: CoordinateSystem,
    layer_bounds: dict[str, tuple[float, float]],
) -> tuple[
    list[tuple[int, _InterlayerConnectorProtocol]],
    list[tuple[int, _InterlayerConnectorProtocol]],
]: ...

No connectors are required for a constant policy.

Parameters
  • l0 tuple[list[int], int] — Number of elements in layer a.
  • l1 tuple[list[int], int] — Number of elements in layer b.
  • cs CoordinateSystem — The coordinate system.
  • layer_bounds dict[str, tuple[float, float]] — The bounds of the associated layer.
Returns tuple[list[tuple[int, _InterlayerConnectorProtocol]], list[tuple[int, _InterlayerConnectorProtocol]]] — A tuple of empty lists (no connectors).

Used in tutorials