cuIBM
A GPU-based Immersed Boundary Method code
generateA.inl
Go to the documentation of this file.
1 
9 
10 
17 template <>
19 {
20  int nx = domInfo->nx,
21  ny = domInfo->ny;
22 
23  int ASize = 5*( (nx-1)*ny + nx*(ny-1) ) - 4*(nx+ny) + 4,
24  numUV = (nx-1)*ny + nx*(ny-1);
25 
26  A.resize(numUV, numUV, ASize);
27 
28  int *LRows = thrust::raw_pointer_cast(&(L.row_indices[0])),
29  *LCols = thrust::raw_pointer_cast(&(L.column_indices[0])),
30  *ARows = thrust::raw_pointer_cast(&(A.row_indices[0])),
31  *ACols = thrust::raw_pointer_cast(&(A.column_indices[0])),
32  *tags_r = thrust::raw_pointer_cast(&(tagsD[0]));
33 
34  real *MVals = thrust::raw_pointer_cast(&(M.values[0])),
35  *LVals = thrust::raw_pointer_cast(&(L.values[0])),
36  *AVals = thrust::raw_pointer_cast(&(A.values[0]));
37 
38  const int blockSize = 256,
39  gridSize = 1000;
40  dim3 dimGrid(gridSize, 1);
41  dim3 dimBlock(blockSize, 1);
42 
43  kernels::generateADirectForcing <<<dimGrid, dimBlock>>> (ARows, ACols, AVals, MVals, LRows, LCols, LVals, ASize, alpha, tags_r);
44 } // generateA
double real
Is a float or a double depending on the machine precision.
Definition: types.h:116
A fully discrete formulation of the direct forcing method.
Declaration of the kernels to generate the matrix resulting from the implicit terms in the momentum e...