Sandals  v0.0.0
A C++ library for ODEs/DAEs integration
Loading...
Searching...
No Matches
SSPRK22star.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_SSPRK22STAR_HXX
14#define SANDALS_SSPRK22STAR_HXX
15
16namespace Sandals
17{
33 class SSPRK22starTableau : public Tableau<2>
34 {
35 public:
36 using Tableau<2>::Type;
37 using Tableau<2>::Vector;
38 using Tableau<2>::Matrix;
39
44 this->name = "SSPRK22star";
45 this->type = Type::ERK;
46 this->order = 2;
47 this->A << 0.0, 0.0,
48 0.822875655532364, 0.0;
49 this->b << 0.392374781489287, 0.607625218510713;
50 this->c << 0.0, 0.822875655532364;
51 }
52 }; // class SSPRK22starTableau
53
61 template <Integer N, Integer M = 0>
62 class SSPRK22star : public RungeKutta<2, N, M>
63 {
64 public:
66
72
78 SSPRK22star(System t_system) : RungeKutta<2, N, M>(SSPRK22starTableau(), t_system) {}
79
80 }; // class SSPRK22star
81
82} // namespace Sandals
83
84#endif // SANDALS_SSPRK22STAR_HXX
std::shared_ptr< Implicit< N, M > > Pointer
Definition Implicit.hxx:42
RungeKutta(const RungeKutta &)=delete
SSPRK22star(System t_system)
Definition SSPRK22star.hxx:78
SSPRK22star()
Definition SSPRK22star.hxx:71
typename Implicit< N, M >::Pointer System
Definition SSPRK22star.hxx:65
Butcher tableau for the optimal 2-stage strong-stability preserving Runge-Kutta order 2 method.
Definition SSPRK22star.hxx:34
SSPRK22starTableau()
Definition SSPRK22star.hxx:43
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