salvus.material.utils
salvus.material.utils salvus material utils Utils for SalvusMaterial.
Functions
extract_tensor()
extract_tensor()def extract_tensor(
material: PhysicalMaterial, ndim: typing.Literal[2, 3] = 3
) -> npt.NDArray: ...Extract the stiffness or acoustic tensor from a material.
Creates a full tensor from the material’s parameters in Voigt notation as a NumPy array, even if some entries are not defined in the symmetry of the material. These are the elliptic coefficients of the wave equation solved by SalvusCompute.
The return of this function is not enough to reconstruct the material fully, as it does not include the density or M0 parameters.
materialPhysicalMaterial — The material to extract the tensor from.ndimtyping.Literal[2, 3] — The number of dimensions.
is_acoustic()
is_acoustic()def is_acoustic(
material: Material | type[Material] | list[Material | type[Material]],
) -> bool | list[bool]: ...Determine if a (list of) material(s) is acoustic.
materialMaterial | type[Material] | list[Material | type[Material]] — The material or list of materials to check.
is_anisotropic()
is_anisotropic()def is_anisotropic(
material: Material | list[Material],
) -> bool | list[bool]: ...Determine if a (list of) material(s) is anisotropic.
materialMaterial | list[Material] — The material or list of materials to check.
is_attenuating()
is_attenuating()def is_attenuating(
material: Material | list[Material],
) -> bool | list[bool]: ...Determine if a (list of) material(s) is attenuating.
materialMaterial | list[Material] — The material or list of materials to check.
is_elastic()
is_elastic()def is_elastic(
material: Material | type[Material] | list[Material | type[Material]],
) -> bool | list[bool]: ...Determine if a (list of) material(s) is elastic.
materialMaterial | type[Material] | list[Material | type[Material]] — The material or list of materials to check.
is_homogeneous()
is_homogeneous()def is_homogeneous(
material: Material | list[Material],
) -> bool | list[bool]: ...Determine if a (list of) material(s) is homogeneous.
materialMaterial | list[Material] — The material or list of materials to check.
is_isotropic()
is_isotropic()def is_isotropic(material: Material | list[Material]) -> bool | list[bool]: ...Determine if a (list of) material(s) is isotropic.
materialMaterial | list[Material] — The material or list of materials to check.
is_oriented()
is_oriented()def is_oriented(material: Material | list[Material]) -> bool | list[bool]: ...Determine if a (list of) material(s) is oriented.
materialMaterial | list[Material] — The material or list of materials to check.