53 virtual double getDifference(
const double* y,
double x)
const{
return getValue(y, x) - goal_;}
59 virtual double getValue(
const double* y,
double x)
const = 0;
64 virtual bool containsEvent(
const Bracket& bracket)
const;
69 void setRepeatCount(
int repeatCount) { repeatCount_ = repeatCount; }
74 void setDirection(EDirection direction) { direction_ = direction; }
79 void setThreshold(
double threshold) { threshold_ = threshold; }
84 void setGoal(
double goal) { goal_ = goal; }
89 EDirection direction_{EDirection::eBoth};
90 double threshold_{1e-10};
96template<
typename Func>
101 : func_(std::move(func))
104 double getValue(
const double* y,
double x)
const override {
括号区间,包含左右边界和左右边界对应的值
定义 Bracket.hpp:34
泛型ODE积分的事件检测器
定义 ODEEventDetector.hpp:98
double getValue(const double *y, double x) const override
用于事件检测的开关函数值
定义 ODEEventDetector.hpp:104
ODE积分的事件检测器
定义 ODEEventDetector.hpp:36
virtual double getValue(const double *y, double x) const =0
用于事件检测的开关函数值
EDirection getDirection() const
事件检测开关函数的方向
定义 ODEEventDetector.hpp:73
virtual double getDifference(const double *y, double x) const
用于事件检测的开关函数与目标值的差值
定义 ODEEventDetector.hpp:53
double getGoal() const
事件检测的目标值
定义 ODEEventDetector.hpp:83
double getThreshold() const
事件检测开关函数的阈值
定义 ODEEventDetector.hpp:78
int getRepeatCount() const
事件触发重复次数
定义 ODEEventDetector.hpp:68
EDirection
事件检测开关函数的条件
定义 ODEEventDetector.hpp:40