22 logger.startTimer(
"updateQT");
24 int *QTRows = thrust::raw_pointer_cast(&(QT.row_indices[0])),
25 *QTCols = thrust::raw_pointer_cast(&(QT.column_indices[0]));
26 real *QTVals = thrust::raw_pointer_cast(&(QT.values[0]));
28 int *ERows = thrust::raw_pointer_cast(&(E.row_indices[0])),
29 *ECols = thrust::raw_pointer_cast(&(E.column_indices[0]));
30 real *EVals = thrust::raw_pointer_cast(&(E.values[0]));
32 real *x = thrust::raw_pointer_cast(&(domInfo->xD[0])),
33 *y = thrust::raw_pointer_cast(&(domInfo->yD[0])),
34 *dx = thrust::raw_pointer_cast(&(domInfo->dxD[0]));
36 real *xB = thrust::raw_pointer_cast(&(B.x[0])),
37 *yB = thrust::raw_pointer_cast(&(B.y[0]));
39 int *I = thrust::raw_pointer_cast(&(B.I[0])),
40 *J = thrust::raw_pointer_cast(&(B.J[0]));
45 dim3 dimGrid(
int((B.totalPoints-0.5)/
BLOCKSIZE)+1, 1);
48 kernels::updateQT <<<dimGrid, dimBlock>>>
49 (QTRows, QTCols, QTVals,
52 B.totalPoints, xB, yB, I, J);
54 logger.stopTimer(
"updateQT");
56 logger.startTimer(
"transposeQT");
57 cusp::transpose(QT, Q);
58 logger.stopTimer(
"transposeQT");
60 logger.startTimer(
"transposeE");
61 cusp::transpose(E, ET);
62 logger.stopTimer(
"transposeE");
72 logger.startTimer(
"generateQT");
78 int numUV = numU + nx*(ny-1);
82 cooH QTHost(numP + 2*B.totalPoints, numUV, 4*numP-2*(nx+ny) + 24*B.totalPoints);
84 int *QTRows = thrust::raw_pointer_cast(&(QTHost.row_indices[0])),
85 *QTCols = thrust::raw_pointer_cast(&(QTHost.column_indices[0]));
86 real *QTVals = thrust::raw_pointer_cast(&(QTHost.values[0]));
92 logger.stopTimer(
"generateQT");
__global__ void updateQT(int *QTRows, int *QTCols, real *QTVals, int QTSize, int *tags, real *coeffs)
Update the divergence operator at forcing nodes.
double real
Is a float or a double depending on the machine precision.
void generateQT(int *QTRows, int *QTCols, real *QTVals, int nx, int ny)
Generates the divergence matrix (on the host).
cusp::coo_matrix< int, real, host_memory > cooH
COO matrix stored on the host.
Declaration of the kernels to generate gradient matrix and interpolation matrix.
virtual void generateQT()