tenabled 2d behavior if fixvel > 10 - 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 5d129366464784427904960a745de18f1ea89356
(DIR) parent e6024e9e3bc8ef33c96b2d38c7e23a62dc190e4d
(HTM) Author: Anders Damsgaard <anders.damsgaard@geo.au.dk>
Date: Wed, 18 Jun 2014 11:46:05 +0200
enabled 2d behavior if fixvel > 10
Diffstat:
M src/integration.cuh | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
---
(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.0001) {
+ if (vel.w > 0.0001 && vel.w < 10.0) {
acc.x = 0.0;
acc.y = 0.0;
t@@ -97,6 +97,14 @@ __global__ void integrate(Float4* dev_x_sorted, Float4* dev_vel_sorted, // Input
angacc = MAKE_FLOAT4(0.0, 0.0, 0.0, 0.0);
}
+ // 2d kinematic update by disabling linear acceleration along y and
+ // disabling angular acceleration by everything but y.
+ if (vel.w >= 10.0) {
+ acc.y = 0.0;
+ angacc.x = 0.0;
+ angacc.z = 0.0;
+ }
+
if (vel.w < -0.0001) {
acc.x = 0.0;
acc.y = 0.0;