integrator.h Source File
|
CPP API
|
integrator.h
Go to the documentation of this file.
39 std::function<void(Eigen::Ref<const Eigen::VectorX<FP>> y, FP t, Eigen::Ref<Eigen::VectorX<FP>> dydt)>;
92 virtual bool step(const Integrands&... fs, Eigen::Ref<const Eigen::VectorX<FP>> yt, FP& t, FP& dt,
184 Eigen::Ref<Eigen::VectorX<FP>> advance(const Integrands&... fs, const FP tmax, FP& dt, TimeSeries<FP>& results)
205 FP dt_min_restore = m_core->get_dt_min(); // used to restore dt_min, if it was decreased to reach tmax
218 // if dt_min was reduced, the following step will be the last due to dt == dt_min (see step method)
Interface class defining the integration step used in a SystemIntegrator.
Definition: integrator.h:48
FP & get_dt_min()
Access lower bound to the step size dt.
Definition: integrator.h:101
const FP & get_dt_max() const
Access upper bound to the step size dt.
Definition: integrator.h:121
const FP & get_dt_min() const
Access lower bound to the step size dt.
Definition: integrator.h:105
virtual bool step(const Integrands &... fs, Eigen::Ref< const Eigen::VectorX< FP >> yt, FP &t, FP &dt, Eigen::Ref< Eigen::VectorX< FP >> ytp1) const =0
Make a single integration step.
IntegratorCore(const FP &dt_min, const FP &dt_max)
Initialize an IntegratorCore.
Definition: integrator.h:57
virtual std::unique_ptr< IntegratorCore< FP, Integrands... > > clone() const =0
FP & get_dt_max()
Access upper bound to the step size dt.
Definition: integrator.h:117
SystemIntegrator(const SystemIntegrator &other)
Definition: integrator.h:160
Eigen::Ref< Eigen::VectorX< FP > > advance(const Integrands &... fs, const FP tmax, FP &dt, TimeSeries< FP > &results)
Advance the integrator.
Definition: integrator.h:184
SystemIntegrator(std::unique_ptr< Core > &&core)
Create an integrator for a specific IVP.
Definition: integrator.h:154
Core & get_integrator_core()
Access the IntegratorCore used for integration.
Definition: integrator.h:266
void set_integrator_core(std::unique_ptr< Core > &&core)
Change the IntegratorCore used for integration.
Definition: integrator.h:255
const Core & get_integrator_core() const
Access the IntegratorCore used for integration.
Definition: integrator.h:270
std::unique_ptr< Core > m_core
Access the IntegratorCore used for integration.
Definition: integrator.h:276
SystemIntegrator & operator=(const SystemIntegrator &other)
Definition: integrator.h:166
bool m_is_adaptive
Access the IntegratorCore used for integration.
Definition: integrator.h:277
stores vectors of values at time points (or some other abstract variable) the value at each time poin...
Definition: time_series.h:58
void reserve(Eigen::Index n)
reserve capacity for n time points
Definition: time_series.h:332
FP & get_last_time()
time of time point at index num_time_points - 1
Definition: time_series.h:286
Eigen::Index get_num_time_points() const
number of time points in the series
Definition: time_series.h:197
Eigen::Ref< Vector > add_time_point()
add one uninitialized time point
Definition: time_series.h:221
Eigen::Ref< const Vector > get_last_value() const
reference to value vector at time point (num_timepoints - 1)
Definition: time_series.h:320
static min_max_return_type< ad::internal::active_type< AD_TAPE_REAL, DATA_HANDLER_1 >, ad::internal::active_type< AD_TAPE_REAL, DATA_HANDLER_1 > >::type min(const ad::internal::active_type< AD_TAPE_REAL, DATA_HANDLER_1 > &a, const ad::internal::active_type< AD_TAPE_REAL, DATA_HANDLER_1 > &b)
Definition: ad.hpp:2599
static min_max_return_type< ad::internal::active_type< AD_TAPE_REAL, DATA_HANDLER_1 >, ad::internal::active_type< AD_TAPE_REAL, DATA_HANDLER_1 > >::type max(const ad::internal::active_type< AD_TAPE_REAL, DATA_HANDLER_1 > &a, const ad::internal::active_type< AD_TAPE_REAL, DATA_HANDLER_1 > &b)
Definition: ad.hpp:2596
static double ceil(const ad::internal::active_type< AD_TAPE_REAL, DATA_HANDLER_1 > &x)
Definition: ad.hpp:2449
ad::internal::unary_intermediate< AD_TAPE_REAL, ad::internal::active_type< AD_TAPE_REAL, DATA_HANDLER_1 >, ad::operations::ad_fabs< AD_TAPE_REAL > > fabs(const ad::internal::active_type< AD_TAPE_REAL, DATA_HANDLER_1 > &x1)
Definition: ad.hpp:1133
A collection of classes to simplify handling of matrix shapes in meta programming.
Definition: models/abm/analyze_result.h:30
void log_warning(spdlog::string_view_t fmt, const Args &... args)
Definition: logging.h:112
std::function< void(Eigen::Ref< const Eigen::VectorX< FP > > y, FP t, Eigen::Ref< Eigen::VectorX< FP > > dydt)> DerivFunction
Function template to be integrated.
Definition: integrator.h:39
Definition: io.h:94
static constexpr FP zero_tolerance()=delete
Generated by