Version:

salvus.mesh.layered_meshing.meshing_protocol.coarsening_policy.interlayer_tripling

salvus.mesh.layered_meshing.meshing_protocol.coarsening_policy.interlayer_tripling salvus mesh layered_meshing meshing_protocol coarsening_policy interlayer_tripling
Interlayer tripling.

Classes

InterlayerTripling

Ensure the # of elements across adjacent layers differs by a factor of 3.
SIGNATURE
class InterlayerTripling(
    salvus.mesh.layered_meshing.meshing_protocol.coarsening_policy.InterlayerCoarseningPolicy
):
    def __init__(self) -> None: ...

Methods

InterlayerTripling.interlayer_connector()
Callable which returns a MeshBlock that connects two layers.
A tuple of lists of tuple is returned, the first element of which is the number of connecting mesh blocks that need to be constructed. For instance, if the interlayer policy is "doubling", and the number of elements between two layers different by a factor 4, the first element of the returned tuple should be 2. The second element is a partial function with the n_elem_ arguments already applied, and which can then subsequently be called with extents.
A tuple is returned, the first element specifying the connectors required for the layer's top, and the second for the layer's bottom.
SIGNATURE
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]],
]: ...
ARGUMENTS
Required
l0
Type:tuple[list[int], int]
Description:
Tuple of: (list of number of elements in each horizontal direction, number of vertical elements) in the top layer.
Required
l1
Type:tuple[list[int], int]
Description:
Tuple of: (list of number of elements in each horizontal direction, number of vertical elements) in the bottom layer.
Required
cs
Type:CoordinateSystem
Description:
The coordinate system.
Required
layer_bounds
Type:dict[str, tuple[float, float]]
Description:
The bounds of the associated layer.
InterlayerTripling.interlayer_constraint()
Generate the interlayer constraints.
SIGNATURE
def interlayer_constraint(
    self, a: list[cp_model.IntVar], b: list[cp_model.IntVar]
) -> list[list[cp_model.BoundedLinearExpression]]: ...
ARGUMENTS
Required
a
Type:list[cp_model.IntVar]
Description:
Number of horizontal elements in layer a.
Required
b
Type:list[cp_model.IntVar]
Description:
Number of horizontal elements in layer b.
PAGE CONTENTS