← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-pkg/yade/git-trunk] Rev 4000: flipping periodic cell -> small/doc fix

 

------------------------------------------------------------
revno: 4000
committer: bchareyre <bruno.chareyre@xxxxxxxxxxxxxxx>
timestamp: Tue 2017-02-07 17:46:13 +0100
message:
  flipping periodic cell -> small/doc fix
modified:
  doc/sphinx/formulation.rst
  pkg/dem/Shop_01.cpp


--
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 'doc/sphinx/formulation.rst'
--- doc/sphinx/formulation.rst	2016-01-28 15:00:38 +0000
+++ doc/sphinx/formulation.rst	2017-02-07 16:46:13 +0000
@@ -777,7 +777,7 @@
 
 Deformations handling
 ---------------------
-The deformation of the cell over time is defined via a matrix representing the gradient of an homogeneous velocity field $\nabla \vec{v}$ (:yref:`Cell.velGrad`). This gradient represents arbitrary combinations of rotations and stretches. It can be imposed externaly or updated by :yref:`boundary controllers <BoundaryController>` (see :yref:`PeriTriaxController` or :yref:`Peri3dController`) in order to reach target strain values or to maintain some prescribed stress.
+The deformation of the cell over time is defined via a tensor representing the gradient of an homogeneous velocity field $\nabla \vec{v}$ (:yref:`Cell.velGrad`). This gradient represents arbitrary combinations of rotations and stretches. It can be imposed externaly or updated by :yref:`boundary controllers <BoundaryController>` (see :yref:`PeriTriaxController` or :yref:`Peri3dController`) in order to reach target strain values or to maintain some prescribed stress.
 
 The velocity gradient is integrated automatically over time, and the cumulated transformation is reflected in the transformation matrix $\mat{F}$ (:yref:`Cell.trsf`) and the current shape of the cell $\mat{H}$. The per-step transformation update reads (it is similar for $\mat{H}$), with $I$ the identity matrix:
 

=== modified file 'pkg/dem/Shop_01.cpp'
--- pkg/dem/Shop_01.cpp	2017-02-06 18:51:44 +0000
+++ pkg/dem/Shop_01.cpp	2017-02-07 16:46:13 +0000
@@ -70,7 +70,8 @@
 
  	// adjust Interaction::cellDist for interactions;
 	Matrix3r invFlip = (Matrix3r::Identity() + flipFloat).inverse();
-	FOREACH(const shared_ptr<Interaction>& i, *scene->interactions) i->cellDist = (invFlip*(i->cellDist.cast<Real>())).cast<int>();
+	// FIXME: is Matrix3i.cast<Real>().cast<int>() really preserving the integer numbers?? problem: there is no inverse() for Matrix3i, even though in this case the inverse _seems_ to be always an integer matrix
+	FOREACH(const shared_ptr<Interaction>& i, *scene->interactions) i->cellDist = invFlip.cast<int>()*i->cellDist;
 
 	// force reinitialization of the collider
 	bool colliderFound=false;