tonly check particle positions when np>0 - 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 2a7271b29a2ffb3bf5aa9344954fc60a26c4fbb5
(DIR) parent b47efb7626d2d0a752ac92ad84dabc867c46ee4e
(HTM) Author: Anders Damsgaard Christensen <adc@geo.au.dk>
Date: Fri, 12 Aug 2016 12:43:42 -0700
only check particle positions when np>0
Diffstat:
M src/device.cu | 14 +++++++-------
M tests/cfd_tests_darcy.py | 6 +++---
2 files changed, 10 insertions(+), 10 deletions(-)
---
(DIR) diff --git a/src/device.cu b/src/device.cu
t@@ -984,13 +984,6 @@ __host__ void DEM::startTime()
// MAIN CALCULATION TIME LOOP
while (time.current <= time.total) {
- // check if particle positions have finite values
-#ifdef CHECK_PARTICLES_FINITE
- checkParticlePositions<<<dimGrid, dimBlock>>>(dev_x);
- cudaThreadSynchronize();
- checkForCudaErrorsIter("Post checkParticlePositions", iter);
-#endif
-
// Print current step number to terminal
//printf("\n\n@@@ DEM time step: %ld\n", iter);
t@@ -999,6 +992,13 @@ __host__ void DEM::startTime()
if (np > 0) {
+ // check if particle positions have finite values
+#ifdef CHECK_PARTICLES_FINITE
+ checkParticlePositions<<<dimGrid, dimBlock>>>(dev_x);
+ cudaThreadSynchronize();
+ checkForCudaErrorsIter("Post checkParticlePositions", iter);
+#endif
+
// For each particle:
// Compute hash key (cell index) from position
// in the fine, uniform and homogenous grid.
(DIR) diff --git a/tests/cfd_tests_darcy.py b/tests/cfd_tests_darcy.py
t@@ -22,10 +22,10 @@ orig.initTemporal(total = 0.2, file_dt = 0.01, dt = 1.0e-7)
#orig.g[2] = -10.0
orig.time_file_dt = orig.time_dt*0.99
orig.time_total = orig.time_dt*10
-#orig.run(dry=True)
+orig.run(dry=True)
py = sphere.sim(sid = orig.sid, fluid = True)
-orig.run(verbose=False)
-#orig.run(verbose=True)
+#orig.run(verbose=False)
+orig.run(verbose=True)
zeros = numpy.zeros((orig.num))
py.readlast(verbose = False)