tadd comment, upgrade constant floating point values to double precision - 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 b2f5d9af5a8accdea3718e6b8086b26c7502904e
 (DIR) parent 8093cbda018caae219ed8f38c17364852e733e28
 (HTM) Author: Anders Damsgaard <anders.damsgaard@geo.au.dk>
       Date:   Tue, 26 Aug 2014 13:08:38 +0200
       
       add comment, upgrade constant floating point values to double precision
       
       Diffstat:
         M src/contactsearch.cuh               |      14 ++++++++------
       
       1 file changed, 8 insertions(+), 6 deletions(-)
       ---
 (DIR) diff --git a/src/contactsearch.cuh b/src/contactsearch.cuh
       t@@ -20,24 +20,24 @@ __device__ int findDistMod(int3* targetCell, Float3* distmod)
                if (targetCell->x < 0) {
                    //targetCell->x = devC_grid.num[0] - 1;
                    targetCell->x += devC_grid.num[0];
       -            *distmod += MAKE_FLOAT3(devC_grid.L[0], 0.0f, 0.0f);
       +            *distmod += MAKE_FLOAT3(devC_grid.L[0], 0.0, 0.0);
                }
                if (targetCell->x >= devC_grid.num[0]) {
                    //targetCell->x = 0;
                    targetCell->x -= devC_grid.num[0];
       -            *distmod -= MAKE_FLOAT3(devC_grid.L[0], 0.0f, 0.0f);
       +            *distmod -= MAKE_FLOAT3(devC_grid.L[0], 0.0, 0.0);
                }
        
                // Periodic y-boundary
                if (targetCell->y < 0) {
                    //targetCell->y = devC_grid.num[1] - 1;
                    targetCell->y += devC_grid.num[1];
       -            *distmod += MAKE_FLOAT3(0.0f, devC_grid.L[1], 0.0f);
       +            *distmod += MAKE_FLOAT3(0.0, devC_grid.L[1], 0.0);
                }
                if (targetCell->y >= devC_grid.num[1]) {
                    //targetCell->y = 0;
                    targetCell->y -= devC_grid.num[1];
       -            *distmod -= MAKE_FLOAT3(0.0f, devC_grid.L[1], 0.0f);
       +            *distmod -= MAKE_FLOAT3(0.0, devC_grid.L[1], 0.0);
                }
        
        
       t@@ -48,12 +48,12 @@ __device__ int findDistMod(int3* targetCell, Float3* distmod)
                if (targetCell->x < 0) {
                    //targetCell->x = devC_grid.num[0] - 1;
                    targetCell->x += devC_grid.num[0];
       -            *distmod += MAKE_FLOAT3(devC_grid.L[0], 0.0f, 0.0f);
       +            *distmod += MAKE_FLOAT3(devC_grid.L[0], 0.0, 0.0);
                }
                if (targetCell->x >= devC_grid.num[0]) {
                    //targetCell->x = 0;
                    targetCell->x -= devC_grid.num[0];
       -            *distmod -= MAKE_FLOAT3(devC_grid.L[0], 0.0f, 0.0f);
       +            *distmod -= MAKE_FLOAT3(devC_grid.L[0], 0.0, 0.0);
                }
        
                // Hande out-of grid cases on y-axis
       t@@ -64,6 +64,8 @@ __device__ int findDistMod(int3* targetCell, Float3* distmod)
                // No periodic boundaries
            } else {
        
       +        // Don't modify targetCell or distmod.
       +
                // Hande out-of grid cases on x- and y-axes
                if (targetCell->x < 0 || targetCell->x >= devC_grid.num[0])
                    return -1;