cuIBM
A GPU-based Immersed Boundary Method code
updateRHS1.inl
Go to the documentation of this file.
1 
9 
10 
19 template <>
21 {
22  int nx = domInfo->nx,
23  ny = domInfo->ny;
24  int numUV = (nx-1)*ny + nx*(ny-1);
25 
26  real dt = (*paramDB)["simulation"]["dt"].get<real>();
27 
28  real *rhs1_r = thrust::raw_pointer_cast(&(rhs1[0]));
29  int *tags_r = thrust::raw_pointer_cast(&(tagsD[0])),
30  *tags2_r = thrust::raw_pointer_cast(&(tags2D[0]));
31 
32  real *dx_r = thrust::raw_pointer_cast( &(domInfo->dxD[0]) ),
33  *dy_r = thrust::raw_pointer_cast( &(domInfo->dyD[0]) ),
34  *coeffs_r = thrust::raw_pointer_cast( &(coeffsD[0]) ),
35  *coeffs2_r = thrust::raw_pointer_cast( &(coeffs2D[0]) ),
36  *uv_r = thrust::raw_pointer_cast( &(uvD[0]) );
37 
38  const int blocksize = 256;
39  dim3 dimGrid( int( ((nx-1)*ny+nx*(ny-1)-0.5)/blocksize ) + 1, 1);
40  dim3 dimBlock(blocksize, 1);
41 
42  // 1-d interpolation
43  kernels::updateRHS1 <<<dimGrid, dimBlock>>> (rhs1_r, numUV, tags_r);
44 
45  //kernels::updateRHS1X <<<dimGrid, dimBlock>>>(rhs1_r, nx, ny, dt, dx_r, tags_r, coeffs_r, uv_r);
46  //kernels::updateRHS1Y <<<dimGrid, dimBlock>>>(rhs1_r, nx, ny, dt, dy_r, tags_r, coeffs_r, uv_r);
47  kernels::updateRHS1X <<<dimGrid, dimBlock>>>(rhs1_r, nx, ny, dt, dx_r, tags_r, coeffs_r, coeffs2_r, uv_r);
48  kernels::updateRHS1Y <<<dimGrid, dimBlock>>>(rhs1_r, nx, ny, dt, dy_r, tags_r, coeffs_r, coeffs2_r, uv_r);
49 } // updateRHS1
Declaration of the kernels to update the right hand-side of the intermediate velocity flux solver...
double real
Is a float or a double depending on the machine precision.
Definition: types.h:116