salvus.mesh.layered_meshing.meshing_protocol.coarsening_policy.interlayer_tripling
Interlayer tripling.
Classes
InterlayerTripling
InterlayerTriplingclass InterlayerTripling(
salvus.mesh.layered_meshing.meshing_protocol.coarsening_policy.InterlayerCoarseningPolicy
):
def __init__(self) -> None: ...Ensure the # of elements across adjacent layers differs by a factor of 3.
interlayer_connector()
interlayer_connector()def interlayer_connector(
self,
l0: Tuple[List[int], int],
l1: Tuple[List[int], int],
cs: salvus.geometry.coordinates.coordinates.CoordinateSystem,
layer_bounds: Dict[str, Tuple[float, float]],
) -> Tuple[
List[
Tuple[
int,
Union[
salvus.mesh.layered_meshing.meshing_protocol.coarsening_policy._InterlayerConnectorProtocol2D,
salvus.mesh.layered_meshing.meshing_protocol.coarsening_policy._InterlayerConnectorProtocol3D,
],
]
],
List[
Tuple[
int,
Union[
salvus.mesh.layered_meshing.meshing_protocol.coarsening_policy._InterlayerConnectorProtocol2D,
salvus.mesh.layered_meshing.meshing_protocol.coarsening_policy._InterlayerConnectorProtocol3D,
],
]
],
]: ...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.
l0Tuple[List[int], int] — Tuple of: (list of number of elements in each horizontal direction, number of vertical elements) in the top layer.l1Tuple[List[int], int] — Tuple of: (list of number of elements in each horizontal direction, number of vertical elements) in the bottom layer.cssalvus.geometry.coordinates.coordinates.CoordinateSystem — The coordinate system.layer_boundsDict[str, Tuple[float, float]] — The bounds of the associated layer.
interlayer_constraint()
interlayer_constraint()def interlayer_constraint(
self,
a: List[ortools.sat.python.cp_model.IntVar],
b: List[ortools.sat.python.cp_model.IntVar],
) -> List[List[ortools.sat.python.cp_model.BoundedLinearExpression]]: ...Generate the interlayer constraints.
aList[ortools.sat.python.cp_model.IntVar] — Number of horizontal elements in layer a.bList[ortools.sat.python.cp_model.IntVar] — Number of horizontal elements in layer b.