yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #10637
[Branch ~yade-pkg/yade/git-trunk] Rev 3867: Proposal of correction of UniaxialStrainer, in relation with https://bugs.launchpad.net/yade/+bug...
------------------------------------------------------------
revno: 3867
committer: Jerome Duriez <jerome.duriez@xxxxxxxxxxxxxxx>
timestamp: Wed 2014-04-02 09:44:58 +0200
message:
Proposal of correction of UniaxialStrainer, in relation with https://bugs.launchpad.net/yade/+bug/1300167
modified:
pkg/dem/UniaxialStrainer.cpp
pkg/dem/UniaxialStrainer.hpp
--
lp:yade
https://code.launchpad.net/~yade-pkg/yade/git-trunk
Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to https://code.launchpad.net/~yade-pkg/yade/git-trunk/+edit-subscription
=== modified file 'pkg/dem/UniaxialStrainer.cpp'
--- pkg/dem/UniaxialStrainer.cpp 2010-11-07 11:46:20 +0000
+++ pkg/dem/UniaxialStrainer.cpp 2014-04-02 07:44:58 +0000
@@ -109,13 +109,15 @@
if(asymmetry!=1){
for(size_t i=0; i<negIds.size(); i++){
negCoords[i]-=dAX;
- axisCoord(negIds[i])=negCoords[i]; // update current position
+ //axisCoord(negIds[i])=negCoords[i]; // this line that modifies state->pos is useless with curent velocity defined below, and use of NewtonIntegrator
+ axisVel(negIds[i]) = -dAX/scene->dt; // update current position
}
}
if(asymmetry!=-1){
for(size_t i=0; i<posIds.size(); i++){
posCoords[i]+=dAX;
- axisCoord(posIds[i])=posCoords[i];
+ //axisCoord(posIds[i])=posCoords[i]; // idem
+ axisVel(posIds[i]) = dAX/scene->dt;
}
}
=== modified file 'pkg/dem/UniaxialStrainer.hpp'
--- pkg/dem/UniaxialStrainer.hpp 2014-03-27 14:52:07 +0000
+++ pkg/dem/UniaxialStrainer.hpp 2014-04-02 07:44:58 +0000
@@ -20,7 +20,8 @@
private:
bool needsInit;
void computeAxialForce();
- Real& axisCoord(Body::id_t id){ return Body::byId(id,scene)->state->pos[axis]; };
+ Real axisCoord(Body::id_t id){ return Body::byId(id,scene)->state->pos[axis]; };
+ Real& axisVel(Body::id_t id){ return Body::byId(id,scene)->state->vel[axis]; };
void init();
public:
virtual bool isActivated(){ return active; }