tuse fluid density from cpu struct - 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 f3f948c938ab96276133a7ef985abf23a03e1d0e
 (DIR) parent b8d99b1d8db8b152c9a9810e101ba31aa7791e52
 (HTM) Author: Anders Damsgaard <anders.damsgaard@geo.au.dk>
       Date:   Wed, 19 Nov 2014 12:18:50 +0100
       
       use fluid density from cpu struct
       
       Diffstat:
         M src/darcy.cuh                       |       3 ++-
         M src/device.cu                       |       1 +
       
       2 files changed, 3 insertions(+), 1 deletion(-)
       ---
 (DIR) diff --git a/src/darcy.cuh b/src/darcy.cuh
       t@@ -504,6 +504,7 @@ __global__ void findDarcyPressureForce(
            const Float*  __restrict__ dev_darcy_p,     // in
            const Float*  __restrict__ dev_darcy_phi,   // in
            const unsigned int wall0_iz,                // in
       +    const Float rho_f,                          // in
            Float4* __restrict__ dev_force,             // out
            Float4* __restrict__ dev_darcy_f_p)         // out
        {
       t@@ -558,7 +559,7 @@ __global__ void findDarcyPressureForce(
                // buoyancy force = weight of displaced fluid
                // f_b = -rho_f*V*g
                Float3 f_p = -1.0*grad_p*V/(1.0 - phi);
       -            - devC_params.rho_f*V*MAKE_FLOAT3(
       +            - rho_f*V*MAKE_FLOAT3(
                            devC_params.g[0],
                            devC_params.g[1],
                            devC_params.g[2]);
 (DIR) diff --git a/src/device.cu b/src/device.cu
       t@@ -1817,6 +1817,7 @@ __host__ void DEM::startTime()
                                    dev_darcy_p,
                                    dev_darcy_phi,
                                    wall0_iz,
       +                            darcy.rho_f,
                                    dev_force,
                                    dev_darcy_f_p);
                            cudaThreadSynchronize();