32 int I = blockIdx.x*blockDim.x + threadIdx.x;
37 rhs1[I] = rhs1[I]*(tags[I]==-1);
56 int I = blockIdx.x*blockDim.x + threadIdx.x;
61 rhs1[I] = (tags[I]==-1)*rhs1[I]
62 + ((tags[I]!=-1)*((1.0-coeffs[I])*uv[I])) * 0.5*(dx[i+1]+dx[i])/dt;
83 int I = blockIdx.x*blockDim.x + threadIdx.x + numU;
84 int j = (I-numU) / nx;
86 if( I < numU + nx*(ny-1) )
88 rhs1[I] = (tags[I]==-1)*rhs1[I]
89 + ((tags[I]!=-1)*((1.0-coeffs[I])*uv[I])) * 0.5*(dy[j+1]+dy[j])/dt;
110 int I = blockIdx.x*blockDim.x + threadIdx.x;
115 rhs1[I] = (tags[I]==-1)*rhs1[I]
116 + ((tags[I]!=-1)*((1.0-coeffs[I]-coeffs2[I])*uv[I])) * 0.5*(dx[i+1]+dx[i])/dt;
137 int numU = (nx-1)*ny;
138 int I = blockIdx.x*blockDim.x + threadIdx.x + numU;
139 int j = (I-numU) / nx;
141 if( I < numU + nx*(ny-1) )
143 rhs1[I] = (tags[I]==-1)*rhs1[I]
144 + ((tags[I]!=-1)*((1.0-coeffs[I]-coeffs2[I])*uv[I])) * 0.5*(dy[j+1]+dy[j])/dt;
Declaration of the kernels to update the right hand-side of the intermediate velocity flux solver...
__global__ void updateRHS1(real *rhs1, int numUV, int *tags)
Update the RHS vector of the velocity system at forcing nodes.
double real
Is a float or a double depending on the machine precision.
Contains all the custom-written CUDA kernels.
__global__ void updateRHS1Y(real *rhs1, int nx, int ny, real dt, real *dy, int *tags, real *coeffs, real *uv)
Perform 1D linear interpolation at forcing points for the y-velocity.
__global__ void updateRHS1X(real *rhs1, int nx, int ny, real dt, real *dx, int *tags, real *coeffs, real *uv)
Perform 1D linear interpolation at forcing points for the x-velocity.