cuIBM
A GPU-based Immersed Boundary Method code
generateQT.inl
Go to the documentation of this file.
1 
8 
9 
15 template <>
17 {
18  logger.startTimer("generateQT");
19 
20  int nx = domInfo->nx,
21  ny = domInfo->ny;
22 
23  int numU = (nx-1)*ny;
24  int numUV = numU + nx*(ny-1);
25  int numP = numU + ny;
26 
27  cooH QTHost(numP, numUV, 4*numP-2*(nx+ny));
28 
29  int *QTRows = thrust::raw_pointer_cast(&(QTHost.row_indices[0])),
30  *QTCols = thrust::raw_pointer_cast(&(QTHost.column_indices[0]));
31  real *QTVals = thrust::raw_pointer_cast(&(QTHost.values[0]));
32 
33  kernels::generateQT(QTRows, QTCols, QTVals, nx, ny);
34  QT = QTHost;
35  cusp::transpose(QT, Q);
36 
37  logger.stopTimer("generateQT");
38 } // generateQT
double real
Is a float or a double depending on the machine precision.
Definition: types.h:116
void generateQT(int *QTRows, int *QTCols, real *QTVals, int nx, int ny)
Generates the divergence matrix (on the host).
Definition: generateQT.cu:110
cusp::coo_matrix< int, real, host_memory > cooH
COO matrix stored on the host.
Definition: types.h:126
Declaration of the kernels to generate gradient matrix and interpolation matrix.
virtual void generateQT()