#include <RK4Integrator.hpp>
|
| | RK4Integrator (Rates< N > &rate_calculator) |
| int16 | step (floating_point start_time, floating_point end_time, const std::array< floating_point, N > &start_state, std::array< floating_point, N > &out_state) override |
| void | configureForStep (floating_point start_time, floating_point end_time, const std::array< floating_point, N > &start_state) |
| | Function to configure a full integration step.
|
| int16 | calculateK1 (std::array< floating_point, N > &state_for_k2) |
| | Function to calculate k1.
|
| int16 | calculateK2 (const std::array< floating_point, N > &state_in_k2, std::array< floating_point, N > &state_for_k3) |
| | Function to calculate k2.
|
| int16 | calculateK3 (const std::array< floating_point, N > &state_in_k2, std::array< floating_point, N > &state_for_k4) |
| | Function to calculate k3.
|
| int16 | calculateK4 (const std::array< floating_point, N > &state_in_k4) |
| | Function to calculate k4.
|
| void | getValueEndStep (std::array< floating_point, N > &end_state) |
| | Calculation of final integrated step at the end of state.
|
| | Integrator (Rates< N > &rate_calculator) |
| | Constructor for the integrator.
|
◆ RK4Integrator()
◆ calculateK1()
Function to calculate k1.
- Parameters
-
| state_for_k2 | The integrated state to be used in the calculation of k2 |
- Returns
- Error code describing success/failure
◆ calculateK2()
template<uint32 N>
| int16 warpos::RK4Integrator< N >::calculateK2 |
( |
const std::array< floating_point, N > & | state_in_k2, |
|
|
std::array< floating_point, N > & | state_for_k3 ) |
Function to calculate k2.
- Parameters
-
| state_in_k2 | The state input to calculate k2 |
| state_for_k3 | The integrated state to be used in the calculation of k3 |
- Returns
- Error code describing success/failure
◆ calculateK3()
template<uint32 N>
| int16 warpos::RK4Integrator< N >::calculateK3 |
( |
const std::array< floating_point, N > & | state_in_k2, |
|
|
std::array< floating_point, N > & | state_for_k4 ) |
Function to calculate k3.
- Parameters
-
| state_in_k3 | The state input to calculate k3 |
| state_for_k4 | The integrated state to be used in the calculation of k4 |
- Returns
- Error code describing success/failure
◆ calculateK4()
Function to calculate k4.
- Parameters
-
| state_in_k4 | The state input to calculate k4 |
- Returns
- Error code describing success/failure
◆ configureForStep()
template<uint32 N>
| void warpos::RK4Integrator< N >::configureForStep |
( |
floating_point | start_time, |
|
|
floating_point | end_time, |
|
|
const std::array< floating_point, N > & | start_state ) |
Function to configure a full integration step.
Functions for manual RK4 control – calling these individually allows a downstream user to manually control RK4 steps. Each is executed in order
for a full step
- Parameters
-
| start_time | Start time for the full integration step |
| end_time | End time for the full integration step |
| start_state | State at start of integration |
◆ getValueEndStep()
Calculation of final integrated step at the end of state.
- Parameters
-
| end_state | State at the end of step |
◆ step()
template<uint32 N>
| int16 warpos::RK4Integrator< N >::step |
( |
floating_point | start_time, |
|
|
floating_point | end_time, |
|
|
const std::array< floating_point, N > & | start_state, |
|
|
std::array< floating_point, N > & | out_state ) |
|
overridevirtual |
Function to take a full integrator step forward from time start to time end
- Parameters
-
| start_time | Start time for integration |
| end_time | End time for integration |
| start_state | State at start of integration |
| out_state | Output state via implicit – result of integration |
Reimplemented from warpos::Integrator< N >.
◆ _end_time
◆ _error
◆ _full_step_size
Step size for integrator.
◆ _half_step_size
◆ _k1
RK4 step rate values k1, k2, k3, k4 and var to calc average rate.
◆ _k2
◆ _k3
◆ _k4
◆ _saved_warning
◆ _start_state
◆ _start_time
◆ _step_average
The documentation for this class was generated from the following file:
- /Users/mickey/Documents/Projects/warptwin/warpos/src/gncutils/integrator/RK4Integrator.hpp