salvus.mesh.data_structures.salvus_mesh.linear_solids
salvus.mesh.data_structures.salvus_mesh.linear_solids salvus mesh data_structures salvus_mesh linear_solids Minimal linear solids data structure for attachment to meshes.
Should not include any algorithms.
Classes
LinearSolidsOnMesh
LinearSolidsOnMeshclass LinearSolidsOnMesh(builtins.object):
def __init__(
self,
number_linear_solids: int,
reference_frequency: float,
min_frequency: float,
max_frequency: float,
relaxation_frequencies: npt.NDArray,
relaxation_coefficients: npt.NDArray,
) -> None: ...Parameters defining linear solids on a mesh for attenuation modelling.
This class encapsulates the parameters required to define linear solids for attenuation modelling on a mesh. It includes methods to create an instance by fitting to a power-law Q model.
If no relaxation frequencies and coefficients are fitted yet, use the
from_unfitted class method to create an instance by fitting to a
power-law Q model. See its documentation for more configuration options
available during fitting.
Parameters
number_linear_solidsint — The number of linear solids to use.reference_frequencyfloat — The reference frequency in Hz.min_frequencyfloat — The minimum frequency in Hz.max_frequencyfloat — The maximum frequency in Hz.relaxation_frequenciesnpt.NDArray — Relaxation frequencies (angular, rad/s) for the linear solids.relaxation_coefficientsnpt.NDArray — Relaxation coefficients for the linear solids.
Methods
from_unfitted()
from_unfitted()def from_unfitted(
number_linear_solids: int,
reference_frequency: float,
min_frequency: float,
max_frequency: float,
power_law_ref_frequency_in_hertz: float = 1,
power_law_exponent: float = 0,
linearized: bool = True,
samples: int = 100,
weighted_least_squares: bool = True,
) -> LinearSolidsOnMesh: ...Create a LinearSolidsOnMesh instance by fitting to a power-law Q model.
Parameters
number_linear_solidsint — The number of linear solids to use.reference_frequencyfloat — The reference frequency in Hz.min_frequencyfloat — The minimum frequency in Hz.max_frequencyfloat — The maximum frequency in Hz.power_law_ref_frequency_in_hertzfloat — The reference frequency for the power-law Q model in Hz.power_law_exponentfloat — The exponent for the power-law Q model.linearizedbool — Whether to use the linearized form of the equations.samplesint — The number of frequency samples to use in the fitting.weighted_least_squaresbool — Whether to use weighted least squares in the fitting.
Returns LinearSolidsOnMesh — A LinearSolidsOnMesh instance with the fitted parameters.
copy()
copy()def copy(self) -> LinearSolidsOnMesh: ...Return a deep copy of the object.
Returns LinearSolidsOnMesh