Sandals  v0.0.0
A C++ library for ODEs/DAEs integration
Loading...
Searching...
No Matches
GaussLegendre2.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_GAUSSLEGENDRE2_HXX
14#define SANDALS_GAUSSLEGENDRE2_HXX
15
16namespace Sandals
17{
18 /*
19 Symplectic Runge-Kutta Methods of High Order Based on W-Transformation, Kaifeng Xia, Yuhao Cong
20 and Geng Sun. Journal of Applied Analysis ans Computation, Volume 7, Number 3, 2017(8), 1185-1199
21 http://www.jaac-online.com/data/article/jaac/preview/pdf/20170325.pdf
22 */
23
38 {
39 public:
40 using Tableau<1>::Type;
41 using Tableau<1>::Vector;
42 using Tableau<1>::Matrix;
43
48 this->name = "GaussLegendre2";
49 this->type = Type::IRK;
50 this->order = 2;
51 this->A << 1.0/2.0;
52 this->b << 1.0;
53 this->c << 1.0/2.0;
54 }
55 }; // class GaussLegendre2Tableau
56
64 template <Integer N, Integer M = 0>
65 class GaussLegendre2 : public RungeKutta<1, N, M>
66 {
67 public:
69
74
79 GaussLegendre2(System t_system) : RungeKutta<1, N, M>(GaussLegendre2Tableau(), t_system) {}
80
81 }; // class GaussLegendre2
82
83} // namespace Sandals
84
85#endif // SANDALS_GAUSSLEGENDRE2_HXX
typename Implicit< N, M >::Pointer System
Definition GaussLegendre2.hxx:68
GaussLegendre2(System t_system)
Definition GaussLegendre2.hxx:79
GaussLegendre2()
Definition GaussLegendre2.hxx:73
Butcher Tableau for the Gauss-Legendre order 2 method.
Definition GaussLegendre2.hxx:38
GaussLegendre2Tableau()
Definition GaussLegendre2.hxx:47
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