DiffEq - Modern C++ ODE Integration Library 1.0.0
High-performance C++ library for solving ODEs with async signal processing
Loading...
Searching...
No Matches
diffeq::MilsteinIntegrator< StateType > Class Template Reference

Milstein method for SDEs. More...

#include <milstein.hpp>

Inheritance diagram for diffeq::MilsteinIntegrator< StateType >:
Collaboration diagram for diffeq::MilsteinIntegrator< StateType >:

Public Types

using base_type = sde::AbstractSDEIntegrator< StateType >
 
using state_type = typename base_type::state_type
 
using time_type = typename base_type::time_type
 
using value_type = typename base_type::value_type
 
using diffusion_derivative_function = std::function< void(time_type, const state_type &, state_type &)>
 
- Public Types inherited from diffeq::sde::AbstractSDEIntegrator< StateType >
using state_type = StateType
 
using time_type = typename StateType::value_type
 
using value_type = typename StateType::value_type
 
using sde_problem_type = SDEProblem< StateType >
 
using wiener_process_type = WienerProcess< StateType >
 

Public Member Functions

 MilsteinIntegrator (std::shared_ptr< typename base_type::sde_problem_type > problem, diffusion_derivative_function diffusion_derivative, std::shared_ptr< typename base_type::wiener_process_type > wiener=nullptr)
 
void step (state_type &state, time_type dt) override
 
std::string name () const override
 
- Public Member Functions inherited from diffeq::sde::AbstractSDEIntegrator< StateType >
 AbstractSDEIntegrator (std::shared_ptr< sde_problem_type > problem, std::shared_ptr< wiener_process_type > wiener=nullptr)
 
void integrate (state_type &state, time_type dt, time_type end_time)
 
time_type current_time () const
 
void set_time (time_type t)
 
std::shared_ptr< sde_problem_typeget_problem () const
 
std::shared_ptr< wiener_process_typeget_wiener_process () const
 
void set_wiener_process (std::shared_ptr< wiener_process_type > wiener)
 

Additional Inherited Members

- Protected Member Functions inherited from diffeq::sde::AbstractSDEIntegrator< StateType >
void advance_time (time_type dt)
 
virtual size_t get_default_dimension ()
 
- Protected Attributes inherited from diffeq::sde::AbstractSDEIntegrator< StateType >
std::shared_ptr< sde_problem_typeproblem_
 
std::shared_ptr< wiener_process_typewiener_
 
time_type current_time_
 

Detailed Description

template<system_state StateType>
class diffeq::MilsteinIntegrator< StateType >

Milstein method for SDEs.

First-order strong method with correction term: X_{n+1} = X_n + f(t_n, X_n) * dt + g(t_n, X_n) * dW_n + 0.5 * g(t_n, X_n) * g'(t_n, X_n) * (dW_n^2 - dt)

Strong order: 1.0 Weak order: 1.0

Note: Requires derivative of diffusion function g'(t, X)

Definition at line 22 of file milstein.hpp.

Member Typedef Documentation

◆ base_type

template<system_state StateType>
using diffeq::MilsteinIntegrator< StateType >::base_type = sde::AbstractSDEIntegrator<StateType>

Definition at line 24 of file milstein.hpp.

◆ diffusion_derivative_function

template<system_state StateType>
using diffeq::MilsteinIntegrator< StateType >::diffusion_derivative_function = std::function<void(time_type, const state_type&, state_type&)>

Definition at line 30 of file milstein.hpp.

◆ state_type

template<system_state StateType>
using diffeq::MilsteinIntegrator< StateType >::state_type = typename base_type::state_type

Definition at line 25 of file milstein.hpp.

◆ time_type

template<system_state StateType>
using diffeq::MilsteinIntegrator< StateType >::time_type = typename base_type::time_type

Definition at line 26 of file milstein.hpp.

◆ value_type

template<system_state StateType>
using diffeq::MilsteinIntegrator< StateType >::value_type = typename base_type::value_type

Definition at line 27 of file milstein.hpp.

Constructor & Destructor Documentation

◆ MilsteinIntegrator()

template<system_state StateType>
diffeq::MilsteinIntegrator< StateType >::MilsteinIntegrator ( std::shared_ptr< typename base_type::sde_problem_type problem,
diffusion_derivative_function  diffusion_derivative,
std::shared_ptr< typename base_type::wiener_process_type wiener = nullptr 
)
inlineexplicit

Definition at line 32 of file milstein.hpp.

Member Function Documentation

◆ name()

template<system_state StateType>
std::string diffeq::MilsteinIntegrator< StateType >::name ( ) const
inlineoverridevirtual

Implements diffeq::sde::AbstractSDEIntegrator< StateType >.

Definition at line 77 of file milstein.hpp.

◆ step()

template<system_state StateType>
void diffeq::MilsteinIntegrator< StateType >::step ( state_type &  state,
time_type  dt 
)
inlineoverridevirtual

Implements diffeq::sde::AbstractSDEIntegrator< StateType >.

Definition at line 38 of file milstein.hpp.


The documentation for this class was generated from the following file: