made matching changes to gpu/Color.cu to track previous commit to cpu/Color.cpp
This commit is contained in:
parent
a00993eb36
commit
d415e60745
44
gpu/Color.cu
44
gpu/Color.cu
@ -14,31 +14,27 @@ __global__ void dvc_InitDenColor(char *ID, double *Den, double *Phi, double das
|
||||
//........Get 1-D index for this thread....................
|
||||
n = S*blockIdx.x*blockDim.x + s*blockDim.x + threadIdx.x;
|
||||
if (n<N){
|
||||
|
||||
//.......Back out the 3-D indices for node n..............
|
||||
k = n/(Nx*Ny);
|
||||
j = (n-Nx*Ny*k)/Nx;
|
||||
i = n-Nx*Ny*k-Nx*j;
|
||||
|
||||
//.......Back out the 3-D indices for node n..............
|
||||
k = n/(Nx*Ny);
|
||||
j = (n-Nx*Ny*k)/Nx;
|
||||
i = n-Nx*Ny*k-Nx*j;
|
||||
|
||||
if ( ID[n] == 1){
|
||||
Den[2*n] = 1.0;
|
||||
Den[2*n+1] = 0.0;
|
||||
Phi[n] = 1.0;
|
||||
}
|
||||
else if ( ID[n] == 2){
|
||||
Den[2*n] = 0.0;
|
||||
Den[2*n+1] = 1.0;
|
||||
Phi[n] = -1.0;
|
||||
}
|
||||
else{
|
||||
Den[2*n] = das;
|
||||
Den[2*n+1] = dbs;
|
||||
Phi[n] = (das-dbs)/(das+dbs);
|
||||
}
|
||||
if (i == 0 || j == 0 || k == 0 || i == Nx-1 || j == Ny-1 || k == Nz-1){
|
||||
Den[2*n] = 0.0;
|
||||
Den[2*n+1] = 0.0;
|
||||
}
|
||||
if ( ID[n] == 1){
|
||||
Den[n] = 1.0;
|
||||
Den[N+n] = 0.0;
|
||||
Phi[n] = 1.0;
|
||||
}
|
||||
else if ( ID[n] == 2){
|
||||
Den[n] = 0.0;
|
||||
Den[N+n] = 1.0;
|
||||
Phi[n] = -1.0;
|
||||
}
|
||||
else{
|
||||
Den[n] = das;
|
||||
Den[N+n] = dbs;
|
||||
Phi[n] = (das-dbs)/(das+dbs);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user