adapt_rk.h Source File
|
CPP API
|
adapt_rk.h
Go to the documentation of this file.
228 mio::log_warning("IntegratorCore: Restricting given step size dt = {} to [{}, {}].", dt, this->get_dt_min(),
271 m_error_estimate = dt * (m_kt_values * (m_tab_final.entries_high - m_tab_final.entries_low)).array().abs();
287 dt_new = dt * pow((m_eps / m_error_estimate).minCoeff(), (1. / (m_tab_final.entries_low.size() - 1)));
295 // return 'converged' in favor of '!dt_is_invalid', as these values only differ if step sizing failed,
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
FP & get_dt_max()
Access upper bound to the step size dt.
Definition: integrator.h:117
Two scheme Runge-Kutta numerical integrator with adaptive step width.
Definition: adapt_rk.h:147
Eigen::Array< FP, Eigen::Dynamic, Eigen::Dynamic > m_eps
Definition: adapt_rk.h:308
std::unique_ptr< OdeIntegratorCore< FP > > clone() const override
Definition: adapt_rk.h:173
RKIntegratorCore()
Setting up the integrator.
Definition: adapt_rk.h:152
Eigen::Matrix< FP, Eigen::Dynamic, Eigen::Dynamic, Eigen::ColMajor > m_kt_values
Definition: adapt_rk.h:304
void set_tableaus(const Tableau< FP > &tab, const TableauFinal< FP > &final_tab)
Definition: adapt_rk.h:203
Eigen::Array< FP, Eigen::Dynamic, Eigen::Dynamic > m_error_estimate
Definition: adapt_rk.h:309
bool step(const DerivFunction< FP > &f, Eigen::Ref< const Eigen::VectorX< FP >> yt, FP &t, FP &dt, Eigen::Ref< Eigen::VectorX< FP >> ytp1) const override
Make a single integration step of a system of ODEs and adapt the step size.
Definition: adapt_rk.h:217
RKIntegratorCore(const FP abs_tol, const FP rel_tol, const FP dt_min, const FP dt_max)
Set up the integrator.
Definition: adapt_rk.h:166
Definition: adapt_rk.h:112
TableauFinal()
default is Runge-Kutta-Fehlberg4(5) tableau
Definition: adapt_rk.h:120
Two scheme Runge-Kutta numerical integrator with adaptive step width for ODE y'(t) = f(t,...
Definition: adapt_rk.h:64
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
ad::internal::binary_intermediate_aa< AD_TAPE_REAL, ad::internal::active_type< AD_TAPE_REAL, DATA_HANDLER_1 >, ad::internal::active_type< AD_TAPE_REAL, DATA_HANDLER_1 >, ad::operations::ad_pow_aa< AD_TAPE_REAL > > pow(const ad::internal::active_type< AD_TAPE_REAL, DATA_HANDLER_1 > &x1, const ad::internal::active_type< AD_TAPE_REAL, DATA_HANDLER_1 > &x2)
Definition: ad.hpp:1610
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
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
auto max(const Eigen::MatrixBase< A > &a, B &&b)
coefficient wise maximum of two matrices.
Definition: eigen_util.h:171
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
Generated by