23 real dt = (*paramDB)[
"simulation"][
"dt"].get<
real>();
25 real *dxD = thrust::raw_pointer_cast(&(domInfo->dxD[0])),
26 *dyD = thrust::raw_pointer_cast(&(domInfo->dyD[0]));
29 int numUV = numU + nx*(ny-1);
30 M.resize(numUV, numUV, numUV);
31 Minv.resize(numUV, numUV, numUV);
33 int *MRows = thrust::raw_pointer_cast(&(M.row_indices[0])),
34 *MCols = thrust::raw_pointer_cast(&(M.column_indices[0])),
35 *MinvRows = thrust::raw_pointer_cast(&(Minv.row_indices[0])),
36 *MinvCols = thrust::raw_pointer_cast(&(Minv.column_indices[0]));
38 real *MVals = thrust::raw_pointer_cast(&(M.values[0])),
39 *MinvVals = thrust::raw_pointer_cast(&(Minv.values[0]));
41 const int blockSize = 256;
42 dim3 dimGrid(
int((nx*ny-0.5)/blockSize) + 1, 1);
43 dim3 dimBlock(blockSize, 1);
44 kernels::fillM_u <<<dimGrid, dimBlock>>> (MRows, MCols, MVals, MinvRows, MinvCols, MinvVals, nx, ny, dxD, dyD, dt);
45 kernels::fillM_v <<<dimGrid, dimBlock>>> (MRows, MCols, MVals, MinvRows, MinvCols, MinvVals, nx, ny, dxD, dyD, dt);
double real
Is a float or a double depending on the machine precision.
Declaration of the kernels to generate the mass matrix and its inverse.