24#include "AstMath/ODEEventDetectorList.hpp"
25#include "AstMath/ODEStateObserverList.hpp"
26#include "AstMath/ODEInnerStateObserver.hpp"
27#include "AstMath/OrdinaryDifferentialEquation.hpp"
33class ODEEventDetector;
55 virtual errc_t
integrate(
ODE& ode,
double* y,
double& t,
double tf) = 0;
73 virtual errc_t
singleStep(
ODE& ode,
double* y,
double t0,
double step) = 0;
86 using IODEIntegrator::integrate;
88 errc_t initialize(
ODE& ode)
override;
101 ODE& ode,
double* y,
double& t,
double tf,
102 std::vector<double>& xlist, std::vector<std::vector<double>>& ylist
112 template<
typename Func>
113 errc_t
integrate(
int ndim, Func func,
double* y,
double& t,
double tf)
116 return integrate(ode, y, t, tf);
128 template<
typename Func>
129 typename std::enable_if<!std::is_base_of<ODEEventDetector, typename std::remove_pointer<Func>::type>::value,
ODEEventDetector*>::type
132 addEventDetector(detector);
151 template<
typename Func>
152 typename std::enable_if<!std::is_base_of<ODEStateObserver, typename std::remove_pointer<Func>::type>::value,
ODEStateObserver*>::type
155 addStateObserver(observer);
195 void initWorkStateObserver();
203 double* stateAtStepStart_{
nullptr};
204 double* stateAtStepEnd_{
nullptr};
205 double* stateTemp_{
nullptr};
206 double timeAtStepStart_{0.0};
207 double timeAtStepEnd_{0.0};
ODE 积分器接口类
定义 ODEIntegrator.hpp:39
virtual errc_t singleStep(ODE &ode, double *y, double t0, double step)=0
执行一步积分
virtual errc_t integrateStep(ODE &ode, double *y, double &t, double tf)=0
积分ODE一步
virtual errc_t integrate(ODE &ode, double *y, double &t, double tf)=0
积分ODE
virtual errc_t initialize(ODE &ode)=0
初始化积分器
泛型ODE积分的事件检测器
定义 ODEEventDetector.hpp:90
定义 ODEEventDetectorList.hpp:32
ODE积分的事件检测器
定义 ODEEventDetector.hpp:33
定义 ODEInnerStateObserver.hpp:31
ODE 积分器
定义 ODEIntegrator.hpp:81
double * stateTemp()
获取临时状态向量
定义 ODEIntegrator.hpp:192
errc_t integrate(int ndim, Func func, double *y, double &t, double tf)
积分ODE
定义 ODEIntegrator.hpp:113
double & timeAtStepEnd()
获取当前积分步的结束时间
定义 ODEIntegrator.hpp:187
std::enable_if<!std::is_base_of< ODEStateObserver, typenamestd::remove_pointer< Func >::type >::value, ODEStateObserver * >::type addStateObserver(Func func)
添加状态观察者(泛型模板)
定义 ODEIntegrator.hpp:153
double * stateAtStepEnd()
获取当前积分步的结束状态
定义 ODEIntegrator.hpp:177
std::enable_if<!std::is_base_of< ODEEventDetector, typenamestd::remove_pointer< Func >::type >::value, ODEEventDetector * >::type addEventDetector(Func func)
添加事件检测器(泛型模板)
定义 ODEIntegrator.hpp:130
ODE * getODE()
获取ODE方程
定义 ODEIntegrator.hpp:167
ODEEventDetectorList eventDetectorList_
事件检测器列表
定义 ODEIntegrator.hpp:200
ODEStateObserverList stateObserverList_
状态观察者列表
定义 ODEIntegrator.hpp:201
double & timeAtStepStart()
获取当前积分步的开始时间
定义 ODEIntegrator.hpp:182
double * stateAtStepStart()
获取当前积分步的开始状态
定义 ODEIntegrator.hpp:172
泛型ODE状态量观察者
定义 ODEStateObserver.hpp:83
定义 ODEStateObserverList.hpp:30
ODE状态量观察者
定义 ODEStateObserver.hpp:39
常微分方程基接口
定义 OrdinaryDifferentialEquation.hpp:33
ODEGeneric< Func > make_ode(Func func, int dim)
创建一个常微分方程
定义 OrdinaryDifferentialEquation.hpp:89