yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #06838
[Branch ~yade-dev/yade/trunk] Rev 2682: -Don't maintain refSize in setHsize, in hope that we will not drag it forever, as suggested in ht...
------------------------------------------------------------
revno: 2682
committer: Bruno Chareyre <bruno.chareyre@xxxxxxxxxxx>
branch nick: yade
timestamp: Wed 2011-01-26 19:32:34 +0100
message:
-Don't maintain refSize in setHsize, in hope that we will not drag it forever, as suggested in https://lists.launchpad.net/yade-dev/msg06836.html.
modified:
core/Cell.hpp
--
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 'core/Cell.hpp'
--- core/Cell.hpp 2011-01-24 08:21:29 +0000
+++ core/Cell.hpp 2011-01-26 18:32:34 +0000
@@ -92,7 +92,7 @@
// should be identical to: { refSize=s; hSize=invTrsf*hSize; for(int i=0;i<3;i++) hSize.col(i)=hSize.col(i).normalized()*refSize[i]; /* transform back*/ hSize=trsf*hSize; integrateAndUpdate(0); }
void setRefSize(const Vector3r& s){ for(int i=0;i<3;i++) hSize.col(i)*=s[i]/refSize[i]; refSize=s; integrateAndUpdate(0); }
Matrix3r getHSize() const { return hSize; }
- void setHSize(const Matrix3r& m){ hSize=m; for(int k=0;k<3;k++) refSize[k]=hSize.col(k).norm(); integrateAndUpdate(0);}
+ void setHSize(const Matrix3r& m){ hSize=m; integrateAndUpdate(0);}
Matrix3r getHSize0() const { return invTrsf*hSize; }
Matrix3r getTrsf() const { return trsf; }
void setTrsf(const Matrix3r& m){ hSize=m*invTrsf*hSize; trsf=m; integrateAndUpdate(0); }