Sandals  v0.0.0
A C++ library for ODEs/DAEs integration
Loading...
Searching...
No Matches
RadauIIA5.hh
Go to the documentation of this file.
1/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\
2 * Copyright (c) 2025, Davide Stocco and Enrico Bertolazzi. *
3 * *
4 * The Sandals project is distributed under the BSD 2-Clause License. *
5 * *
6 * Davide Stocco Enrico Bertolazzi *
7 * University of Trento University of Trento *
8 * e-mail: davide.stocco@unitn.it e-mail: enrico.bertolazzi@unitn.it *
9\* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
10
11#pragma once
12
13#ifndef SANDALS_RADAUIIA5_HH
14#define SANDALS_RADAUIIA5_HH
15
16#include <Sandals.hh>
17#include <Sandals/RungeKutta.hh>
18
19namespace Sandals
20{
48 template <typename Real>
49 class RadauIIA5Tableau : public Tableau<Real, 3>
50 {
51 public:
52 using typename Tableau<Real, 3>::Type;
53 using typename Tableau<Real, 3>::Vector;
54 using typename Tableau<Real, 3>::Matrix;
55
60 this->name = "RadauIIA5";
61 this->type = Type::IRK;
62 this->order = 5;
63 Real s6{std::sqrt(6.0)};
64 this->A << 11.0/45.0-7.0*s6/360.0, 37.0/225.0-169.0*s6/1800.0, -2.0/225.0+s6/75.0,
65 37.0/225+169.0*s6/1800.0, 11.0/45.0+7.0*s6/360.0, -2.0/225.0-s6/75.0,
66 4.0/9.0-s6/36.0, 4.0/9.0+s6/36.0, 1.0/9.0;
67 this->b << 4.0/9.0-s6/36.0, 4.0/9.0+s6/36, 1.0/9.0;
68 this->c << 2.0/5.0-s6/10.0, 2.0/5.0+s6/10, 1.0;
69 }
70 }; // class RadauIIA5Tableau
71
80 template <typename Real, Integer N, Integer M = 0>
81 class RadauIIA5 : public RungeKutta<Real, 3, N, M>
82 {
83 public:
85
89 RadauIIA5() : RungeKutta<Real, 3, N, M>(RadauIIA5Tableau<Real>()) {}
90
95 RadauIIA5(System t_system) : RungeKutta<Real, 3, N, M>(RadauIIA5Tableau<Real>(), t_system) {}
96
97 }; // class RadauIIA5
98
99} // namespace Sandals
100
101#endif // SANDALS_RADAUIIA5_HH
std::shared_ptr< Implicit< Real, N, M > > Pointer
Definition Implicit.hh:47
typename Implicit< Real, N, M >::Pointer System
Definition RadauIIA5.hh:84
RadauIIA5()
Definition RadauIIA5.hh:89
RadauIIA5(System t_system)
Definition RadauIIA5.hh:95
Butcher tableau for the Radau IIA order 3 method.
Definition RadauIIA5.hh:50
RadauIIA5Tableau()
Definition RadauIIA5.hh:59
RungeKutta(const RungeKutta &)=delete
The namespace for the Sandals library.
Definition Sandals.hh:89
Struct container for the Butcher tableau of a Runge-Kutta method.
Definition Tableau.hh:38
enum class type :Integer {ERK=0, IRK=1, DIRK=2} Type
Definition Tableau.hh:42
Type type
Definition Tableau.hh:47
Integer order
Definition Tableau.hh:48
std::string name
Definition Tableau.hh:46
Eigen::Matrix< Real, S, S > Matrix
Definition Tableau.hh:44
Matrix A
Definition Tableau.hh:50
Eigen::Vector< Real, S > Vector
Definition Tableau.hh:43
Vector c
Definition Tableau.hh:53
Vector b
Definition Tableau.hh:51