Version:

salvus.mesh.layered_meshing.meshing_protocol.coarsening_policy.intralayer_vertical_refine

salvus.mesh.layered_meshing.meshing_protocol.coarsening_policy.intralayer_vertical_refine salvus mesh layered_meshing meshing_protocol coarsening_policy intralayer_vertical_refine
Allow for vertical refinements in a layer.

Classes

IntralayerVerticalRefine

Construct a coarsening policy that allows for vertical refinements.
SIGNATURE
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: float | None = None,
        max_vertical_oversampling_factor: int = 3,
        max_aspect_ratio: float = 10.0,
        refinement_type: typing.Literal["doubling", "tripling"] = "tripling",
    ) -> None: ...
ARGUMENTS
Optional
fixed_horizontal_element_boundaries
Type:list[list[float]]
Default value:<factory>
Description:
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.
Optional
min_layer_thickness
Type:float | None
Default value:None
Description:
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.
Optional
max_vertical_oversampling_factor
Type:int
Default value:3
Description:
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.
Optional
max_aspect_ratio
Type:float
Default value:10.0
Description:
Ensure that the vertical dimension of each element are no more than this many times the horizontal dimensions. Defaults to 10.0
Optional
refinement_type
Type:typing.Literal['doubling', 'tripling']
Default value:'tripling'
Description:
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

IntralayerVerticalRefine.basic_block()
Get the rectangle or cube constructors.
May return an empty list if it is detected that the connector blocks already span the entire layer.
SIGNATURE
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]: ...
ARGUMENTS
Required
elm_p_wav
Type:tuple[float, ...]
Description:
The number of elements per wavelength.
Required
n_elm_h
Type:list[int]
Description:
The number of elements in the horizontal directions.
Required
n_elm_c
Type:int
Description:
The total number of elements in the connectors.
Required
i_bot
Type:Interface
Description:
The bottom interface.
Required
i_top
Type:Interface
Description:
The top interface.
Required
b_flat
Type:float
Description:
The bottom elevation of the flattened mesh block.
Required
t_flat
Type:float
Description:
The top elevation of the flattened mesh block.
Required
mw
Type:realized.RealizedParameter
Description:
The minimum wavelengths.
Required
cs
Type:CoordinateSystem
Description:
The coordinate system.
PAGE CONTENTS