Sandals  v0.0.0
A C++ library for ODEs/DAEs integration
Loading...
Searching...
No Matches
SSPRK104.hxx
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_SSPRK104_HXX
14#define SANDALS_SSPRK104_HXX
15
16namespace Sandals
17{
40 class SSPRK104Tableau : public Tableau<10>
41 {
42 public:
43 using Tableau<10>::Type;
44 using Tableau<10>::Vector;
45 using Tableau<10>::Matrix;
46
51 this->name = "SSPRK104";
52 this->type = Type::ERK;
53 this->order = 4;
54 this->A << 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
55 1.0/6.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
56 1.0/6.0, 1.0/6.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
57 1.0/6.0, 1.0/6.0, 1.0/6.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
58 1.0/6.0, 1.0/6.0, 1.0/6.0, 1.0/6.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
59 1.0/15.0, 1.0/15.0, 1.0/15.0, 1.0/15.0, 1.0/15.0, 0.0, 0.0, 0.0, 0.0, 0.0,
60 1.0/15.0, 1.0/15.0, 1.0/15.0, 1.0/15.0, 1.0/15.0, 1.0/6.0, 0.0, 0.0, 0.0, 0.0,
61 1.0/15.0, 1.0/15.0, 1.0/15.0, 1.0/15.0, 1.0/15.0, 1.0/6.0, 1.0/6.0, 0.0, 0.0, 0.0,
62 1.0/15.0, 1.0/15.0, 1.0/15.0, 1.0/15.0, 1.0/15.0, 1.0/6.0, 1.0/6.0, 1.0/6.0, 0.0, 0.0,
63 1.0/15.0, 1.0/15.0, 1.0/15.0, 1.0/15.0, 1.0/15.0, 1.0/6.0, 1.0/6.0, 1.0/6.0, 1.0/6.0, 0.0;
64 this->b << 1.0/10.0, 1.0/10.0, 1.0/10.0, 1.0/10.0, 1.0/10.0, 1.0/10.0, 1.0/10.0, 1.0/10.0, 1.0/10.0, 1.0/10.0;
65 this->c << 0.0, 1.0/6.0, 1.0/3.0, 1.0/2.0, 2.0/3.0, 1.0/3.0, 1.0/2.0, 2.0/3.0, 5.0/6.0, 1.0;
66 }
67 }; // class SSPRK104Tableau
68
76 template <Integer N, Integer M = 0>
77 class SSPRK104 : public RungeKutta<10, N, M>
78 {
79 public:
81
87
93 SSPRK104(System t_system) : RungeKutta<10, N, M>(SSPRK104Tableau(), t_system) {}
94
95 }; // class SSPRK104
96
97} // namespace Sandals
98
99#endif // SANDALS_SSPRK104_HXX
std::shared_ptr< Implicit< N, M > > Pointer
Definition Implicit.hxx:42
RungeKutta(const RungeKutta &)=delete
typename Implicit< N, M >::Pointer System
Definition SSPRK104.hxx:80
SSPRK104()
Definition SSPRK104.hxx:86
SSPRK104(System t_system)
Definition SSPRK104.hxx:93
Butcher tableau for the 10-stage strong-stability preserving Runge-Kutta order 4 method.
Definition SSPRK104.hxx:41
SSPRK104Tableau()
Definition SSPRK104.hxx:50
The namespace for the Sandals library.
Definition Sandals.hh:73
Struct container for the Butcher tableau of a Runge-Kutta method.
Definition Tableau.hxx:36
enum class type :Integer {ERK=0, IRK=1, DIRK=2} Type
Definition Tableau.hxx:37
Eigen::Matrix< Real, S, S > Matrix
Definition Tableau.hxx:39
Integer order
Definition Tableau.hxx:43
Type type
Definition Tableau.hxx:42
Eigen::Vector< Real, S > Vector
Definition Tableau.hxx:38
Matrix A
Definition Tableau.hxx:45
std::string name
Definition Tableau.hxx:41
Vector b
Definition Tableau.hxx:46
Vector c
Definition Tableau.hxx:48