ode-toolbox

ODE integration tools
git clone https://git.0xfab.ch/ode-toolbox.git
Log | Files | Refs | README | LICENSE

commit c838117d6c766aaa84fce90d1578c7a4bd6ee793
parent eba1311317c35c62e7ab6fdee04e5eeeb579b94d
Author: Fabian Wermelinger <fabianw@mavt.ethz.ch>
Date:   Sat, 19 Dec 2020 18:08:45 +0100

Fix missing includes

Diffstat:
Minclude/TimeStepper/StepperBase.h | 16++++++++++------
Minclude/TimeStepper/explicit/variableStep/RKF45.h | 3++-
Minclude/TimeStepper/explicit/variableStep/RKV56.h | 3++-
Mmeson.build | 5+++--
4 files changed, 17 insertions(+), 10 deletions(-)

diff --git a/include/TimeStepper/StepperBase.h b/include/TimeStepper/StepperBase.h @@ -8,6 +8,9 @@ #include <TimeStepper/KernelBase.h> +#include <cassert> +#include <iostream> + // forward declarations template <typename Tinput, typename Trhs=Tinput> class StepperBase; @@ -106,29 +109,29 @@ struct StepperSettings if (p("-ts").asString("rkv56") == "euler") { - cout << "Allocating Euler time stepper..." << endl; + std::cout << "Allocating Euler time stepper...\n"; return new Euler<Tinput, Trhs>(U, *this, kern); } else if (p("-ts").asString("rkv56") == "rk4") { - cout << "Allocating RK4 time stepper..." << endl; + std::cout << "Allocating RK4 time stepper...\n"; return new RK4<Tinput, Trhs>(U, *this, kern); } else if (p("-ts").asString("rkv56") == "lsrk3") { - cout << "Allocating LSRK3 time stepper..." << endl; + std::cout << "Allocating LSRK3 time stepper...\n"; return new LSRK3<Tinput, Trhs>(U, *this, kern); } else if (p("-ts").asString("rkv56") == "rkf45") { - cout << "Allocating RKF45 adaptive time stepper..." << endl; + std::cout << "Allocating RKF45 adaptive time stepper...\n"; this->bFixedStep = false; this->print(); return new RKF45<Tinput, Trhs>(U, *this, kern); } else if (p("-ts").asString("rkv56") == "rkv56") { - cout << "Allocating RKV56 adaptive time stepper..." << endl; + std::cout << "Allocating RKV56 adaptive time stepper...\n"; this->bFixedStep = false; this->print(); return new RKV56<Tinput, Trhs>(U, *this, kern); @@ -136,7 +139,8 @@ struct StepperSettings #ifdef _USE_SUNDIALS_ else if (p("-ts").asString("rkv56") == "bdf") { - cout << "Allocating Sundials BDF/Newton implicit time stepper..." << endl; + std::cout + << "Allocating Sundials BDF/Newton implicit time stepper...\n"; return new BDF<Tinput, Trhs>(U, *this, kern); } #endif /* _USE_SUNDIALS_ */ diff --git a/include/TimeStepper/explicit/variableStep/RKF45.h b/include/TimeStepper/explicit/variableStep/RKF45.h @@ -177,7 +177,8 @@ public: ++step; if (m_settings.step % m_settings.reportGranularity == 0) - std::printf("Time = %e;\tStep = %d\n", m_settings.t, m_settings.step); + std::printf( + "Time = %e;\tStep = %zu\n", m_settings.t, m_settings.step); if (m_settings.restartstep > 0 && step % m_settings.restartstep == 0) serialize<Tinput>(m_U, m_settings); diff --git a/include/TimeStepper/explicit/variableStep/RKV56.h b/include/TimeStepper/explicit/variableStep/RKV56.h @@ -184,7 +184,8 @@ public: ++step; if (m_settings.step % m_settings.reportGranularity == 0) - std::printf("Time = %e;\tStep = %d\n", m_settings.t, m_settings.step); + std::printf( + "Time = %e;\tStep = %zu\n", m_settings.t, m_settings.step); if (m_settings.restartstep > 0 && step % m_settings.restartstep == 0) serialize<Tinput>(m_U, m_settings); diff --git a/meson.build b/meson.build @@ -4,10 +4,11 @@ project('ode_toolbox', 'cpp', default_options: ['cpp_std=c++11', 'b_ndebug=if-release'] ) -add_global_arguments('-D_ALIGN_=16', language: 'cpp') +cpp_args = ['-D_ALIGN_=16'] if get_option('precision') == 'single' - add_global_arguments('-D_FLOAT_PRECISION_') + cpp_args += ['-D_FLOAT_PRECISION_'] endif +add_project_arguments(cpp_args, language: 'cpp') subdir('include')