Sandals  v0.0.0
A C++ library for ODEs/DAEs integration
Loading...
Searching...
No Matches
LobattoIIIA2.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_LOBATTOIIIA2_HH
14#define SANDALS_LOBATTOIIIA2_HH
15
16#include <Sandals.hh>
17#include <Sandals/RungeKutta.hh>
18
19namespace Sandals
20{
36 template <typename Real>
37 class LobattoIIIA2Tableau : public Tableau<Real, 2>
38 {
39 public:
40 using typename Tableau<Real, 2>::Type;
41 using typename Tableau<Real, 2>::Vector;
42 using typename Tableau<Real, 2>::Matrix;
43
48 this->name = "LobattoIIIA2";
49 this->type = Type::DIRK;
50 this->order = 2;
51 this->A << 0.0, 0.0,
52 1.0/2.0, 1.0/2.0;
53 this->b << 1.0/2.0, 1.0/2.0;
54 this->c << 0.0, 1.0;
55 }
56 }; // class LobattoIIIA2Tableau
57
66 template <typename Real, Integer N, Integer M = 0>
67 class LobattoIIIA2 : public RungeKutta<Real, 2, N, M>
68 {
69 public:
71
75 LobattoIIIA2() : RungeKutta<Real, 2, N, M>(LobattoIIIA2Tableau<Real>()) {}
76
81 LobattoIIIA2(System t_system) : RungeKutta<Real, 2, N, M>(LobattoIIIA2Tableau<Real>(), t_system) {}
82
83 }; // class LobattoIIIA2
84
85} // namespace Sandals
86
87#endif // SANDALS_LOBATTOIIIA2_HH
std::shared_ptr< Implicit< Real, N, M > > Pointer
Definition Implicit.hh:47
typename Implicit< Real, N, M >::Pointer System
Definition LobattoIIIA2.hh:70
LobattoIIIA2()
Definition LobattoIIIA2.hh:75
LobattoIIIA2(System t_system)
Definition LobattoIIIA2.hh:81
Butcher tableau for the Lobatto IIIA order 2 method.
Definition LobattoIIIA2.hh:38
LobattoIIIA2Tableau()
Definition LobattoIIIA2.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