HyPar  1.0
Finite-Difference Hyperbolic-Parabolic PDE Solver on Cartesian Grids
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
WENOCleanup.c
Go to the documentation of this file.
1 
6 #include <stdlib.h>
7 #if defined(HAVE_CUDA)
8 #include <arrayfunctions_gpu.h>
9 #endif
10 #include <interpolation.h>
11 #include <mpivars.h>
12 #include <hypar.h>
13 
17 int WENOCleanup(void *s,
18  int flag_gpu )
19 {
20  WENOParameters *weno = (WENOParameters*) s;
21 
22  if (weno->offset) free(weno->offset);
23 #if defined(HAVE_CUDA)
24  if (flag_gpu) {
25  if (weno->w1) gpuFree(weno->w1);
26  if (weno->w2) gpuFree(weno->w2);
27  if (weno->w3) gpuFree(weno->w3);
28  } else {
29 #endif
30  if (weno->w1) free(weno->w1);
31  if (weno->w2) free(weno->w2);
32  if (weno->w3) free(weno->w3);
33 #if defined(HAVE_CUDA)
34  }
35 #endif
36 
37  return(0);
38 }
Definitions for the functions computing the interpolated value of the primitive at the cell interface...
MPI related function definitions.
int WENOCleanup(void *, int)
Definition: WENOCleanup.c:17
Structure of variables/parameters needed by the WENO-type scheme.
void gpuFree(void *)
Contains function definitions for common array operations on GPU.
Contains structure definition for hypar.