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
InterlayerConstantclass 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
coarsening_factor NoneNo coarsening is allowed across the boundary.
Returns:
None, requiring an equal number of elements in both layers.
max_coarsening int
max_coarsening intThe largest number of successive coarsenings allowed at a boundary.
Returns: 0, as no coarsening may take place across this boundary.
Methods
interlayer_connector()
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
l0tuple[list[int], int] — Number of elements in layer a.l1tuple[list[int], int] — Number of elements in layer b.csCoordinateSystem — The coordinate system.layer_boundsdict[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).