yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #08286
[Branch ~yade-dev/yade/trunk] Rev 3014: Fixed SpherePack and _getMemoizeDb incompatibility with periodic boundary conditions
------------------------------------------------------------
revno: 3014
committer: Jan Stransky <_honzik@xxxxxxxxxx>
branch nick: yade
timestamp: Wed 2012-02-01 19:06:57 +0100
message:
Fixed SpherePack and _getMemoizeDb incompatibility with periodic boundary conditions
Corrected assert(Matrix3) in Math.hpp
modified:
lib/base/Math.hpp
pkg/dem/SpherePack.cpp
py/pack/pack.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 'lib/base/Math.hpp'
--- lib/base/Math.hpp 2012-01-31 18:21:29 +0000
+++ lib/base/Math.hpp 2012-02-01 18:06:57 +0000
@@ -161,7 +161,7 @@
template<typename MatrixT>
void matrixEigenDecomposition(const MatrixT& m, MatrixT& mRot, MatrixT& mDiag){
- assert(mRot); assert(mDiag);
+ //assert(mRot); assert(mDiag);
Eigen::SelfAdjointEigenSolver<MatrixT> a(m); mRot=a.eigenvectors(); mDiag=a.eigenvalues().asDiagonal();
}
=== modified file 'pkg/dem/SpherePack.cpp'
--- pkg/dem/SpherePack.cpp 2011-12-08 12:04:28 +0000
+++ pkg/dem/SpherePack.cpp 2012-02-01 18:06:57 +0000
@@ -79,7 +79,10 @@
if(!intSph) continue;
pack.push_back(Sph(b->state->pos,intSph->radius,(b->isClumpMember()?b->clumpId:-1)));
}
- if(scene->isPeriodic) { cellSize=scene->cell->getSize(); }
+ if(scene->isPeriodic) {
+ cellSize=scene->cell->getSize();
+ isPeriodic = true;
+ }
}
long SpherePack::makeCloud(Vector3r mn, Vector3r mx, Real rMean, Real rRelFuzz, int num, bool periodic, Real porosity, const vector<Real>& psdSizes, const vector<Real>& psdCumm, bool distributeMass, int seed, Matrix3r hSize){
=== modified file 'py/pack/pack.py'
--- py/pack/pack.py 2011-12-01 12:52:20 +0000
+++ py/pack/pack.py 2012-02-01 18:06:57 +0000
@@ -357,6 +357,7 @@
sp=SpherePack(cPickle.loads(str(c.fetchone()[0])))
sp.scale(scale);
if isPeri and wantPeri:
+ sp.isPeriodic = True
sp.cellSize=(X,Y,Z);
if fillPeriodic: sp.cellFill(Vector3(fullDim[0],fullDim[1],fullDim[2]));
#sp.cellSize=(0,0,0) # resetting cellSize avoids warning when rotating