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

salvus.mesh.layered_meshing.meshing_protocol.coarsening_policy.intralayer_variable

Constant size function.

Classes

IntralayerVariable

class IntralayerVariable(
    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,
        allow_deformed_bounding_interfaces: bool = False,
    ) -> None: ...

Use a constant 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 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.
  • allow_deformed_bounding_interfaces bool — This policy reduces the wavelength oracle to its minimum value along the horizontal axes, and therefore works best when the mesh is regular. If maintaining a strict average number of elements per wavelength is not critical for the application, setting this value to True will allow for the policy to be injected in cases where the bounding interfaces are not flat.
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.material._details.parameter.parameter_types.RealizedParameter,
    cs: salvus.geometry.coordinates.coordinates.CoordinateSystem,
) -> List[salvus.mesh.data_structures.mesh_block.mesh_block.MeshBlock]: ...

Returns a MeshBlock that has potentially variable element sizes.

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.material._details.parameter.parameter_types.RealizedParameter — The minimum wavelengths.
  • cs salvus.geometry.coordinates.coordinates.CoordinateSystem — The coordinate system.
Returns List[salvus.mesh.data_structures.mesh_block.mesh_block.MeshBlock] — The mesh block.