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