tfix non-Dirichlet BC solution - sphere - GPU-based 3D discrete element method … | |
git clone git://src.adamsgaard.dk/sphere | |
Log | |
Files | |
Refs | |
LICENSE | |
--- | |
commit 9a2de9aa592281516aa2e26a0bbaea67d3265d9d | |
parent 2c37b16a9453da73ba601a75c2385c80f4e5bab1 | |
Author: Anders Damsgaard <[email protected]> | |
Date: Wed, 7 Jan 2015 11:42:52 +0100 | |
fix non-Dirichlet BC solution | |
Diffstat: | |
M src/darcy.cuh | 16 ++++++++-------- | |
1 file changed, 8 insertions(+), 8 deletions(-) | |
--- | |
diff --git a/src/darcy.cuh b/src/darcy.cuh | |
t@@ -892,15 +892,15 @@ __global__ void firstDarcySolution( | |
// Perform the epsilon updates for all non-ghost nodes except the Dirichlet | |
// boundaries at z=0 and z=nz-1. | |
// Adjust z range if a boundary has the Dirichlet boundary condition. | |
- /*int z_min = 0; | |
+ int z_min = 0; | |
int z_max = nz-1; | |
if (bc_bot == 0) | |
z_min = 1; | |
if (bc_top == 0) | |
- z_max = nz-2;*/ | |
+ z_max = nz-2; | |
- //if (x < nx && y < ny && z >= z_min && z <= z_max) { | |
- if (x < nx && y < ny && z < nz) { | |
+ //if (x < nx && y < ny && z < nz) { | |
+ if (x < nx && y < ny && z >= z_min && z <= z_max) { | |
// 1D thread index | |
const unsigned int cellidx = d_idx(x,y,z); | |
t@@ -1051,15 +1051,15 @@ __global__ void updateDarcySolution( | |
// Perform the epsilon updates for all non-ghost nodes except the Dirichlet | |
// boundaries at z=0 and z=nz-1. | |
// Adjust z range if a boundary has the Dirichlet boundary condition. | |
- /*int z_min = 0; | |
+ int z_min = 0; | |
int z_max = nz-1; | |
if (bc_bot == 0) | |
z_min = 1; | |
if (bc_top == 0) | |
- z_max = nz-2;*/ | |
+ z_max = nz-2; | |
- //if (x < nx && y < ny && z >= z_min && z <= z_max) { | |
- if (x < nx && y < ny && z < nz) { | |
+ //if (x < nx && y < ny && z < nz) { | |
+ if (x < nx && y < ny && z >= z_min && z <= z_max) { | |
// 1D thread index | |
const unsigned int cellidx = d_idx(x,y,z); |