tMerge branch 'master' of github.com:anders-dc/sphere - sphere - GPU-based 3D discrete element method algorithm with optional fluid coupling
(HTM) git clone git://src.adamsgaard.dk/sphere
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) LICENSE
---
(DIR) commit 41a0e97b90d516d683503eb1620831a5816a6ba6
(DIR) parent 201649db54d80500de7412e998d76221472b3af9
(HTM) Author: Anders Damsgaard Christensen <adc@geo.au.dk>
Date: Fri, 12 Aug 2016 11:36:53 -0700
Merge branch 'master' of github.com:anders-dc/sphere
Diffstat:
M python/sphere.py | 2 +-
M src/darcy.cuh | 25 ++++++++++++-------------
M src/device.cu | 32 ++++++++++++++++----------------
3 files changed, 29 insertions(+), 30 deletions(-)
---
(DIR) diff --git a/python/sphere.py b/python/sphere.py
t@@ -1432,7 +1432,7 @@ class sim:
fh.write(self.p_mod_f.astype(numpy.float64))
fh.write(self.p_mod_phi.astype(numpy.float64))
- if self.cfd_solve[0] == 1: # Sides only adjustable with Darcy
+ if self.cfd_solver[0] == 1: # Sides only adjustable with Darcy
fh.write(self.bc_xn.astype(numpy.int32))
fh.write(self.bc_xp.astype(numpy.int32))
fh.write(self.bc_yn.astype(numpy.int32))
(DIR) diff --git a/src/darcy.cuh b/src/darcy.cuh
t@@ -777,7 +777,6 @@ __global__ void copyDarcyPorositiesToBottom(
// Grid dimensions
const unsigned int nx = devC_grid.num[0];
const unsigned int ny = devC_grid.num[1];
- const unsigned int nz = devC_grid.num[2];
// check that we are not outside the fluid grid
if (devC_grid.periodic == 2 &&
t@@ -1685,11 +1684,11 @@ __global__ void firstDarcySolution(
//const Float div_v_p = dev_darcy_div_v_p[cellidx];
const Float3 vp_avg = dev_darcy_vp_avg[cellidx];
- const Float p_xn = dev_darcy_p[d_idx(x-1,y,z)];
+ Float p_xn = dev_darcy_p[d_idx(x-1,y,z)];
const Float p = dev_darcy_p[cellidx];
- const Float p_xp = dev_darcy_p[d_idx(x+1,y,z)];
- const Float p_yn = dev_darcy_p[d_idx(x,y-1,z)];
- const Float p_yp = dev_darcy_p[d_idx(x,y+1,z)];
+ Float p_xp = dev_darcy_p[d_idx(x+1,y,z)];
+ Float p_yn = dev_darcy_p[d_idx(x,y-1,z)];
+ Float p_yp = dev_darcy_p[d_idx(x,y+1,z)];
Float p_zn = dev_darcy_p[d_idx(x,y,z-1)];
Float p_zp = dev_darcy_p[d_idx(x,y,z+1)];
t@@ -1751,8 +1750,8 @@ __global__ void firstDarcySolution(
// dynamic
if ((bc_bot == 0 && z == 0) || (bc_top == 0 && z == nz-1)
|| (z >= wall0_iz && bc_top == 0)
- || (bc_xn == 0 && x == 0) || (bc_xp == 0 && x = nx-1)
- || (bc_yn == 0 && y == 0) || (bc_yp == 0 && y = nx-1))
+ || (bc_xn == 0 && x == 0) || (bc_xp == 0 && x == nx-1)
+ || (bc_yn == 0 && y == 0) || (bc_yp == 0 && y == nx-1))
dp_expl = 0.0;
#ifdef REPORT_FORCING_TERMS
t@@ -1867,11 +1866,11 @@ __global__ void updateDarcySolution(
const Float p_old = dev_darcy_p_old[cellidx];
const Float dp_expl = dev_darcy_dp_expl[cellidx];
- const Float p_xn = dev_darcy_p[d_idx(x-1,y,z)];
+ Float p_xn = dev_darcy_p[d_idx(x-1,y,z)];
const Float p = dev_darcy_p[cellidx];
- const Float p_xp = dev_darcy_p[d_idx(x+1,y,z)];
- const Float p_yn = dev_darcy_p[d_idx(x,y-1,z)];
- const Float p_yp = dev_darcy_p[d_idx(x,y+1,z)];
+ Float p_xp = dev_darcy_p[d_idx(x+1,y,z)];
+ Float p_yn = dev_darcy_p[d_idx(x,y-1,z)];
+ Float p_yp = dev_darcy_p[d_idx(x,y+1,z)];
Float p_zn = dev_darcy_p[d_idx(x,y,z-1)];
Float p_zp = dev_darcy_p[d_idx(x,y,z+1)];
t@@ -1934,8 +1933,8 @@ __global__ void updateDarcySolution(
// dynamic
if ((bc_bot == 0 && z == 0) || (bc_top == 0 && z == nz-1)
|| (z >= wall0_iz && bc_top == 0)
- || (bc_xn == 0 && x == 0) || (bc_xp == 0 && x = nx-1)
- || (bc_yn == 0 && y == 0) || (bc_yp == 0 && y = nx-1))
+ || (bc_xn == 0 && x == 0) || (bc_xp == 0 && x == nx-1)
+ || (bc_yn == 0 && y == 0) || (bc_yp == 0 && y == nx-1))
dp_impl = 0.0;
//p_new = p;
(DIR) diff --git a/src/device.cu b/src/device.cu
t@@ -1878,8 +1878,8 @@ __host__ void DEM::startTime()
setDarcyGhostNodes<Float3><<<dimGridFluid, dimBlockFluid>>>(
dev_darcy_grad_p,
- darcy.xn, darcy.xp,
- darcy.yn, darcy.yp,
+ darcy.bc_xn, darcy.bc_xp,
+ darcy.bc_yn, darcy.bc_yp,
darcy.bc_bot, darcy.bc_top);
cudaThreadSynchronize();
if (PROFILING == 1)
t@@ -2034,8 +2034,8 @@ __host__ void DEM::startTime()
startTimer(&kernel_tic);
setDarcyGhostNodes<Float><<<dimGridFluid, dimBlockFluid>>>(
dev_darcy_phi,
- darcy.xn, darcy.xp,
- darcy.yn, darcy.yp,
+ darcy.bc_xn, darcy.bc_xp,
+ darcy.bc_yn, darcy.bc_yp,
darcy.bc_bot, darcy.bc_top);
cudaThreadSynchronize();
if (PROFILING == 1)
t@@ -2048,8 +2048,8 @@ __host__ void DEM::startTime()
startTimer(&kernel_tic);
setDarcyGhostNodes<Float><<<dimGridFluid, dimBlockFluid>>>(
dev_darcy_k,
- darcy.xn, darcy.xp,
- darcy.yn, darcy.yp,
+ darcy.bc_xn, darcy.bc_xp,
+ darcy.bc_yn, darcy.bc_yp,
darcy.bc_bot, darcy.bc_top);
cudaThreadSynchronize();
if (PROFILING == 1)
t@@ -2146,8 +2146,8 @@ __host__ void DEM::startTime()
setDarcyGhostNodes<Float>
<<<dimGridFluid, dimBlockFluid>>>(
dev_darcy_p,
- darcy.xn, darcy.xp,
- darcy.yn, darcy.yp,
+ darcy.bc_xn, darcy.bc_xp,
+ darcy.bc_yn, darcy.bc_yp,
darcy.bc_bot, darcy.bc_top);
cudaThreadSynchronize();
if (PROFILING == 1)
t@@ -2169,10 +2169,10 @@ __host__ void DEM::startTime()
dev_darcy_grad_k,
darcy.beta_f,
darcy.mu,
- darcy.xn,
- darcy.xp,
- darcy.yn,
- darcy.yp,
+ darcy.bc_xn,
+ darcy.bc_xp,
+ darcy.bc_yn,
+ darcy.bc_yp,
darcy.bc_bot,
darcy.bc_top,
darcy.ndem,
t@@ -2202,10 +2202,10 @@ __host__ void DEM::startTime()
dev_darcy_grad_k,
darcy.beta_f,
darcy.mu,
- darcy.xn,
- darcy.xp,
- darcy.yn,
- darcy.yp,
+ darcy.bc_xn,
+ darcy.bc_xp,
+ darcy.bc_yn,
+ darcy.bc_yp,
darcy.bc_bot,
darcy.bc_top,
darcy.ndem,