tonly set dphi if relevant - 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 8bf65a86fbf64159696822fd4bce622ca670f7a6
 (DIR) parent 8384dea2ebcbf7f35b1557e37e298dca23be7948
 (HTM) Author: Anders Damsgaard <anders.damsgaard@geo.au.dk>
       Date:   Fri,  7 Nov 2014 14:00:55 +0100
       
       only set dphi if relevant
       
       Diffstat:
         M src/device.cu                       |      13 ++++++++-----
       
       1 file changed, 8 insertions(+), 5 deletions(-)
       ---
 (DIR) diff --git a/src/device.cu b/src/device.cu
       t@@ -2187,11 +2187,14 @@ __host__ void DEM::startTime()
                            iter);
        
                    // Empty the dphi values after device to host transfer
       -            setDarcyZeros<Float> <<<dimGridFluid, dimBlockFluid>>>
       -                (dev_darcy_dphi);
       -            cudaThreadSynchronize();
       -            checkForCudaErrorsIter(
       -                    "After setDarcyZeros(dev_darcy_dphi) after transfer", iter);
       +            if (fluid == 1 && cfd_solver == 1) {
       +                setDarcyZeros<Float> <<<dimGridFluid, dimBlockFluid>>>
       +                    (dev_darcy_dphi);
       +                cudaThreadSynchronize();
       +                checkForCudaErrorsIter(
       +                        "After setDarcyZeros(dev_darcy_dphi) after transfer",
       +                        iter);
       +            }
        
        
                    // Pause the CPU thread until all CUDA calls previously issued are