HermesCommon
2.0
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
tables.h
Go to the documentation of this file.
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://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 "
compat.h
"
26
27
namespace
Hermes
28
{
32
enum
ButcherTableType
33
{
34
/* EXPLICIT METHODS */
35
36
Explicit_RK_1
,
37
Explicit_RK_2
,
38
Explicit_RK_3
,
39
Explicit_RK_4
,
40
41
/* IMPLICIT METHODS */
42
43
Implicit_RK_1
,
44
Implicit_Crank_Nicolson_2_2
,
45
Implicit_SIRK_2_2
,
46
Implicit_ESIRK_2_2
,
47
Implicit_SDIRK_2_2
,
48
Implicit_Lobatto_IIIA_2_2
,
49
Implicit_Lobatto_IIIB_2_2
,
50
Implicit_Lobatto_IIIC_2_2
,
51
Implicit_Lobatto_IIIA_3_4
,
52
Implicit_Lobatto_IIIB_3_4
,
53
Implicit_Lobatto_IIIC_3_4
,
54
Implicit_Radau_IIA_3_5
,
55
Implicit_SDIRK_5_4
,
56
57
/* EMBEDDED EXPLICIT METHODS */
58
59
Explicit_HEUN_EULER_2_12_embedded
,
60
Explicit_BOGACKI_SHAMPINE_4_23_embedded
,
61
Explicit_FEHLBERG_6_45_embedded
,
62
Explicit_CASH_KARP_6_45_embedded
,
63
Explicit_DORMAND_PRINCE_7_45_embedded
,
64
65
/* EMBEDDED IMPLICIT METHODS */
66
67
Implicit_ESDIRK_TRBDF2_3_23_embedded
,
68
69
Implicit_ESDIRK_TRX2_3_23_embedded
,
70
71
Implicit_SDIRK_CASH_3_23_embedded
,
72
73
Implicit_SDIRK_BILLINGTON_3_23_embedded
,
74
75
Implicit_SDIRK_CASH_5_24_embedded
,
76
77
Implicit_SDIRK_CASH_5_34_embedded
,
78
79
Implicit_DIRK_ISMAIL_7_45_embedded
80
81
82
83
};
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
virtual
void
alloc(
unsigned
int
size);
109
double
get_B(
unsigned
int
i);
110
double
get_B2(
unsigned
int
i);
111
double
get_C(
unsigned
int
i);
112
void
set_B(
unsigned
int
i,
double
val);
113
void
set_B2(
unsigned
int
i,
double
val);
114
void
set_C(
unsigned
int
i,
double
val);
115
bool
is_explicit();
116
bool
is_diagonally_implicit();
117
bool
is_fully_implicit();
118
bool
is_embedded();
119
void
switch_B_rows();
120
121
122
protected
:
123
double
* B;
124
double
* B2;
125
126
double
* C;
127
};
128
}
129
#endif
include
tables.h
Generated on Mon Feb 18 2013 14:37:03 for HermesCommon by
1.8.3.1