27 int ASize = 5*( (nx-1)*ny + nx*(ny-1) ) - 4*(nx+ny) + 4,
28 numUV = (nx-1)*ny + nx*(ny-1);
30 A.resize(numUV, numUV, ASize);
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]));
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]));
42 const int blockSize = 256,
44 dim3 dimGrid(gridSize, 1);
45 dim3 dimBlock(blockSize, 1);
47 kernels::generateA <<<dimGrid, dimBlock>>> (ARows, ACols, AVals, MVals, LRows, LCols, LVals, ASize, alpha);
virtual void generateA(real alpha)
double real
Is a float or a double depending on the machine precision.
Declaration of the kernels to generate the matrix resulting from the implicit terms in the momentum e...