HermesCommon  3.0
table.h
1 // This file is part of HermesCommon
2 //
3 // Copyright (c) 2009 hp-FEM group at the University of Nevada, Reno (UNR).
4 // Email: hpfem-group@unr.edu, home page: http://www.hpfem.org/.
5 //
6 // Hermes2D is free software; you can redistribute it and/or modify
7 // it under the terms of the GNU General Public License as published
8 // by the Free Software Foundation; either version 2 of the License,
9 // or (at your option) any later version.
10 //
11 // Hermes2D is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
15 //
16 // You should have received a copy of the GNU General Public License
17 // along with Hermes2D; if not, write to the Free Software
18 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22 #ifndef __HERMES_COMMON_TABLES_H_
23 #define __HERMES_COMMON_TABLES_H_
24 
25 #include "util/compat.h"
26 
27 namespace Hermes
28 {
33  {
34  /* EXPLICIT METHODS */
35 
40 
41  /* IMPLICIT METHODS */
42 
56 
57  /* EMBEDDED EXPLICIT METHODS */
58 
64 
65  /* EMBEDDED IMPLICIT METHODS */
66 
80  };
84 
86  class HERMES_API Table
87  {
88  public:
89  Table();
90  Table(unsigned int size);
91  virtual void alloc(unsigned int size);
92  unsigned int get_size();
93  double get_A(unsigned int i, unsigned int j);
94  void set_A(unsigned int i, unsigned int j, double val);
95 
96  protected:
97  unsigned int size;
98  double** A;
99  };
100 
102  class HERMES_API ButcherTable : public Table
103  {
104  public:
105  ButcherTable();
106  ButcherTable(unsigned int size);
107  ButcherTable(ButcherTableType butcher_table);
108  ~ButcherTable();
109  virtual void free();
110  virtual void alloc(unsigned int size);
111  double get_B(unsigned int i);
112  double get_B2(unsigned int i);
113  double get_C(unsigned int i);
114  void set_B(unsigned int i, double val);
115  void set_B2(unsigned int i, double val);
116  void set_C(unsigned int i, double val);
117  bool is_explicit();
118  bool is_diagonally_implicit();
119  bool is_fully_implicit();
120  bool is_embedded();
123  void switch_B_rows();
124 
125  protected:
126  double* B;
128  double* B2;
130  double* C;
131  };
132 }
133 #endif
General namespace for the Hermes library.
Implicit Lobatto IIIB-2 method.
Definition: table.h:50
Implicit Runge-Kutta RK-1 (implicit Euler).
Definition: table.h:43
Implicit SIRK-2-2 method.
Definition: table.h:45
Implicit Lobatto IIIA-4 method.
Definition: table.h:51
Heun-Euler (orders 1 and 2),.
Definition: table.h:59
Fehlberg (orders 4 and 5),.
Definition: table.h:61
Bogacki-Shampine (orders 2 and 3),.
Definition: table.h:60
Explicit Runge-Kutta RK-1 (explicit Euler).
Definition: table.h:36
of TR-BDF2 by Hosea and Shampine.
Definition: table.h:67
Implicit SDIRK-5-4 method.
Definition: table.h:55
Cash-Karp (orders 4 and 5),.
Definition: table.h:62
Implicit Lobatto IIIA-2 method.
Definition: table.h:48
Explicit Runge-Kutta RK-3 method.
Definition: table.h:38
Implicit Radau IIA-5 method.
Definition: table.h:54
General square table of real numbers.
Definition: table.h:86
with Error Estimates by J.R. Cash
Definition: table.h:71
Butcher's tables for Runge-Kutta methods.
Definition: table.h:102
Dormand-Prince (orders 4 and 5),.
Definition: table.h:63
Explicit Runge-Kutta RK-4 method.
Definition: table.h:39
of TR-BDF2 by Hosea and Shampine.
Definition: table.h:69
double * C
on embedded R-K methods.
Definition: table.h:130
double * B2
This is the second B-row for adaptivity based.
Definition: table.h:128
File containing platform compatibility layer, especially for Win / MSVC.
Explicit Runge-Kutta RK-2 method.
Definition: table.h:37
ButcherTableType
Butcher's tables type. The last number in the name always means order, the one before last (if provid...
Definition: table.h:32
Implicit SDIRK-2-2 method.
Definition: table.h:47
with Error Estimates by J.R. Cash
Definition: table.h:77
Implicit Lobatto IIIB-2 method.
Definition: table.h:49
Implicit Lobatto IIIB-4 method.
Definition: table.h:53
with Error Estimates by J.R. Cash
Definition: table.h:75
Codes for the Solution of Stiff and Non-Stiff systems of ODE's.
Definition: table.h:73
Implicit ESIRK-2-2 method.
Definition: table.h:46
Implicit Crank_Nicolson method.
Definition: table.h:44
Implicit Lobatto IIIB-4 method.
Definition: table.h:52