22 const int blocksize = 256;
27 int QSize = 4*nx*ny-2*(nx+ny);
29 int *QRows = thrust::raw_pointer_cast(&(Q.row_indices[0])),
30 *QCols = thrust::raw_pointer_cast(&(Q.column_indices[0]));
31 int *tags_r = thrust::raw_pointer_cast(&(tagsD[0]));
33 real *QVals = thrust::raw_pointer_cast(&(Q.values[0]));
35 dim3 dimGrid(
int((QSize-0.5)/blocksize) + 1, 1);
36 dim3 dimBlock(blocksize, 1);
38 kernels::updateQ <<<dimGrid, dimBlock>>> (QRows, QCols, QVals, QSize, tags_r);
45 template <
typename memoryType>
double real
Is a float or a double depending on the machine precision.
virtual void generateQT()
Compute the divergence operator (transpose of the gradient one).
Solves the Navier-Stokes equations in a rectangular domain.
Declaration of the kernels to generate gradient matrix and interpolation matrix.
virtual void generateQT()
__global__ void updateQ(int *QRows, int *QCols, real *QVals, int QSize, int *tags)
Update the gradient operator at forcing nodes.