salvus.mesh.mesh.deformed_regular_grid
Generate deformed regular grids.
Functions
create_deformed_regular_grid()
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
sizexarray.core.dataset.Dataset — element sizesmoothing_lengthfloat — use minimum of h within distance of smoothing_length * h
Returns salvus.mesh.unstructured_mesh.UnstructuredMesh
create_smoothed_deformed_regular_grid()
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
sizexarray.core.dataset.Dataset — element sizesmoothing_lengthfloat — use minimum of h within distance of smoothing_length * hrefinement_factorint — after smoothing, refine by this factorapply_domain_maskbool — mask out elements outside of the box domain
Returns salvus.mesh.unstructured_mesh.UnstructuredMesh