57 std::string lower = name;
58 std::transform(lower.begin(), lower.end(), lower.begin(),
59 [](
unsigned char c) { return std::tolower(c); });
69 throw std::invalid_argument(
"Unknown integrator type: " + name);
106 Scalar rel_tol_val = Scalar{1e-6}) {
107 IntegratorConfig cfg;
109 cfg.abs_tol = abs_tol_val;
110 cfg.rel_tol = rel_tol_val;
Core type definitions, concepts, and configuration for Icarus.
Definition AggregationTypes.hpp:13
const char * to_string(SignalKind kind)
Convert SignalKind to string.
Definition Signal.hpp:86
IntegratorType
Available integrator methods.
Definition IntegratorTypes.hpp:27
@ Euler
Forward Euler (1st order, 1 eval) - janus::euler_step.
Definition IntegratorTypes.hpp:28
@ RK45
Dormand-Prince adaptive (5th order, 7 evals) - janus::rk45_step.
Definition IntegratorTypes.hpp:31
@ RK2
Heun's method (2nd order, 2 evals) - janus::rk2_step.
Definition IntegratorTypes.hpp:29
@ RK4
Classic RK4 (4th order, 4 evals) - janus::rk4_step.
Definition IntegratorTypes.hpp:30
IntegratorType parse_integrator_type(const std::string &name)
Parse integrator type from string (case-insensitive).
Definition IntegratorTypes.hpp:56
Configuration for integrator creation.
Definition IntegratorTypes.hpp:83
Scalar rel_tol
Relative tolerance.
Definition IntegratorTypes.hpp:88
static IntegratorConfig RK4Default()
Create default RK4 config.
Definition IntegratorTypes.hpp:96
static IntegratorConfig RK45Adaptive(Scalar abs_tol_val=Scalar{1e-6}, Scalar rel_tol_val=Scalar{1e-6})
Create adaptive RK45 config with tolerances.
Definition IntegratorTypes.hpp:105
Scalar max_dt
Maximum step size.
Definition IntegratorTypes.hpp:90
static IntegratorConfig ForMethod(IntegratorType method)
Create config for specified method.
Definition IntegratorTypes.hpp:117
Scalar min_dt
Minimum step size.
Definition IntegratorTypes.hpp:89
Scalar abs_tol
Absolute tolerance.
Definition IntegratorTypes.hpp:87
IntegratorType type
Method to use.
Definition IntegratorTypes.hpp:84
Scalar safety_factor
Step size safety factor.
Definition IntegratorTypes.hpp:91