yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #02179
[Branch ~yade-dev/yade/trunk] Rev 1776: 1. Fix compilation on nfs (unable to delete .nfs* files)
------------------------------------------------------------
revno: 1776
committer: Václav Šmilauer <vaclav@falx>
branch nick: trunk
timestamp: Thu 2009-10-22 21:32:22 +0200
message:
1. Fix compilation on nfs (unable to delete .nfs* files)
2. remove debug message from the info socket
3. Make SpiralEngine assign velocities to (nondynamic) bodies so that when velocityBins are used, contacts are not missed.
modified:
SConstruct
gui/py/PythonTCPServer.py
pkg/common/Engine/DeusExMachina/RotationEngine.cpp
--
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 'SConstruct'
--- SConstruct 2009-10-21 15:22:14 +0000
+++ SConstruct 2009-10-22 19:32:22 +0000
@@ -578,7 +578,7 @@
for f in files:
ff=os.path.join(root,f)
# do not delete python-optimized files and symbolic links (lib_gts__python-module.so, for instance)
- if ff not in toInstall and not ff.endswith('.pyo') and not os.path.islink(ff):
+ if ff not in toInstall and not ff.endswith('.pyo') and not os.path.islink(ff) and not os.path.basename(ff).startswith('.nfs'):
print "Deleting extra plugin", ff
os.remove(ff)
=== modified file 'gui/py/PythonTCPServer.py'
--- gui/py/PythonTCPServer.py 2009-10-21 15:22:14 +0000
+++ gui/py/PythonTCPServer.py 2009-10-22 19:32:22 +0000
@@ -10,7 +10,6 @@
import pickle, os
O=Omega()
ret=dict(iter=O.iter,dt=O.dt,stopAtIter=O.stopAtIter,realtime=O.realtime,time=O.time,id=O.tags['id'] if O.tags.has_key('id') else None,threads=os.environ['OMP_NUM_THREADS'] if os.environ.has_key('OMP_NUM_THREADS') else '0',numBodies=len(O.bodies),numIntrs=len(O.interactions))
- print 'returning', ret
self.request.send(pickle.dumps(ret))
=== modified file 'pkg/common/Engine/DeusExMachina/RotationEngine.cpp'
--- pkg/common/Engine/DeusExMachina/RotationEngine.cpp 2009-08-03 10:02:11 +0000
+++ pkg/common/Engine/DeusExMachina/RotationEngine.cpp 2009-10-22 19:32:22 +0000
@@ -29,7 +29,7 @@
FOREACH(body_id_t id,subscribedBodies){
assert(id<(body_id_t)bodies->size());
Body* b=Body::byId(id,rb).get();
- ParticleParameters* rbp=YADE_CAST<RigidBodyParameters*>(b->physicalParameters.get());
+ RigidBodyParameters* rbp=YADE_CAST<RigidBodyParameters*>(b->physicalParameters.get());
assert(rbp);
// translation
rbp->se3.position+=dt*linearVelocity*axis;
@@ -37,6 +37,11 @@
rbp->se3.position=q*(rbp->se3.position-axisPt)+axisPt;
rbp->se3.orientation=q*rbp->se3.orientation;
rbp->se3.orientation.Normalize(); // to make sure
+ // bug: https://bugs.launchpad.net/yade/+bug/398089; since subscribed bodies are not dynamic (assumption), we have to set theri velocities here as well;
+ // otherwise, their displacement will be missed in NewtonsDampedLaw and when using velocityBins, they will have no influence;
+ // that can cause interactions to be missed, for example
+ rbp->velocity=linearVelocity*axis+angularVelocity*axis.Cross(rbp->se3.position-axisPt); // check this...
+ rbp->angularVelocity=angularVelocity*axis;
}
}