scimba_torch.physical_models.ode.damped_harmonic_oscillator¶
Implementation of a damped harmonic oscillator ODE.
Classes
|
Implementation of a damped harmonic oscillator ODE. |
- class DampedHarmonicOscillator(space, init, **kwargs)[source]¶
Bases:
AbstractODEImplementation of a damped harmonic oscillator ODE.
\[\begin{split}\frac{dx}{dt} = - \mu x - y, \\ \frac{dy}{dt} = x - \mu y, \\\end{split}\]with an initial condition given by the function init.
- Parameters:
space (
AbstractApproxSpace) – The approximation space for the probleminit (
Callable) – Callable for the initial condition**kwargs – Additional keyword arguments
- time_operator(w, t, mu)[source]¶
Apply the ODE operator.
- Parameters:
w (
MultiLabelTensor) – Solution tensort (
LabelTensor) – Temporal coordinate tensormu (
LabelTensor) – Parameter tensor
- Return type:
Tensor|tuple[Tensor,...]- Returns:
Operator tensor
- functional_operator(func, t, mu, theta)[source]¶
Compute the functional operator.
- Parameters:
func (
VarArgCallable) – Callable representing the functiont (
Tensor) – Temporal coordinate tensormu (
Tensor) – Parameter tensortheta (
Tensor) – Additional parameters tensor
- Return type:
Tensor- Returns:
Functional operator tensor