Mondaic

salvus.mesh.layered_meshing.meshing_protocol.coarsening_policy.intralayer_constant

salvus.mesh.layered_meshing.meshing_protocol.coarsening_policy.intralayer_constant salvus mesh layered_meshing meshing_protocol coarsening_policy intralayer_constant

Constant size function.

Classes

IntralayerConstant

class IntralayerConstant(
    salvus.mesh.layered_meshing.meshing_protocol.coarsening_policy.IntralayerCoarseningPolicy
):
    def __init__(
        self,
        fixed_horizontal_element_boundaries: list[list[float]] = default,
        min_layer_thickness: float | None = None,
    ) -> None: ...

Use a constant element size in each dimension.

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 float | None — 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.
Methods
basic_block()
def basic_block(
    self,
    elm_p_wav: tuple[float, ...],
    n_elm_h: list[int],
    n_elm_c: int,
    i_bot: Interface,
    i_top: Interface,
    b_flat: float,
    t_flat: float,
    mw: realized.RealizedParameter,
    cs: CoordinateSystem,
) -> list[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 Interface — The bottom interface.
  • i_top 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 realized.RealizedParameter — The minimum wavelengths.
  • cs CoordinateSystem — The coordinate system.
Returns list[MeshBlock] — The mesh block.

Used in tutorials