yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #06573
[Branch ~yade-dev/yade/trunk] Rev 2611: 1.Fix RotationEngine for new meaning non-dynamic bodies
------------------------------------------------------------
revno: 2611
committer: Sergei D. sj2001@xxxxxxxxx
branch nick: trunk_http
timestamp: Sun 2010-12-19 18:59:14 +0300
message:
1.Fix RotationEngine for new meaning non-dynamic bodies
2.Fix STLImporter
3.!!! Set aspherical=False for a facets. Need more consideration.
4.!!! blockedDOFs for leapfrogAsphericalRotate need more consideration.
modified:
pkg/common/RotationEngine.cpp
pkg/dem/NewtonIntegrator.cpp
py/utils.py
py/ymport.py
--
lp:yade
https://code.launchpad.net/~yade-dev/yade/trunk
Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to https://code.launchpad.net/~yade-dev/yade/trunk/+edit-subscription
=== modified file 'pkg/common/RotationEngine.cpp'
--- pkg/common/RotationEngine.cpp 2010-11-19 12:06:23 +0000
+++ pkg/common/RotationEngine.cpp 2010-12-19 15:59:14 +0000
@@ -61,13 +61,13 @@
b->state->angVel=rotationAxis*angularVelocity;
if(rotateAroundZero){
const Vector3r l=b->state->pos-zeroPoint;
- if (!b->isDynamic()) b->state->pos=q*l+zeroPoint;
+ //if (!b->isDynamic()) b->state->pos=q*l+zeroPoint;
b->state->vel=b->state->angVel.cross(l);
}
- if (!b->isDynamic()) {
- b->state->ori=q*b->state->ori;
- b->state->ori.normalize();
- }
+ //if (!b->isDynamic()) {
+ //b->state->ori=q*b->state->ori;
+ //b->state->ori.normalize();
+ //}
}
}
=== modified file 'pkg/dem/NewtonIntegrator.cpp'
--- pkg/dem/NewtonIntegrator.cpp 2010-12-13 13:31:57 +0000
+++ pkg/dem/NewtonIntegrator.cpp 2010-12-19 15:59:14 +0000
@@ -258,7 +258,7 @@
state->angMom+=dt*M; // global angular momentum at time n+1/2
const Vector3r l_b_half = A*state->angMom; // local angular momentum at time n+1/2
Vector3r angVel_b_half = l_b_half.cwise()/state->inertia; // local angular velocity at time n+1/2
- blockRotateDOFs( state->blockedDOFs, angVel_b_half );
+ //blockRotateDOFs( state->blockedDOFs, angVel_b_half ); // FIXME: angVel_b_half is the local velocity, but blockedDOFs need for the _global_ velocity.
const Quaternionr dotQ_half=DotQ(angVel_b_half,Q_half); // dQ/dt at time n+1/2
state->ori=state->ori+dt*dotQ_half; // Q at time n+1
state->angVel=state->ori*angVel_b_half; // global angular velocity at time n+1/2
=== modified file 'py/utils.py'
--- py/utils.py 2010-12-08 15:20:55 +0000
+++ py/utils.py 2010-12-19 15:59:14 +0000
@@ -285,7 +285,8 @@
_commonBodySetup(b,0,Vector3(0,0,0),material,noBound=noBound)
b.state.pos=b.state.refPos=center
b.dynamic=dynamic
- b.aspherical=True
+ #b.aspherical=True
+ b.aspherical=False # FIXME: is it reasonably for a facets?
b.mask=mask
return b
=== modified file 'py/ymport.py'
--- py/ymport.py 2010-10-26 13:41:30 +0000
+++ py/ymport.py 2010-12-19 15:59:14 +0000
@@ -68,13 +68,14 @@
imp = STLImporter()
facets=imp.ymport(file)
for b in facets:
- b.dynamic=dynamic
b.shape.color=color if color else utils.randomColor()
b.shape.wire=wire
b.shape.highlight=highlight
pos,ori=b.state.pos,b.state.ori
utils._commonBodySetup(b,0,Vector3(0,0,0),noBound=noBound,material=material)
b.state.pos,b.state.ori=pos,ori
+ b.aspherical=False # FIXME: is it reasonably for a facets?
+ b.dynamic=dynamic
return facets
def gts(meshfile,shift=(0,0,0),scale=1.0,**kw):
Follow ups