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::EulerIntegrator< S > Class Template Reference

Forward Euler integrator. More...

#include <euler.hpp>

Inheritance diagram for diffeq::EulerIntegrator< S >:
Collaboration diagram for diffeq::EulerIntegrator< S >:

Public Types

using base_type = core::AbstractIntegrator< S >
 
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 system_function = typename base_type::system_function
 
- Public Types inherited from diffeq::core::AbstractIntegrator< S >
using state_type = S
 
using time_type = typename S::value_type
 
using value_type = typename S::value_type
 
using system_function = std::function< void(time_type, const state_type &, state_type &)>
 

Public Member Functions

 EulerIntegrator (system_function sys)
 
void step (state_type &state, time_type dt) override
 
- Public Member Functions inherited from diffeq::core::AbstractIntegrator< S >
 AbstractIntegrator (system_function sys)
 
virtual void integrate (state_type &state, time_type dt, time_type end_time)
 
time_type current_time () const
 
void set_time (time_type t)
 
void set_system (system_function sys)
 

Additional Inherited Members

- Protected Member Functions inherited from diffeq::core::AbstractIntegrator< S >
void advance_time (time_type dt)
 
- Protected Attributes inherited from diffeq::core::AbstractIntegrator< S >
system_function sys_
 
time_type current_time_
 

Detailed Description

template<system_state S>
class diffeq::EulerIntegrator< S >

Forward Euler integrator.

First-order explicit method. Simple but often unstable.

Order: 1 Stability: Poor for stiff problems Usage: Educational purposes, simple problems

Definition at line 18 of file euler.hpp.

Member Typedef Documentation

◆ base_type

template<system_state S>
using diffeq::EulerIntegrator< S >::base_type = core::AbstractIntegrator<S>

Definition at line 20 of file euler.hpp.

◆ state_type

template<system_state S>
using diffeq::EulerIntegrator< S >::state_type = typename base_type::state_type

Definition at line 21 of file euler.hpp.

◆ system_function

template<system_state S>
using diffeq::EulerIntegrator< S >::system_function = typename base_type::system_function

Definition at line 24 of file euler.hpp.

◆ time_type

template<system_state S>
using diffeq::EulerIntegrator< S >::time_type = typename base_type::time_type

Definition at line 22 of file euler.hpp.

◆ value_type

template<system_state S>
using diffeq::EulerIntegrator< S >::value_type = typename base_type::value_type

Definition at line 23 of file euler.hpp.

Constructor & Destructor Documentation

◆ EulerIntegrator()

template<system_state S>
diffeq::EulerIntegrator< S >::EulerIntegrator ( system_function  sys)
inlineexplicit

Definition at line 26 of file euler.hpp.

Member Function Documentation

◆ step()

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

Implements diffeq::core::AbstractIntegrator< S >.

Definition at line 29 of file euler.hpp.


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