Mondaic

salvus.mesh.layered_meshing.layered_model.reductions

salvus.mesh.layered_meshing.layered_model.reductions salvus mesh layered_meshing layered_model reductions

Pre-defined reductions for use with layered models.

Functions

get_max_element_size_reduction_function()

def get_max_element_size_reduction_function(
    reference_frequency: float_,
    elements_per_wavelength: list[tuple[float_, ...]],
) -> layered_model._ReduceLayersProtocol[list[float]]: ...

Create a reduction function that returns the maximum element sizes.

Parameters
  • reference_frequency float_ — The reference frequency of the simulation.
  • elements_per_wavelength list[tuple[float_, ...]] — The number of elements per wavelength. Must already be expanded to the entire domain, i.e. via a call to MeshResolution.broadcast_elements_per_wavelength(…).
Returns layered_model._ReduceLayersProtocol[list[float]] — A function that can be used with layered_model.reduce_layers(...) to get the maximum allowable element size in each layer.

get_min_wavelength_reduction_function()

def get_min_wavelength_reduction_function(
    reference_frequency: float_,
) -> layered_model._ReduceLayersProtocol[realized.RealizedParameter]: ...

Create a reduction function that returns the minimum wavelength.

Parameters
  • reference_frequency float_ — Frequency to compute the minimum wavelength at.
Returns layered_model._ReduceLayersProtocol[realized.RealizedParameter] — A function that can be used with layered_model.reduce_layers(...) to get the minimum wavelength in each layer.

max_elevation()

def max_elevation(layer: layer.Layer) -> float: ...

Get a layer’s maximum elevation.

Parameters
  • layer layer.Layer — The layer.
Returns float — The layer’s max elevation.

max_layer_thickness()

def max_layer_thickness(layer: layer.Layer) -> float: ...

Get a layer’s maximum thickness.

Parameters
  • layer layer.Layer — The layer.
Returns float — The layer’s maximum thickness.

min_elevation()

def min_elevation(layer: layer.Layer) -> float: ...

Get a layer’s maximum elevation.

Parameters
  • layer layer.Layer — The layer.
Returns float — The layer’s max elevation.

min_layer_thickness()

def min_layer_thickness(layer: layer.Layer) -> float: ...

Get a layer’s minimum thickness.

Parameters
  • layer layer.Layer — The layer.
Returns float — The layer’s minimum thickness.