Semi-Lagrangian Library
Modular library for kinetic and gyrokinetic simulations of plasmas in fusion energy devices.
|
Implements split operators for linear pendulum.
Solve linear pendulum problem: \( \frac{dx}{dt} = v \), \( \frac{dv}{dt} = - \omega^2 x \). The exact solution is
\[ x(t)= x(0)\cos (\omega t) + \frac{v(0)}{\omega}\sin (\omega t), ~~~ v(t)= -x(0)\omega\sin (\omega t) + v(0)\cos (\omega t) \]
Derived types and interfaces | |
type | linear_pendulum_operators |
Simple operator splitting type for linear pendulum Extends operator splitting. More... | |
Functions/Subroutines | |
subroutine | push_x (this, dt) |
Implements the first operator of splitting for linear pendulum. More... | |
subroutine | push_v (this, dt) |
Implements the second operator of splitting for linear pendulum. More... | |
subroutine, public | sll_s_check_order (method, steps_fine, expected_order, test_passed) |
checks the order of a splitting method on the linear pendulum. used for unit testing. More... | |
Variables | |
real(kind=f64), parameter | omega = 2.0_f64 |
frequency More... | |
real(kind=f64), parameter | x0 = 1.0_f64 |
initial x for order checking More... | |
real(kind=f64), parameter | v0 = 2.0_f64 |
initial v for order checking More... | |
real(kind=f64), parameter | t_final = 1.0_f64 |
final time for order checking More... | |
|
private |
Implements the second operator of splitting for linear pendulum.
[in,out] | this | object |
[in] | dt | time step |
Definition at line 56 of file sll_m_linear_pendulum_operators.F90.
|
private |
Implements the first operator of splitting for linear pendulum.
[in,out] | this | object |
[in] | dt | time step |
Definition at line 48 of file sll_m_linear_pendulum_operators.F90.
subroutine, public sll_m_linear_pendulum_operators::sll_s_check_order | ( | integer(kind=i32), intent(in) | method, |
real(kind=f64), intent(in) | steps_fine, | ||
integer(kind=i32), intent(in) | expected_order, | ||
logical, intent(inout) | test_passed | ||
) |
checks the order of a splitting method on the linear pendulum. used for unit testing.
[in] | method | splitting method to be chosen from those implemented in sll_m_operator_splitting |
[in] | steps_fine | number of steps on fine grid |
[in] | expected_order | expected_order of the method |
[in,out] | test_passed | check if test successful |
Definition at line 65 of file sll_m_linear_pendulum_operators.F90.
|
private |
frequency
Definition at line 41 of file sll_m_linear_pendulum_operators.F90.
|
private |
final time for order checking
Definition at line 44 of file sll_m_linear_pendulum_operators.F90.
|
private |
initial v for order checking
Definition at line 43 of file sll_m_linear_pendulum_operators.F90.
|
private |
initial x for order checking
Definition at line 42 of file sll_m_linear_pendulum_operators.F90.