HyPar  1.0
Finite-Difference Hyperbolic-Parabolic PDE Solver on Cartesian Grids
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
timeintegration_struct.h
Go to the documentation of this file.
1 
6 #ifndef _TIME_INTEGRATION_STRUCT_H_
7 #define _TIME_INTEGRATION_STRUCT_H_
8 
9 #include <sys/time.h>
10 #include <basic.h>
11 
12 /* definitions */
14 #define _FORWARD_EULER_ "euler"
15 
16 #define _RK_ "rk"
17 
18 #define _GLM_GEE_ "glm-gee"
19 
29 typedef struct time_integration_variables {
31  int iter;
33  int n_iter;
37  double waqt;
39  double dt;
41  double norm;
43  double max_cfl;
45  double max_diff;
46 
48  void *simulation;
50  int nsims;
51 
54  long *u_offsets;
55 
57  long *u_sizes;
58 
61  int *bf_offsets;
62 
64  int *bf_sizes;
65 
67  double *u;
68 
70  double *rhs;
71 
74 
77 
79  double **U;
81  double **Udot;
82 
84  int rank;
86  int nproc;
87 
90  double **BoundaryFlux;
91 
93  void *ResidualFile;
94 
96  int (*TimeIntegrate) (void*);
98  int (*RHSFunction) (double*,double*,void*,void*,double);
99 
101  struct timeval iter_start_time;
103  struct timeval iter_end_time;
105  double iter_wctime;
107 
108 #if defined(HAVE_CUDA)
109 
110  double *gpu_U;
112  double *gpu_Udot;
116 #endif
117 
119 
120 /* Explicit Runge-Kutta Methods */
128 #define _RK_1FE_ "1fe"
129 
136 #define _RK_22_ "22"
137 
144 #define _RK_33_ "33"
145 
152 #define _RK_44_ "44"
153 
165 #define _RK_SSP3_ "ssprk3"
166 #define _RK_TVD3_ "tvdrk3"
177 typedef struct _explicit_rungekutta_time_integration_ {
178  int nstages;
179  double *A,
181  *b,
182  *c;
184 
185 /* General Linear Methods with Global Error Estimate */
193 #define _GLM_GEE_YYT_ "yyt"
194 
201 #define _GLM_GEE_YEPS_ "yeps"
202 
209 #define _GLM_GEE_23_ "23"
210 
217 #define _GLM_GEE_24_ "24"
218 
225 #define _GLM_GEE_25I_ "25i"
226 
233 #define _GLM_GEE_35_ "35"
234 
241 #define _GLM_GEE_EXRK2A_ "exrk2a"
242 
249 #define _GLM_GEE_RK32G1_ "rk32g1"
250 
257 #define _GLM_GEE_RK285EX_ "rk285ex"
258 
267 typedef struct _glm_gee_time_integration_ {
268  int nstages,
269  r;
270  char ee_mode[_MAX_STRING_SIZE_];
271  double *A_yyt,
272  *B_yyt ,
273  *C_yyt ,
274  *D_yyt ,
275  *c_yyt;
276  double *A_yeps,
277  *B_yeps,
278  *C_yeps,
279  *D_yeps,
280  *c_yeps;
281  double *A,
282  *B,
283  *C,
284  *D,
285  *c;
286  double gamma;
288 
289 #endif
Structure of variables/parameters and function pointers for time integration.
#define _MAX_STRING_SIZE_
Definition: basic.h:14
Structure containing the parameters for the General Linear Methods with Global Error Estimators (GLM-...
Structure containing the parameters for an explicit Runge-Kutta method.
Some basic definitions and macros.