Sandals  v0.0.0
A C++ library for ODEs/DAEs integration
Loading...
Searching...
No Matches
Chebyshev51.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_CHEBYSHEV51_HH
14#define SANDALS_CHEBYSHEV51_HH
15
16#include <Sandals.hh>
17#include <Sandals/RungeKutta.hh>
18
19namespace Sandals
20{
38 template <typename Real>
39 class Chebyshev51Tableau : public Tableau<Real, 5>
40 {
41 public:
42 using typename Tableau<Real, 5>::Type;
43 using typename Tableau<Real, 5>::Vector;
44 using typename Tableau<Real, 5>::Matrix;
45
50 this->name = "Chebyshev51";
51 this->type = Type::ERK;
52 this->order = 1;
53 this->A << 0.0, 0.0, 0.0, 0.0, 0.0,
54 1.0/25.0, 0.0, 0.0, 0.0, 0.0,
55 2.0/25.0, 2.0/25.0, 0.0, 0.0, 0.0,
56 3.0/25.0, 4.0/25.0, 2.0/25.0, 0.0, 0.0,
57 4.0/25.0, 6.0/25.0, 4.0/25.0, 2.0/25.0, 0.0;
58 this->b << 1.0/5.0, 8.0/25.0, 6.0/25.0, 4.0/25.0, 2.0/25.0;
59 this->c << 0.0, 1.0/25.0, 4.0/25.0, 9.0/25.0, 16.0/25.0;
60 }
61 }; // class Chebyshev51Tableau
62
71 template <typename Real, Integer N, Integer M = 0>
72 class Chebyshev51 : public RungeKutta<Real, 5, N, M>
73 {
74 public:
76
80 Chebyshev51() : RungeKutta<Real, 5, N, M>(Chebyshev51Tableau<Real>()) {}
81
86 Chebyshev51(System t_system) : RungeKutta<Real, 5, N, M>(Chebyshev51Tableau<Real>(), t_system) {}
87
88 }; // class Chebyshev51
89
90} // namespace Sandals
91
92#endif // SANDALS_CHEBYSHEV51_HH
typename Implicit< Real, N, M >::Pointer System
Definition Chebyshev51.hh:75
Chebyshev51()
Definition Chebyshev51.hh:80
Chebyshev51(System t_system)
Definition Chebyshev51.hh:86
Butcher tableau for the 5-stage Runge-Kutta-Chebyshev order 1 method.
Definition Chebyshev51.hh:40
Chebyshev51Tableau()
Definition Chebyshev51.hh:49
std::shared_ptr< Implicit< Real, N, M > > Pointer
Definition Implicit.hh:47
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