TrioCFD 1.9.9_beta
TrioCFD documentation
Loading...
Searching...
No Matches
Schema_RK_Classique.h
1/****************************************************************************
2* Copyright (c) 2022, CEA
3* All rights reserved.
4*
5* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
6* 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
7* 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
8* 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
9*
10* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
11* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
12* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
13*
14*****************************************************************************/
15
16#ifndef Schema_RK_Classique_included
17#define Schema_RK_Classique_included
18
19#include <TRUSTSchema_RK.h>
20
21/// \cond DO_NOT_DOCUMENT
22class Schema_RK_Classique
23{ };
24/// \endcond
25
26/*! @brief : class RK2_Classique This class represents a classical second-order Runge-Kutta time scheme:
27 *
28 * k1 = h * f(y0)
29 * k2 = h * f(y0 + 0.5 * k1)
30 * y1 = y0 + k2
31 *
32 */
33class RK2_Classique: public TRUSTSchema_RK<Ordre_RK::DEUX_CLASSIQUE>
34{
35 Declare_instanciable(RK2_Classique);
36};
37
38/*! @brief : class RK3_Classique This class represents a classical third-order Runge-Kutta time scheme:
39 *
40 * k1 = h * f(y0)
41 * k2 = h * f(y0 + 0.5 * k1)
42 * k3 = h * f(y0 - k1 + 2 * k2)
43 * y1 = y0 + 1/6 * (k1 + 4 * k2 + k3)
44 *
45 */
46class RK3_Classique: public TRUSTSchema_RK<Ordre_RK::TROIS_CLASSIQUE>
47{
48 Declare_instanciable(RK3_Classique);
49};
50
51/*! @brief : class RK4_Classique This class represents a classical fourth-order Runge-Kutta time scheme:
52 *
53 * k1 = h * f(y0)
54 * k2 = h * f(y0 + 0.5 * k1)
55 * k3 = h * f(y0 + 0.5 * k2)
56 * k4 = h * f(y0 + k3)
57 * y1 = y0 + 1/6 * (k1 + 2 * k2 + 2 * k3 + k4)
58 *
59 */
60class RK4_Classique: public TRUSTSchema_RK<Ordre_RK::QUATRE_CLASSIQUE>
61{
62 Declare_instanciable(RK4_Classique);
63};
64
65/*! @brief : class RK4_Classique_3_8 This class represents a classical fourth-order Runge-Kutta time scheme with 3/8 rule coefficients:
66 *
67 * k1 = h * f(y0)
68 * k2 = h * f(y0 + 1/3 * k1)
69 * k3 = h * f(y0 - 1/3 * k1 + k2)
70 * k4 = h * f(y0 + k1 - k2 + k3)
71 * y1 = y0 + 1/8 * (k1 + 3 * k2 + 3 * k3 + k4)
72 *
73 */
74class RK4_Classique_3_8: public TRUSTSchema_RK<Ordre_RK::QUATRE_CLASSIQUE_3_8>
75{
76 Declare_instanciable(RK4_Classique_3_8);
77};
78
79#endif /* Schema_RK_Classique_included */
: class RK2_Classique This class represents a classical second-order Runge-Kutta time scheme:
: class RK3_Classique This class represents a classical third-order Runge-Kutta time scheme:
: class RK4_Classique_3_8 This class represents a classical fourth-order Runge-Kutta time scheme with...
: class RK4_Classique This class represents a classical fourth-order Runge-Kutta time scheme: