Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cpp/benchmarks/graph_simulation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include "benchmark/benchmark.h"
#include "benchmarks/graph_simulation.h"
#include "memilio/compartments/simulation.h"
#include "memilio/math/adapt_rk.h"
#include "memilio/math/runge_kutta.h"
#include "memilio/mobility/metapopulation_mobility_instant.h"
#include "memilio/io/directories.h"
#include "ode_secirvvs/model.h"
Expand Down
2 changes: 1 addition & 1 deletion cpp/benchmarks/integrator_step.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include "benchmarks/integrator_step.h"
#include "benchmarks/secir_ageres_setups.h"

#include "memilio/math/adapt_rk.h"
#include "memilio/math/runge_kutta.h"
#include "memilio/math/stepper_wrapper.h"
#include "memilio/io/directories.h"

Expand Down
2 changes: 1 addition & 1 deletion cpp/benchmarks/simulation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include "benchmarks/simulation.h"
#include "benchmarks/secir_ageres_setups.h"

#include "memilio/math/adapt_rk.h"
#include "memilio/math/runge_kutta.h"
#include "memilio/math/stepper_wrapper.h"
#include "memilio/io/directories.h"

Expand Down
2 changes: 1 addition & 1 deletion cpp/examples/adapt_rk_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "memilio/math/adapt_rk.h"
#include "memilio/math/runge_kutta.h"

#include <stdio.h>
#include <stdlib.h>
Expand Down
4 changes: 2 additions & 2 deletions cpp/memilio/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ add_library(memilio
math/euler.cpp
math/euler.h
math/smoother.h
math/adapt_rk.h
math/adapt_rk.cpp
math/runge_kutta.h
math/runge_kutta.cpp
math/stepper_wrapper.h
math/stepper_wrapper.cpp
math/integrator.h
Expand Down
2 changes: 1 addition & 1 deletion cpp/memilio/math/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The model consists of the following classes:
2. The following integrators implement OdeIntegratorCore and can be used with OdeIntegrator or [mio::Simulation](../compartments/README.md).
- ControlledStepperWrapper: The ControlledStepperWrapper class allows using integrators from boosts::numeric::odeint in memilio. The integrator is passed as template argument. It must be of the concept "Error Stepper" (for more details, see [boost's own documentation](https://www.boost.org/doc/libs/1_84_0/libs/numeric/odeint/doc/html/boost_numeric_odeint/odeint_in_detail/steppers.html#boost_numeric_odeint.odeint_in_detail.steppers.stepper_overview) ). Currently, the default for mio::Simulation is runge_kutta_cash_karp54. Alternatively, runge_kutta_fehlberg78 can be used.
- Euler: The Euler class contains and explicit Euler method, adapted to the Integrator function. It also contains a (semi-)implicit Euler method which is WIP and taylored for the particular SECIR model from ../ode_secir/model.h
- Adapt_RK: The Adapt_RK module contains the RKIntegratorCore class, which implements adaptive Runge-Kutta integrators, where different pairs of methods (in form of combined Butcher tableaus) can be added. Absolute and relative tolerances can be set and the Tableau in use is that of an adaptive Runge-Kutta-Fehlberg (45) method; see, e.g., https://www.johndcook.com/blog/2020/02/19/fehlberg/. Steps where the mixed criterion on absolute and relative values (m_abs_tol + max_val * m_rel_tol) are not satisfied are directly discarded and never used. If the minimal step size (set) is reached and the criterion cannot be satisfied, it is returned that the adaptive step sizing failed.
- Runge-Kutta: The Runge-Kutta module (runge_kutta.h) contains the RKIntegratorCore class, which implements adaptive Runge-Kutta integrators, where different pairs of methods (in form of combined Butcher tableaus) can be added. Absolute and relative tolerances can be set and the Tableau in use is that of an adaptive Runge-Kutta-Fehlberg (45) method; see, e.g., https://www.johndcook.com/blog/2020/02/19/fehlberg/. Steps where the mixed criterion on absolute and relative values (m_abs_tol + max_val * m_rel_tol) are not satisfied are directly discarded and never used. If the minimal step size is reached and the criterion cannot be satisfied, a step with that minimal size is made, and warning is logged that adaptive step sizing failed. Via Tableau, further explicit methods can be specified, including methods with fixed step sizes (explicit Euler method, midpoint method, third-order Runge-Kutta methods and the classical fourth-order Runge-Kutta method), which are used when the Tableau does not contain the weights of an embedded solution for error estimation. Optionally, the stage values of all accepted steps are recorded which enables the application of identical Runge-Kutta steps to subpopulations (see https://doi.org/10.1016/j.matcom.2026.08.029).
3. The following integrators implement SdeIntegratorCore and can be used with SdeIntegrator or [mio::StochasticSimulation](../compartments/README.md).
- EulerMaruyamaIntegratorCore: This class implements a Euler-Mayurama scheme for solving SDEs. The solver enforces non-negative values in the solution, by first removing negative values and then rescaling the solution vector to preserve the total sum. This does not work on flows.
4. Smoother: The smoother classes smoothes discrete jumps of function values y0 and y1 on the interval [x0,x1] by a continuously differentiable function
Expand Down
314 changes: 0 additions & 314 deletions cpp/memilio/math/adapt_rk.h

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "memilio/math/adapt_rk.h"
#include "memilio/math/runge_kutta.h"
Loading