diff --git a/Examples/src/RKFSolver/ButcherRKF.hpp b/Examples/src/RKFSolver/ButcherRKF.hpp index 9f6e9d84..f8a8bc66 100644 --- a/Examples/src/RKFSolver/ButcherRKF.hpp +++ b/Examples/src/RKFSolver/ButcherRKF.hpp @@ -9,6 +9,7 @@ #define SRC_RK45_BUTCHERRKF_HPP_ #include #include +#include #include namespace apsc { @@ -97,6 +98,21 @@ template struct ButcherArray } }; +template +concept ButcherArrayConcept = requires(B b) { + b.A; + b.b1; + b.b2; + b.c; + b.order; + { + b.implicit() + } -> std::same_as; + { + B::Nstages() + } -> std::convertible_to; + }; + namespace RKFScheme { // SOME COMMON RK embedded schemes diff --git a/Examples/src/RKFSolver/RKF.hpp b/Examples/src/RKFSolver/RKF.hpp index 0369be9b..517aef30 100644 --- a/Examples/src/RKFSolver/RKF.hpp +++ b/Examples/src/RKFSolver/RKF.hpp @@ -49,7 +49,7 @@ template struct RKFResult * scheme shown in ButcherRKF.hpp * @tparam KIND The type of traits to be used: SCALAR, VECTOR, MATRIX */ -template +template class RKF : public RKFTraits { public: diff --git a/Examples/src/RKFSolver/main_rk45.cpp b/Examples/src/RKFSolver/main_rk45.cpp index 1fd81a22..40a79b6d 100644 --- a/Examples/src/RKFSolver/main_rk45.cpp +++ b/Examples/src/RKFSolver/main_rk45.cpp @@ -33,7 +33,8 @@ main() << errorDesired << " Failed:" << solution.failed << " Estimated Error " << solution.estimatedError << "\n Contractions=" << solution.contractions - << " Expansions=" << solution.expansions; + << " Expansions=" << solution.expansions << " Total steps " + << solution.time.size(); std::cout << std::endl; // auto solution = solver(t0,T, y0, h_init, errorDesired); @@ -66,7 +67,8 @@ main() << " Failed:" << solution.failed << " Estimated Error " << solution.estimatedError << "\n Contractions=" << solution.contractions - << " Expansions=" << solution.expansions; + << " Expansions=" << solution.expansions << " Total steps " + << solution.time.size(); std::cout << std::endl; ofstream file3("resultVDP.dat"); file3 << solution; @@ -97,7 +99,9 @@ main() << " Failed:" << solution.failed << " Estimated Error " << solution.estimatedError << "\n Contractions=" << solution.contractions - << " Expansions=" << solution.expansions; + << " Expansions=" << solution.expansions << " Total steps " + << solution.time.size(); + std::cout << std::endl; ofstream file3("resultstiff.dat"); file3 << solution;