Sandals  v0.0.0
A C++ library for ODEs/DAEs integration
Loading...
Searching...
No Matches
ExplicitEuler.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_EXPLICITEULER_HXX
14#define SANDALS_EXPLICITEULER_HXX
15
16namespace Sandals
17{
31 class ExplicitEulerTableau : public Tableau<1>
32 {
33 public:
34 using Tableau<1>::Type;
35 using Tableau<1>::Vector;
36 using Tableau<1>::Matrix;
37
42 this->name = "ExplicitEuler";
43 this->type = Type::ERK;
44 this->order = 1;
45 this->A << 0.0;
46 this->b << 1.0;
47 this->c << 0.0;
48 }
49 }; // class ExplicitEulerTableau
50
58 template <Integer N, Integer M = 0>
59 class ExplicitEuler : public RungeKutta<1, N, M>
60 {
61 public:
63
68
73 ExplicitEuler(System t_system) : RungeKutta<1, N, M>(ExplicitEulerTableau(), t_system) {}
74
75 }; // class ExplicitEuler
76
77} // namespace Sandals
78
79#endif // SANDALS_EXPLICITEULER_HXX
typename Implicit< N, M >::Pointer System
Definition ExplicitEuler.hxx:62
ExplicitEuler()
Definition ExplicitEuler.hxx:67
ExplicitEuler(System t_system)
Definition ExplicitEuler.hxx:73
Butcher tableau for the Explicit Euler method.
Definition ExplicitEuler.hxx:32
ExplicitEulerTableau()
Definition ExplicitEuler.hxx:41
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