Sandals  v0.0.0
A C++ library for ODEs/DAEs integration
Loading...
Searching...
No Matches
Heun3.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_HEUN3_HXX
14#define SANDALS_HEUN3_HXX
15
16namespace Sandals
17{
33 class Heun3Tableau : public Tableau<3>
34 {
35 public:
36 using Tableau<3>::Type;
37 using Tableau<3>::Vector;
38 using Tableau<3>::Matrix;
39
44 this->name = "Heun3";
45 this->type = Type::ERK;
46 this->order = 3;
47 this->A << 0.0, 0.0, 0.0,
48 1.0/3.0, 0.0, 0.0,
49 0.0, 2.0/3.0, 0.0;
50 this->b << 1.0/4.0, 0.0, 3.0/4.0;
51 this->c << 0.0, 1.0/3.0, 2.0/3.0;
52 }
53 }; // class Heun3Tableau
54
62 template <Integer N, Integer M = 0>
63 class Heun3 : public RungeKutta<3, N, M>
64 {
65 public:
67
71 Heun3() : RungeKutta<3, N, M>(Heun3Tableau()) {}
72
77 Heun3(System t_system) : RungeKutta<3, N, M>(Heun3Tableau(), t_system) {}
78
79 }; // class Heun3
80
81} // namespace Sandals
82
83#endif // SANDALS_HEUN3_HXX
Heun3(System t_system)
Definition Heun3.hxx:77
typename Implicit< N, M >::Pointer System
Definition Heun3.hxx:66
Heun3()
Definition Heun3.hxx:71
Butcher tableau for the Heun's order 3 method.
Definition Heun3.hxx:34
Heun3Tableau()
Definition Heun3.hxx:43
std::shared_ptr< Implicit< N, M > > Pointer
Definition Implicit.hxx:42
RungeKutta(const RungeKutta &)=delete
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