Mondaic
This API reference is not for the latest stable Salvus version.

salvus.mesh.layered_meshing.meshing_protocol.coarsening_policy.intralayer_vertical_refine

Allow for vertical refinements in a layer.

Classes

IntralayerVerticalRefine

class IntralayerVerticalRefine(
    salvus.mesh.layered_meshing.meshing_protocol.coarsening_policy.IntralayerCoarseningPolicy
):
    def __init__(
        self,
        fixed_horizontal_element_boundaries: List[List[float]] = default,
        min_layer_thickness: Optional[float] = None,
        max_vertical_oversampling_factor: int = 3,
        max_aspect_ratio: float = 10.0,
        refinement_type: Literal[("doubling", "tripling")] = "tripling",
    ) -> None:
        ...

Construct a coarsening policy that allows for vertical refinements.

Parameters
  • fixed_horizontal_element_boundaries List[List[float]] — An optional array of horizontal coordinate values where fixed element boundaries should occur. Useful for respecting the mesh of simple vertical structures and the like. For 3-D meshes one can pass a list of lists of values, which correspond to the first and second coordinate axes (i.e x and y) respectively.
  • min_layer_thickness Optional[float] — If a float is specified here, mask out all elements in this layer where the layer thickness is less than this value. Useful for masking out elements in shallow water layers.
  • max_vertical_oversampling_factor int — An integer factor higher than 1 fives more flexibility to the ILP solve for an optimal number of vertical elements versus the default. Set this parameter to 2 or 3 (or higher) if no feasible intralayer coarsening solutions are found.
  • max_aspect_ratio float — Ensure that the vertical dimension of each element are no more than this many times the horizontal dimensions. Defaults to 10.0
  • refinement_type Literal[('doubling', 'tripling')] — The type of vertical refinements to use. ‘doubling’ usually gives a better time step, but since it changes the number of elements in the horizontal direction it can only be used in the top layer of any layered model.
Methods
basic_block()
def basic_block(
    self,
    elm_p_wav: Tuple[float, ...],
    n_elm_h: List[int],
    n_elm_c: int,
    i_bot: salvus.mesh.layered_meshing.interface.Interface,
    i_top: salvus.mesh.layered_meshing.interface.Interface,
    b_flat: float,
    t_flat: float,
    mw: salvus.mesh.layered_meshing.material.parameter._RealizedParameter,
    cs: salvus.project.components.types.CoordinateSystem,
) -> List[salvus.mesh.mesh_block.mesh_block.MeshBlock]:
    ...

Get the rectangle or cube constructors.

May return an empty list if it is detected that the connector blocks already span the entire layer.

Parameters
  • elm_p_wav Tuple[float, ...] — The number of elements per wavelength.
  • n_elm_h List[int] — The number of elements in the horizontal directions.
  • n_elm_c int — The total number of elements in the connectors.
  • i_bot salvus.mesh.layered_meshing.interface.Interface — The bottom interface.
  • i_top salvus.mesh.layered_meshing.interface.Interface — The top interface.
  • b_flat float — The bottom elevation of the flattened mesh block.
  • t_flat float — The top elevation of the flattened mesh block.
  • mw salvus.mesh.layered_meshing.material.parameter._RealizedParameter — The minimum wavelengths.
  • cs salvus.project.components.types.CoordinateSystem — The coordinate system.
Returns List[salvus.mesh.mesh_block.mesh_block.MeshBlock] — The mesh block.