Required
mesh| Type: | UnstructuredMesh |
| Description: | The mesh to compute it for. |
def compute_determinants(mesh: UnstructuredMesh) -> npt.NDArray: ...| Type: | UnstructuredMesh |
| Description: | The mesh to compute it for. |
npt.NDArraydef compute_maximum_edge_length_per_element(
mesh: UnstructuredMesh, mask: npt.NDArray | None = None
) -> npt.NDArray: ...| Type: | UnstructuredMesh |
| Description: | The mesh to compute it for. |
| Type: | npt.NDArray | None |
| Default value: | None |
| Description: | Apply a mask on the connectivity. |
npt.NDArraydef compute_mesh_quality(
mesh: UnstructuredMesh, quality_metric: str = "edge_aspect_ratio"
) -> npt.NDArray: ...| Type: | UnstructuredMesh |
| Description: | The mesh to compute it for. |
| Type: | str |
| Default value: | 'edge_aspect_ratio' |
| Description: | The quality metric to compute. |
npt.NDArraydef compute_minimum_edge_length_per_element(
mesh: UnstructuredMesh,
mask: npt.NDArray | None = None,
direction: int | None = None,
shape_order: int | None = None,
) -> npt.NDArray: ...| Type: | UnstructuredMesh |
| Description: | The mesh to compute it for. |
| Type: | npt.NDArray | None |
| Default value: | None |
| Description: | Optional mask to only compute it for a subset of elements. True includes elements. |
| Type: | int | None |
| Default value: | None |
| Description: | Shortest edge-length along a given direction of the reference element in reference coordinates. |
| Type: | int | None |
| Default value: | None |
| Description: | Override shape order for edge length computation. |
npt.NDArraysn.WaveformSimulationConfiguration( spectral_element_order=spectral_element_order, ..., )
def compute_minimum_gll_distance(
mesh: UnstructuredMesh,
shape_order: int,
execution_policy: bindings.ExecutionPolicy = salvus._core.lib.salvus_core_python_bindings.ExecutionPolicy,
use_bindings: bool = True,
) -> npt.NDArray: ...| Type: | UnstructuredMesh |
| Description: | The mesh to compute the minimum GLL distance for. |
| Type: | int |
| Description: | The shape order to use for the GLL points. |
| Type: | bindings.ExecutionPolicy |
| Default value: | <salvus._core.lib.salvus_core_python_bindings.ExecutionPolicy object at 0x7c032b939a30> |
| Description: | The execution policy to use for C++ bindings. |
| Type: | bool |
| Default value: | True |
| Description: | Whether to use the C++ bindings for improved performance. |
npt.NDArraysn.WaveformSimulationConfiguration( spectral_element_order=spectral_element_order, ..., )
def compute_time_step(
mesh: UnstructuredMesh,
max_velocity: npt.NDArray | float,
courant_number: float | None = None,
simulation_order: int | None = None,
attach: bool = False,
execution_policy: bindings.ExecutionPolicy = salvus._core.lib.salvus_core_python_bindings.ExecutionPolicy,
use_bindings: bool = True,
) -> tuple[float, npt.NDArray]: ...| Type: | UnstructuredMesh |
| Description: | The mesh to compute the time step for. |
| Type: | npt.NDArray | float |
| Description: | The maximum velocity to use for the time step computation. Can be passed globally or per element. |
| Type: | float | None |
| Default value: | None |
| Description: | The Courant number to use for the CFL condition. |
| Type: | int | None |
| Default value: | None |
| Description: | The shape order to use for the time step computation. |
| Type: | bool |
| Default value: | False |
| Description: | Whether to attach the computed time step to the mesh. Will raise an error if the field time_step is already attached. |
| Type: | bindings.ExecutionPolicy |
| Default value: | <salvus._core.lib.salvus_core_python_bindings.ExecutionPolicy object at 0x7c032bd0d7b0> |
| Description: | The execution policy to use for C++ bindings. |
| Type: | bool |
| Default value: | True |
| Description: | Whether to use the C++ bindings for improved performance. |
time_step is already attached to the mesh and attach is True.tuple[float, npt.NDArray]def estimate_resolved_frequency(
mesh: UnstructuredMesh,
min_velocity: npt.NDArray,
elements_per_wavelength: float,
) -> tuple[float, npt.NDArray]: ...| Type: | UnstructuredMesh |
| Description: | The mesh to compute it for. |
| Type: | npt.NDArray |
| Description: | Minimum velocity in each element. |
| Type: | float |
| Description: | The elements per wavelength. |
tuple[float, npt.NDArray]compute_time_step, which uses
more appropriate defaults and a simplified API.def estimate_time_step(
mesh: UnstructuredMesh,
max_velocity: npt.NDArray | float,
courant_number: float = 1.0,
min_gll_point_distance: float = 1.0,
fast: bool = True,
return_hmin_elemnodes: bool = False,
shape_order: int | None = None,
execution_policy: bindings.ExecutionPolicy = salvus._core.lib.salvus_core_python_bindings.ExecutionPolicy,
) -> tuple[float, npt.NDArray] | tuple[float, npt.NDArray, npt.NDArray]: ...| Type: | UnstructuredMesh |
| Description: | The mesh to compute the time step for. |
| Type: | npt.NDArray | float |
| Description: | Fastest velocity overall or per element. If the velocities are heterogeneous, more accurate (and less conservative) estimates will be provided by passing the varying velocities. |
| Type: | float |
| Default value: | 1.0 |
| Description: | The Courant number to use in the CFL-criterion. |
| Type: | float |
| Default value: | 1.0 |
| Description: | The minimum distance between GLL points. |
| Type: | bool |
| Default value: | True |
| Description: | Whether to use the fast estimation method. |
| Type: | bool |
| Default value: | False |
| Description: | Whether to return the minimum within-element distances. |
| Type: | int | None |
| Default value: | None |
| Description: | Override shape order for edge length computation. Useful, as Salvus meshes and wavefields are not necessarily defined at the same order. By default, Salvus will define wavefields on fourth order shape functions. |
| Type: | bindings.ExecutionPolicy |
| Default value: | <salvus._core.lib.salvus_core_python_bindings.ExecutionPolicy object at 0x7c032d80be30> |
| Description: | The execution policy to use for C++ bindings. |
tuple[float, npt.NDArray] | tuple[float, npt.NDArray, npt.NDArray]