HyPar  1.0
Finite-Difference Hyperbolic-Parabolic PDE Solver on Cartesian Grids
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
NavierStokes3DCleanup_GPU.c File Reference

Clean up the 3D Navier Stokes module in the GPU memory. More...

#include <stdlib.h>
#include <physicalmodels/navierstokes3d.h>
#include <arrayfunctions_gpu.h>

Go to the source code of this file.

Functions

int gpuNavierStokes3DCleanup (void *s)
 

Detailed Description

Clean up the 3D Navier Stokes module in the GPU memory.

Author
Youngdae Kim

Definition in file NavierStokes3DCleanup_GPU.c.

Function Documentation

int gpuNavierStokes3DCleanup ( void *  s)

Function to clean up all allocations in the 3D Navier Stokes module.

Parameters
sObject of type NavierStokes3D

Definition at line 13 of file NavierStokes3DCleanup_GPU.c.

14 {
15  NavierStokes3D *param = (NavierStokes3D*) s;
16 
17  gpuFree(param->gpu_Q);
18  gpuFree(param->gpu_QDerivX);
19  gpuFree(param->gpu_QDerivY);
20  gpuFree(param->gpu_QDerivZ);
21  gpuFree(param->gpu_FViscous);
22  gpuFree(param->gpu_FDeriv);
23  gpuFree(param->gpu_grav_field_f);
24  gpuFree(param->gpu_grav_field_g);
25  gpuFree(param->gpu_fast_jac);
26  gpuFree(param->gpu_solution);
27 
28  return(0);
29 }
double * gpu_solution
double * gpu_FDeriv
double * gpu_QDerivY
void gpuFree(void *)
double * gpu_grav_field_f
double * gpu_QDerivX
Structure containing variables and parameters specific to the 3D Navier Stokes equations. This structure contains the physical parameters, variables, and function pointers specific to the 3D Navier-Stokes equations.
double * gpu_fast_jac
double * gpu_QDerivZ
double * gpu_grav_field_g
double * gpu_FViscous