tAdded option to fix particle horizontal and vertical velocity - 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 06df2fb69034c673e2ff6c2fe0411f46ea597d9e
 (DIR) parent df3e897f18c146bcf635a58d25a144b4ffc154fa
 (HTM) Author: Anders Damsgaard <anders.damsgaard@geo.au.dk>
       Date:   Wed,  2 Apr 2014 09:17:53 +0200
       
       Added option to fix particle horizontal and vertical velocity
       
       Diffstat:
         M python/sphere.py                    |       4 +++-
         M src/integration.cuh                 |      12 +++++++++++-
         M src/navierstokes.cuh                |       2 --
       
       3 files changed, 14 insertions(+), 4 deletions(-)
       ---
 (DIR) diff --git a/python/sphere.py b/python/sphere.py
       t@@ -602,7 +602,9 @@ class sim:
                :type radius: float
                :param vel: The particle linear velocity (default = [0,0,0])
                :type vel: numpy.array
       -        :param fixvel: Fix horizontal linear velocity (0: No, 1: Yes, default=0)
       +        :param fixvel: 0: Do not fix particle velocity (default), 1: Fix
       +            horizontal linear velocity, -1: Fix horizontal and vertical linear
       +            velocity
                :type fixvel: float
                :param angpos: The particle angular position (default = [0,0,0])
                :type angpos: numpy.array
 (DIR) diff --git a/src/integration.cuh b/src/integration.cuh
       t@@ -87,7 +87,7 @@ __global__ void integrate(Float4* dev_x_sorted, Float4* dev_vel_sorted, // Input
                // velocity. In that case, zero the horizontal acceleration and disable
                // gravity to counteract segregation. Particles may move in the
                // z-dimension, to allow for dilation.
       -        if (vel.w > 0.0f) {
       +        if (vel.w > 0.0001) {
        
                    acc.x = 0.0;
                    acc.y = 0.0;
       t@@ -95,6 +95,16 @@ __global__ void integrate(Float4* dev_x_sorted, Float4* dev_vel_sorted, // Input
        
                    // Zero the angular acceleration
                    angacc = MAKE_FLOAT4(0.0, 0.0, 0.0, 0.0);
       +
       +        }
       +
       +        if (vel.w < 0.0001) {
       +            acc.x = 0.0;
       +            acc.y = 0.0;
       +            acc.z = 0.0;
       +
       +            // Zero the angular acceleration
       +            angacc = MAKE_FLOAT4(0.0, 0.0, 0.0, 0.0);
                }
        
        
 (DIR) diff --git a/src/navierstokes.cuh b/src/navierstokes.cuh
       t@@ -2423,8 +2423,6 @@ __global__ void applyParticleInteractionForce(
            }
        }
        
       -// Find the effective pressure that the top wall should exert
       -
        // Print final heads and free memory
        void DEM::endNSdev()
        {