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

salvus.mesh.mesh.deformed_regular_grid

Generate deformed regular grids.

Functions

create_deformed_regular_grid()

def create_deformed_regular_grid(
    size: xarray.core.dataset.Dataset, smoothing_length: float = 0.5
) -> salvus.mesh.unstructured_mesh.UnstructuredMesh:
    ...

create a rectilinear grid using minimum of the size function along the axis

Parameters
  • size xarray.core.dataset.Dataset — element size
  • smoothing_length float — use minimum of h within distance of smoothing_length * h
Returns salvus.mesh.unstructured_mesh.UnstructuredMesh

create_smoothed_deformed_regular_grid()

def create_smoothed_deformed_regular_grid(
    size: xarray.core.dataset.Dataset,
    smoothing_length: float = 0.5,
    refinement_factor: int = 10,
    apply_domain_mask: bool = True,
) -> salvus.mesh.unstructured_mesh.UnstructuredMesh:
    ...

create a rectilinear grid using minimum of the size function along the axis and additionally use smoothing to adapt to the size function

Parameters
  • size xarray.core.dataset.Dataset — element size
  • smoothing_length float — use minimum of h within distance of smoothing_length * h
  • refinement_factor int — after smoothing, refine by this factor
  • apply_domain_mask bool — mask out elements outside of the box domain
Returns salvus.mesh.unstructured_mesh.UnstructuredMesh