yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #07559
[Branch ~yade-dev/yade/trunk] Rev 2843: - Wrap Eigen function to get eigenvalues and eigenvectors of a Matrix3r in py
------------------------------------------------------------
revno: 2843
committer: Chiara Modenese <c.modenese@xxxxxxxxx>
branch nick: yade
timestamp: Thu 2011-04-28 11:13:29 +0000
message:
- Wrap Eigen function to get eigenvalues and eigenvectors of a Matrix3r in py
- Small fix in HM
modified:
pkg/dem/HertzMindlin.cpp
py/mathWrap/miniEigen.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 'pkg/dem/HertzMindlin.cpp'
--- pkg/dem/HertzMindlin.cpp 2011-04-05 17:19:20 +0000
+++ pkg/dem/HertzMindlin.cpp 2011-04-28 11:13:29 +0000
@@ -367,7 +367,7 @@
/********************/
/* MOHR-COULOMB law */
/********************/
-
+ phys->isSliding=false;
phys->shearViscous=Vector3r::Zero(); // reset so that during sliding, the previous values is not there
Fn = phys->normalForce.norm();
if (!includeAdhesion) {
=== modified file 'py/mathWrap/miniEigen.cpp'
--- py/mathWrap/miniEigen.cpp 2011-02-15 11:36:29 +0000
+++ py/mathWrap/miniEigen.cpp 2011-04-28 11:13:29 +0000
@@ -113,7 +113,7 @@
static bool Quaternionr__neq__(const Quaternionr& q1, const Quaternionr& q2){ return q1!=q2; }
#include<Eigen/SVD>
static bp::tuple Matrix3r_polarDecomposition(const Matrix3r& self){ Matrix3r unitary,positive; Matrix_computeUnitaryPositive(self,&unitary,&positive); return bp::make_tuple(unitary,positive); }
-
+static bp::tuple Matrix3r_eigenDecomposition(const Matrix3r& self){ Matrix3r rot,diag; matrixEigenDecomposition(self,rot,diag); return bp::make_tuple(rot,Vector3r(diag.diagonal())); }
#undef IDX_CHECK
@@ -209,6 +209,7 @@
.def("inverse",&Matrix3r_inverse)
.def("transpose",&Matrix3r_transpose)
.def("polarDecomposition",&Matrix3r_polarDecomposition)
+ .def("eigenDecomposition",&Matrix3r_eigenDecomposition)
.def("diagonal",&Matrix3r_diagonal)
.def("row",&Matrix3r_row)
.def("col",&Matrix3r_col)