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

salvus.mesh.layered_meshing.detail.detail

Utils for layered meshing.

Functions

compute_hmax()

def compute_hmax(
    min_wavelengths: list[_pd.RealizedParameter],
    elements_per_wavelength: list[tuple[float_, ...]],
) -> list[tuple[float, ...]]: ...

Compute the maximum allowable edge length for each dimension in each layer.

Parameters
  • min_wavelengths list[_pd.RealizedParameter] — A list of minimum wavelengths in each layer, each expressed as a RealizedParameter. These values can be obtained by reducing each layer’s material to its wavelength oracle.
  • elements_per_wavelength list[tuple[float_, ...]] — The desired number of elements per wavelength in each dimension.
Returns list[tuple[float, ...]] — A list of tuples containing the maximum edge lengths for each dimension in each layer.

compute_minimum_wavelengths()

def compute_minimum_wavelengths(
    layered_model: _layered_model.LayeredModel,
    reference_frequency: float_,
    oracle_filter: typing.Sequence[filters.OracleFilter] | None = None,
) -> list[_pd.RealizedParameter]: ...

Compute the maximum element sizes.

Parameters
  • layered_model _layered_model.LayeredModel — The layered model.
  • reference_frequency float_ — The reference frequency.
  • oracle_filter typing.Sequence[filters.OracleFilter] | None — A function which can filter the wavelength oracle to restrict the minimum wavelength computation.
Returns list[_pd.RealizedParameter] — A list of the minimum wavelengths in each layer wrapped in the appropriate parameter type.

deform_mesh_block()

def deform_mesh_block(
    d: domain.DomainBounds,
    mb: mesh_block.MeshBlock,
    bot: interface.Interface,
    top: interface.Interface,
    cs: CoordinateSystem,
) -> mesh_block.MeshBlock: ...

Deform a mesh block to respect two interfaces.

Parameters
  • d domain.DomainBounds — The bounds of the domain.
  • mb mesh_block.MeshBlock — The mesh block to deform.
  • bot interface.Interface — The bottom interface.
  • top interface.Interface — The top interface.
  • cs CoordinateSystem — The coordinate system of the mesh block.
Returns mesh_block.MeshBlock — A (potentially) deformed mesh block.

expand_elements_per_wavelength()

def expand_elements_per_wavelength(
    elements_per_wavelength: tuple[float, ...], n_dim: int
) -> tuple[float, ...]: ...

Expand the elements per wavelength so there is one value per dimension.

Parameters
  • elements_per_wavelength tuple[float, ...] — The elements per wavelength.
  • n_dim int — The number of dimensions.
Returns tuple[float, ...] — A tuple with a value of elements per wavelength per dimension.