[Yade-dev] Code import ~yade-pkg/yade/git-trunk status: Failed

2022-03-24 Thread noreply
Hello,

The import has been marked as failing.

This code import is from:
https://github.com/yade/trunk.git

-- 
https://code.launchpad.net/~yade-pkg/yade/git-trunk
You are receiving this email as you are subscribed to the branch.


___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


[Yade-dev] Code import ~yade-pkg/yade/git-trunk status: Failed

2017-06-16 Thread noreply
Hello,

The import has been marked as failing.

-- 
https://code.launchpad.net/~yade-pkg/yade/git-trunk
You are receiving this email as you are subscribed to the branch.

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 4041: Introduce a tolerance on overlap determination (in periodic BC only), avoiding false negative due...

2017-05-15 Thread noreply

revno: 4041
committer: bchareyre 
timestamp: Mon 2017-05-15 18:31:11 +0200
message:
  Introduce a tolerance on overlap determination (in periodic BC only), 
avoiding false negative due to round-off errors. (usage in a separate commit).
modified:
  pkg/common/InsertionSortCollider.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/common/InsertionSortCollider.hpp'
--- pkg/common/InsertionSortCollider.hpp	2016-06-13 07:37:27 +
+++ pkg/common/InsertionSortCollider.hpp	2017-05-15 16:31:11 +
@@ -197,6 +197,7 @@
 		((bool,allowBiggerThanPeriod,false,,"If true, tests on bodies sizes will be disabled, and the simulation will run normaly even if bodies larger than period are found. It can be useful when the periodic problem include e.g. a floor modelized with wall/box/facet.\nBe sure you know what you are doing if you touch this flag. The result is undefined if one large body moves out of the (0,0,0) period."))
 		((bool,sortThenCollide,false,,"Separate sorting and colliding phase; it is MUCH slower, but all interactions are processed at every step; this effectively makes the collider non-persistent, not remembering last state. (The default behavior relies on the fact that inversions during insertion sort are overlaps of bounding boxes that just started/ceased to exist, and only processes those; this makes the collider much more efficient.)"))
 		((int,targetInterv,50,,"(experimental) Target number of iterations between bound update, used to define a smaller sweep distance for slower grains if >0, else always use 1*verletDist. Useful in simulations with strong velocity contrasts between slow bodies and fast bodies."))
+		((Real,overlapTolerance,1e-7,,"Tolerance on determining overlap. In rare cases different parts of the code can inconsistently lead to different results in terms of overlap, with false negative by spatialOverlapPeri possibly leading to nasty bugs in contact detection (false positive are harmless). This tolerance is to avoid false negative, the value can be understood as relative to 1 (i.e. independent of particle size or any other reference length). The default should be ok."))
 		((Real,updatingDispFactor,-1,,"(experimental) Displacement factor used to trigger bound update: the bound is updated only if updatingDispFactor*disp>sweepDist when >0, else all bounds are updated."))
 		((Real,verletDist,((void)"Automatically initialized",-.5),,"Length by which to enlarge particle bounds, to avoid running collider at every step. Stride disabled if zero. Negative value will trigger automatic computation, so that the real value will be *verletDist* × minimum spherical particle radius; if there are no spherical particles, it will be disabled. The actual length added to one bound can be only a fraction of verletDist when :yref:`InsertionSortCollider::targetInterv` is > 0."))
 		((Real,minSweepDistFactor,0.1,,"Minimal distance by which enlarge all bounding boxes; superseeds computed value of verletDist when lower that (minSweepDistFactor x verletDist)."))

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 4043: Keep the values of sorted bounds in the [0, size] range in ISCollider.

2017-05-15 Thread noreply

revno: 4043
committer: bchareyre 
timestamp: Mon 2017-05-15 18:31:11 +0200
message:
  Keep the values of sorted bounds in the [0,size] range in ISCollider.
modified:
  pkg/common/InsertionSortCollider.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 'pkg/common/InsertionSortCollider.cpp'
--- pkg/common/InsertionSortCollider.cpp	2017-05-15 16:31:11 +
+++ pkg/common/InsertionSortCollider.cpp	2017-05-15 16:31:11 +
@@ -455,6 +455,8 @@
 		}
 		v[v.norm(j+1)]=vi;
 	}
+	//Keep coord's in [0,cellDim] by clamping the largest values
+	for(long i=v.norm(loIdx-1); v[i].coord > v.cellDim; i= v.norm(--i)) {v[i].period+=1; v[i].coord-=v.cellDim; loIdx=i;}
 }
 
 // called by the insertion sort if 2 bodies swapped their bounds

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 4042: A simpler and faster version of spatialOverlapPeri. Only one call to floor(), ~20% speedup for IS...

2017-05-15 Thread noreply

revno: 4042
committer: bchareyre 
timestamp: Mon 2017-05-15 18:31:11 +0200
message:
  A simpler and faster version of spatialOverlapPeri. Only one call to floor(), 
~20% speedup for ISCollider::action.  Tolerance introduced to fix detection 
failures.
modified:
  pkg/common/InsertionSortCollider.cpp
  pkg/common/InsertionSortCollider.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/common/InsertionSortCollider.cpp'
--- pkg/common/InsertionSortCollider.cpp	2017-04-14 10:35:41 +
+++ pkg/common/InsertionSortCollider.cpp	2017-05-15 16:31:11 +
@@ -227,7 +227,9 @@
 
 		// update periodicity
 		assert(BB[0].axis==0); assert(BB[1].axis==1); assert(BB[2].axis==2);
-		if(periodic) for(int i=0; i<3; i++) BB[i].updatePeriodicity(scene);
+		if(periodic)  {
+			for(int i=0; i<3; i++) BB[i].updatePeriodicity(scene);
+			invSizes=Vector3r(1./scene->cell->getSize()[0],1./scene->cell->getSize()[1],1./scene->cell->getSize()[2]);}
 
 		if(verletDist<0){
 			Real minR=std::numeric_limits::infinity();
@@ -475,10 +477,6 @@
 	periodicity information; both values could be passed down as a parameters, avoiding 1 of 3 loops here.
 	We do some floats math here, so the speedup could noticeable; doesn't concertn the non-periodic variant,
 	where it is only plain comparisons taking place.
-
-	In the same way, handleBoundInversion is passed only id1 and id2, but again insertionSort already knows in which sense
-	the inversion happens; if the boundaries get apart (min getting up over max), it wouldn't have to check for overlap
-	at all, for instance.
 */
 //! return true if bodies bb overlap in all 3 dimensions
 bool InsertionSortCollider::spatialOverlapPeri(Body::id_t id1, Body::id_t id2,Scene* scene, Vector3i& periods) const {
@@ -489,31 +487,24 @@
 		// LOG_DEBUG("dim["<max, and with +1 shift for id1->min so that body1's bounds cover an interval [shiftedMin; 1] at the end of a b1-centric period 
+		Real lmin = (minima[3*id2+axis]-maxima[3*id1+axis])*invSizes[axis];
+		Real lmax = (maxima[3*id2+axis]-maxima[3*id1+axis])*invSizes[axis];
+		Real shiftedMin = (minima[3*id1+axis]-maxima[3*id1+axis])*invSizes[axis]+1.;
+		if((lmax-lmin)>1 || shiftedMin<0){
+			if (allowBiggerThanPeriod) {periods[axis]=0; continue;}
+			else {
+LOG_FATAL("Body #"<<((lmax-lmin)>1?id2:id1)<<" spans over half of the cell size "<= mn2)) return false;}
+		}
+		int period1 = floor(lmax); 
+		//overlap around zero, on the "+" side
+		if ((lmin-period1) <= overlapTolerance) {periods[axis]=-period1; continue;}
+		 //overlap around 1, on the "-" side
+		if ((lmax-period1+overlapTolerance) >= shiftedMin) {periods[axis]=-period1-1; continue;}
+		// none of the above, exit
+		return false;
 	}
 	return true;
 }

=== modified file 'pkg/common/InsertionSortCollider.hpp'
--- pkg/common/InsertionSortCollider.hpp	2017-05-15 16:31:11 +
+++ pkg/common/InsertionSortCollider.hpp	2017-05-15 16:31:11 +
@@ -130,7 +130,8 @@
 	std::vector maxima, minima;
 	//! 

[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 4040: update of the JCFPM particle model with new or adapted functionalities to record number of cracks...

2017-05-11 Thread noreply

revno: 4040
committer: luc scholtes 
timestamp: Thu 2017-05-11 13:42:34 +0200
message:
  update of the JCFPM particle model with new or adapted functionalities to 
record number of cracks and associated released energy. An example script will 
be provided.
modified:
  pkg/dem/JointedCohesiveFrictionalPM.cpp
  pkg/dem/JointedCohesiveFrictionalPM.hpp
  pkg/dem/VTKRecorder.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 'pkg/dem/JointedCohesiveFrictionalPM.cpp'
--- pkg/dem/JointedCohesiveFrictionalPM.cpp	2014-11-05 15:08:12 +
+++ pkg/dem/JointedCohesiveFrictionalPM.cpp	2017-05-11 11:42:34 +
@@ -27,7 +27,7 @@
 	/// Defines the interparticular distance used for computation
 	Real D = 0;
 
-	/*this is for setting the equilibrium distance between all cohesive elements in the first contact detection*/
+	/*this is for setting the equilibrium distance between all cohesive elements at the first contact detection*/
 	if ( contact->isFresh(scene) ) { 
 	  phys->normalForce = Vector3r::Zero(); 
 	  phys->shearForce = Vector3r::Zero();
@@ -49,7 +49,7 @@
 	  phys->isCohesive =0;
 	  phys->FnMax = 0;
 	  phys->FsMax = 0;
-	  return true; // do we need this? -> yes if it ends the loop (avoid the following calculations)
+	  return true;
 	  }
 	  } else { 
 	D = phys->initD - std::abs((b1->state->pos - b2->state->pos).dot(phys->jointNormal)); 
@@ -70,29 +70,34 @@
 	  phys->isCohesive =0;
 	  phys->FnMax = 0;
 	  phys->FsMax = 0;
-	  return true; // do we need this? not sure -> yes, it ends the loop (avoid the following calculations)
+	  return true;
 	}
 	  }
 	  
 	  if ( phys->isCohesive && (phys->FnMax>0) && (std::abs(D)>Dtensile) ) {
 	
-	// update body state with the number of broken bonds
+	nbTensCracks++;
+// update body state with the number of broken bonds -> do we really need that?
 	JCFpmState* st1=dynamic_cast(b1->state.get());
 	JCFpmState* st2=dynamic_cast(b2->state.get());
-	st1->tensBreak+=1;
-	st2->tensBreak+=1;
-	st1->tensBreakRel+=1.0/st1->noIniLinks;
-	st2->tensBreakRel+=1.0/st2->noIniLinks;
+st1->nbBrokenBonds++;
+	st2->nbBrokenBonds++;
+	st1->damageIndex+=1.0/st1->nbInitBonds;
+	st2->damageIndex+=1.0/st2->nbInitBonds;
+
+Real scalarNF=phys->normalForce.norm();
+	Real scalarSF=phys->shearForce.norm();
+	totalTensCracksE+=0.5*( ((scalarNF*scalarNF)/phys->kn) + ((scalarSF*scalarSF)/phys->ks) );
 	
-	// create a text file to record properties of the broken bond (iteration, position, type (tensile), cross section and contact normal orientation)
 	if (recordCracks){
 	  std::ofstream file (fileCracks.c_str(), !cracksFileExist ? std::ios::trunc : std::ios::app);
-	  if(file.tellp()==0){ file <<"i p0 p1 p2 t s norm0 norm1 norm2"<isOnJoint)) { crackNormal=phys->jointNormal; } else {crackNormal=geom->normal;}
-	  file << boost::lexical_cast ( scene->iter )<<" "<< boost::lexical_cast ( geom->contactPoint[0] ) <<" "<< boost::lexical_cast ( geom->contactPoint[1] ) <<" "<< boost::lexical_cast ( geom->contactPoint[2] ) <<" "<< 0 <<" "<< boost::lexical_cast ( 0.5*(geom->radius1+geom->radius2) ) <<" "<< boost::lexical_cast ( crackNormal[0] ) <<" "<< boost::lexical_cast ( crackNormal[1] ) <<" "<< boost::lexical_cast ( crackNormal[2] ) << endl;
+	  file << boost::lexical_cast ( scene->iter ) << " " << boost::lexical_cast ( scene->time ) <<" "<< boost::lexical_cast ( geom->contactPoint[0] ) <<" "<< boost::lexical_cast ( geom->contactPoint[1] ) <<" "<< boost::lexical_cast ( geom->contactPoint[2] ) <<" "<< 1 <<" "<< boost::lexical_cast ( 0.5*(geom->radius1+geom->radius2) ) <<" "<< boost::lexical_cast ( crackNormal[0] ) <<" "<< boost::lexical_cast ( crackNormal[1] ) <<" "<< boost::lexical_cast ( crackNormal[2] ) <<" "<< boost::lexical_cast ( 0.5*( ((scalarNF*scalarNF)/phys->kn) + ((scalarSF*scalarSF)/phys->ks) ) ) <FnMax = 0;
 	  phys->FsMax = 0;
 	  phys->isBroken = true;
-	  return true; // do we need this? not sure -> yes, it ends the loop (avoid the following calculations)
+	  return true;
 	}
-// 	return true; // do we need this? no
 	  }
 	}
 	
@@ -145,42 +149,60 @@
 	  else
 	shearForce=Vector3r::Zero();
 	  if ((smoothJoint) && 

[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 4039: Fix typo in installation.rst doc.

2017-05-09 Thread noreply

revno: 4039
author: Francois Kneib 
committer: GitHub 
timestamp: Tue 2017-05-09 11:22:33 +0200
message:
  Fix typo in installation.rst doc.
modified:
  doc/sphinx/installation.rst


--
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/installation.rst'
--- doc/sphinx/installation.rst	2017-02-28 20:56:41 +
+++ doc/sphinx/installation.rst	2017-05-09 09:22:33 +
@@ -144,7 +144,7 @@
 		libboost-all-dev fakeroot dpkg-dev build-essential g++ \
 		python-dev ipython python-matplotlib libsqlite3-dev python-numpy python-tk gnuplot \
 		libgts-dev python-pygraphviz libvtk6-dev python-numpy libeigen3-dev \
-		python-xlib python-pyqt5 pyqt5-dev-tools python-pyqt5.qtwebkit gtk2-engines-pixbuf python-argparse python-pyqt5.qtsvg\
+		python-xlib python-pyqt5 pyqt5-dev-tools python-pyqt5.qtwebkit gtk2-engines-pixbuf python-argparse python-pyqt5.qtsvg \
 		libqglviewer-dev python-imaging libjs-jquery python-sphinx python-git python-bibtex \
 		libxmu-dev libxi-dev libcgal-dev help2man libbz2-dev zlib1g-dev python-minieigen
 		

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 4038: fixed inheritence problem when LINSOLV=OFF

2017-05-02 Thread noreply

revno: 4038
committer: robcaulk 
timestamp: Tue 2017-05-02 13:26:05 -0700
message:
  fixed inheritence problem when LINSOLV=OFF
modified:
  lib/triangulation/FlowBoundingSphere.hpp
  lib/triangulation/FlowBoundingSphereLinSolv.hpp
  lib/triangulation/PeriodicFlowLinSolv.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 'lib/triangulation/FlowBoundingSphere.hpp'
--- lib/triangulation/FlowBoundingSphere.hpp	2017-03-10 11:09:31 +
+++ lib/triangulation/FlowBoundingSphere.hpp	2017-05-02 20:26:05 +
@@ -45,6 +45,7 @@
 		bool computedOnce;//flag for checking if current triangulation has been computed at least once
 		bool pressureChanged;//are imposed pressures modified (on python side)? When it happens, we have to reApplyBoundaryConditions
 		int errorCode;
+		bool factorizeOnly;
 		
 		//Handling imposed pressures/fluxes on elements in the form of {point,value} pairs, IPCells contains the cell handles corresponding to point
 		vector > imposedP;

=== modified file 'lib/triangulation/FlowBoundingSphereLinSolv.hpp'
--- lib/triangulation/FlowBoundingSphereLinSolv.hpp	2017-05-02 16:03:45 +
+++ lib/triangulation/FlowBoundingSphereLinSolv.hpp	2017-05-02 20:26:05 +
@@ -54,6 +54,7 @@
 	using FlowType::resetNetwork;
 	using FlowType::tesselation;
 	using FlowType::resetRHS;
+	using FlowType::factorizeOnly;  // used for backgroundAction()
 
 	//! TAUCS DECs
 	vector orderedCells;
@@ -61,7 +62,6 @@
 	bool isFullLinearSystemGSSet;
 	bool areCellsOrdered;//true when orderedCells is filled, turn it false after retriangulation
 	bool updatedRHS;
-	bool factorizeOnly;  // used for backgroundAction()
 	
 	#ifdef EIGENSPARSE_LIB
 	//Eigen's sparse matrix and solver

=== modified file 'lib/triangulation/PeriodicFlowLinSolv.hpp'
--- lib/triangulation/PeriodicFlowLinSolv.hpp	2014-10-29 16:49:20 +
+++ lib/triangulation/PeriodicFlowLinSolv.hpp	2017-05-02 20:26:05 +
@@ -28,7 +28,7 @@
 	//same for functions
 	using _N::defineFictiousCells; using _N::addBoundingPlanes; using _N::boundary;
 	
-	using BaseFlowSolver::noCache; using BaseFlowSolver::rAverage; using BaseFlowSolver::distanceCorrection; using BaseFlowSolver::minPermLength; using BaseFlowSolver::checkSphereFacetOverlap; using BaseFlowSolver::viscosity; using BaseFlowSolver::kFactor; using BaseFlowSolver::permeabilityMap; using BaseFlowSolver::maxKdivKmean; using BaseFlowSolver::clampKValues; using BaseFlowSolver::KOptFactor; using BaseFlowSolver::meanKStat; using BaseFlowSolver::fluidBulkModulus; using BaseFlowSolver::relax; using BaseFlowSolver::tolerance; using BaseFlowSolver::minKdivKmean; using BaseFlowSolver::resetRHS;
+	using BaseFlowSolver::noCache; using BaseFlowSolver::rAverage; using BaseFlowSolver::distanceCorrection; using BaseFlowSolver::minPermLength; using BaseFlowSolver::checkSphereFacetOverlap; using BaseFlowSolver::viscosity; using BaseFlowSolver::kFactor; using BaseFlowSolver::permeabilityMap; using BaseFlowSolver::maxKdivKmean; using BaseFlowSolver::clampKValues; using BaseFlowSolver::KOptFactor; using BaseFlowSolver::meanKStat; using BaseFlowSolver::fluidBulkModulus; using BaseFlowSolver::relax; using BaseFlowSolver::tolerance; using BaseFlowSolver::minKdivKmean; using BaseFlowSolver::resetRHS; using BaseFlowSolver::factorizeOnly;
 	/// More members from LinSolv variant
 	using BaseFlowSolver::areCellsOrdered; using BaseFlowSolver::T_nnz; using BaseFlowSolver::ncols; using BaseFlowSolver::T_cells; using BaseFlowSolver::T_index; using BaseFlowSolver::orderedCells; using BaseFlowSolver::isLinearSystemSet; using BaseFlowSolver::T_x; using BaseFlowSolver::T_b; using BaseFlowSolver::T_bv; using BaseFlowSolver::bodv; using BaseFlowSolver::xodv; using BaseFlowSolver::errorCode; using BaseFlowSolver::useSolver; using BaseFlowSolver::tripletList; using BaseFlowSolver::A; using BaseFlowSolver::gsP; using BaseFlowSolver::gsB; using BaseFlowSolver::fullAcolumns; using BaseFlowSolver::fullAvalues; using BaseFlowSolver::isFullLinearSystemGSSet; using BaseFlowSolver::gsdV;
 	

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 4037: Fixed bug with multithread+compressible flow and addressed backgroundAction() FIXME for eigenSolve()

2017-05-02 Thread noreply

revno: 4037
committer: robcaulk 
timestamp: Tue 2017-05-02 09:03:45 -0700
message:
  Fixed bug with multithread+compressible flow and addressed backgroundAction() 
FIXME for eigenSolve()
modified:
  lib/triangulation/FlowBoundingSphereLinSolv.hpp
  lib/triangulation/FlowBoundingSphereLinSolv.ipp
  pkg/pfv/FlowEngine.ipp.in


--
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 'lib/triangulation/FlowBoundingSphereLinSolv.hpp'
--- lib/triangulation/FlowBoundingSphereLinSolv.hpp	2014-10-29 16:49:20 +
+++ lib/triangulation/FlowBoundingSphereLinSolv.hpp	2017-05-02 16:03:45 +
@@ -61,6 +61,7 @@
 	bool isFullLinearSystemGSSet;
 	bool areCellsOrdered;//true when orderedCells is filled, turn it false after retriangulation
 	bool updatedRHS;
+	bool factorizeOnly;  // used for backgroundAction()
 	
 	#ifdef EIGENSPARSE_LIB
 	//Eigen's sparse matrix and solver

=== modified file 'lib/triangulation/FlowBoundingSphereLinSolv.ipp'
--- lib/triangulation/FlowBoundingSphereLinSolv.ipp	2016-11-16 09:53:52 +
+++ lib/triangulation/FlowBoundingSphereLinSolv.ipp	2017-05-02 16:03:45 +
@@ -527,10 +527,13 @@
 		}
 		factorizedEigenSolver = true;
 	}
-	openblas_set_num_threads(numSolveThreads);
-	ex = eSolver.solve(eb);
-	for (int k=0; kfactorizeOnly = true;
 	backgroundSolver->gaussSeidel(scene->dt);
-	//FIXME(2): and here we need only cached variables, not forces
+	backgroundSolver->factorizeOnly = false;
+	//FIXME(2): and here we need only cached variables, not forces <- this appears to be fixed already inside computeFacetForcesWithCache
 	backgroundSolver->computeFacetForcesWithCache(/*onlyCache?*/ true);
 // 	boost::this_thread::sleep(boost::posix_time::seconds(5));
  	backgroundCompleted = true;
@@ -279,6 +280,7 @@
 
 boundaryConditions ( flow );
 flow.initializePressure ( pZero );
+	if (multithread && fluidBulkModulus>0) initializeVolumes(flow);  // needed for multithreaded compressible flow (https://bugs.launchpad.net/yade/+bug/1687355)
 	
 if ( !first && !multithread && (useSolver==0 || fluidBulkModulus>0 || doInterpolate)) flow.interpolate ( flow.T[!flow.currentTes], flow.tesselation() );
 if ( waveAction ) flow.applySinusoidalPressure ( flow.tesselation().Triangulation(), sineMagnitude, sineAverage, 30 );

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 4036: fix feature NewtonIntegrator::densityScaling

2017-04-25 Thread noreply

revno: 4036
committer: bchareyre 
timestamp: Tue 2017-04-25 19:18:59 +0200
message:
  fix feature NewtonIntegrator::densityScaling
modified:
  examples/timeStepperUsage.py
  pkg/dem/GlobalStiffnessTimeStepper.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 'examples/timeStepperUsage.py'
--- examples/timeStepperUsage.py	2014-01-23 18:08:34 +
+++ examples/timeStepperUsage.py	2017-04-25 17:18:59 +
@@ -26,8 +26,8 @@
 		[Ip2_FrictMat_FrictMat_FrictPhys()],
 		[Law2_ScGeom_FrictPhys_CundallStrack()]
 	),
-	GlobalStiffnessTimeStepper(label='ts'),
-	PeriTriaxController(dynCell=True,mass=0.2,maxUnbalanced=0.001, relStressTol=0.01,goal=(-1e4,-1e4,0),stressMask=3,globUpdate=5, maxStrainRate=(10.,10.,10.),doneHook='triaxDone()',label='triax'),
+	GlobalStiffnessTimeStepper(timeStepUpdateInterval=10,label='ts'),
+	PeriTriaxController(dynCell=True,mass=0.2,maxUnbalanced=0.01, relStressTol=0.01,goal=(-1e4,-1e4,0),stressMask=3,globUpdate=5, maxStrainRate=(10.,10.,10.),doneHook='triaxDone()',label='triax'),
 	NewtonIntegrator(damping=.2,label="newton"),
 ]
 
@@ -69,51 +69,51 @@
 #We force dt=1. The inertia of bodies will adjusted automatically...
 newton.densityScaling=True
 #... but not that of cell, hence we have to adjust it or the problem becomes unstable
-triax.mass=triax.mass*(1e4)**2
+triax.mass /= (0.8*PWaveTimeStep())**2
+triax.maxStrainRate *= 0.8*PWaveTimeStep()
 O.run(100,True);
 print ""
 print "dt dynamicaly set with GlobalStiffness timesteper + density scaling:"
 print ""
 timing.stats()
 
-
 #_ TYPICAL RESULTS (n=1000)
-
 #
 #Fixed dt = 0.8 * PWave timestep:
 #
 #NameCount TimeRel. time
 #---
-#ForceResetter 77246 326813us0.24%
-#InsertionSortCollider 23571   29447986us   21.73%
-#InteractionLoop   77246   65954607us   48.67%
+#ForceResetter 58166 455809us0.82%
+#InsertionSortCollider 23641   1093us   31.92%
+#InteractionLoop   58166   21812997us   39.17%
 #"ts"  0  0us0.00%
-#"triax"   77246   11876934us8.76%
-#"newton"  77246   27914757us   20.60%
-#TOTAL135521099us  100.00%
+#"triax"   581664329739us7.77%
+#"newton"  58166   11314162us   20.32%
+#TOTAL 55689802us  100.00%
 
 #--
 #dt dynamicaly set with GlobalStiffness timesteper:
 #--
 #NameCount TimeRel. time
 #---
-#ForceResetter 45666 193813us0.23%
-#InsertionSortCollider  67279456709us   11.09%
-#InteractionLoop   45666   44245384us   51.87%
-#"ts"  456666267682us7.35%
-#"triax"   456668234896us9.65%
-#"newton"  45666   16906118us   19.82%
-#TOTAL 85304605us  100.00%
+#ForceResetter 37471 296255us0.82%
+#InsertionSortCollider  65895608966us   15.57%
+#InteractionLoop   37471   18167532us   50.44%

[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 4035: fixed a typo in micro-stress example

2017-04-18 Thread noreply

revno: 4035
committer: Jan Stránský 
timestamp: Tue 2017-04-18 09:47:14 +0200
message:
  fixed a typo in micro-stress example
  
  question #622071
modified:
  doc/sphinx/user.rst


--
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/user.rst'
--- doc/sphinx/user.rst	2016-11-08 16:18:55 +
+++ doc/sphinx/user.rst	2017-04-18 07:47:14 +
@@ -1577,7 +1577,7 @@
 	TW=TesselationWrapper()
 	TW.computeVolumes()
 	s=bodyStressTensors()
-	stress = s[b.id]**4.*pi/3.*b.shape.radius**3/TW.volume(b.id)
+	stress = s[b.id]*4.*pi/3.*b.shape.radius**3/TW.volume(b.id)
 
 As any other value, the stress can be exported to a vtk file for display in Paraview using :yref:`yade.export.VTKExporter`.
 

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 4034: Minors & cosmetic.

2017-04-14 Thread noreply

revno: 4034
committer: bchareyre 
timestamp: Fri 2017-04-14 12:35:41 +0200
message:
  Minors & cosmetic.
modified:
  pkg/common/InsertionSortCollider.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 'pkg/common/InsertionSortCollider.cpp'
--- pkg/common/InsertionSortCollider.cpp	2017-04-14 10:04:32 +
+++ pkg/common/InsertionSortCollider.cpp	2017-04-14 10:35:41 +
@@ -376,13 +376,11 @@
 for(long i=0; i<2*nBodies; i++){
 	if(!(V[i].flags.isMin && V[i].flags.hasBB)) continue;
 	const Body::id_t& iid=V[i].id;
-	long cnt=0;
 	// we might wrap over the periodic boundary here; that's why the condition is different from the aperiodic case
 	for(long j=V.norm(i+1); V[j].id!=iid; j=V.norm(j+1)){
 		const Body::id_t& jid=V[j].id;
 		if(!(V[j].flags.isMin && V[j].flags.hasBB)) continue;
 		handleBoundInversionPeri(iid,jid,interactions,scene);
-		if(cnt++>2*(long)nBodies){ LOG_FATAL("Uninterrupted loop in the initial sort?"); throw std::logic_error("loop??"); }
 	}
 }
 			}
@@ -411,8 +409,7 @@
 	assert(periodic);
 	long =v.loIdx; const long =v.size;
 	/* We have to visit each bound at least once (first condition), but this is not enough. The correct ordering in the begining of the list needs a second pass to connect begin and end consistently (the second condition). Strictly the second condition should include "+ (v.norm(j+1)==loIdx ? v.cellDim : 0)" but it is ok as is since the shift is added inside the loop. */
-	long _i=0;
-	for(; (_i

[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 4033: Critical bugfix for collision detection in periodic boundary conditions. Bounds lists were left p...

2017-04-14 Thread noreply

revno: 4033
committer: bchareyre 
timestamp: Fri 2017-04-14 12:04:32 +0200
message:
  Critical bugfix for collision detection in periodic boundary conditions. 
Bounds lists were left partially unordered,  then some interactions were never 
detected (my toughest yade debugging until now).
modified:
  pkg/common/InsertionSortCollider.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 'pkg/common/InsertionSortCollider.cpp'
--- pkg/common/InsertionSortCollider.cpp	2017-04-13 11:56:42 +
+++ pkg/common/InsertionSortCollider.cpp	2017-04-14 10:04:32 +
@@ -410,8 +410,10 @@
 void InsertionSortCollider::insertionSortPeri(VecBounds& v, InteractionContainer* interactions, Scene*, bool doCollide){
 	assert(periodic);
 	long =v.loIdx; const long =v.size;
-	for(long _i=0; _i

[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 4032: Minor changes in authorship and inline comments

2017-04-14 Thread noreply

revno: 4032
committer: bchareyre 
timestamp: Thu 2017-04-13 13:56:42 +0200
message:
  Minor changes in authorship and inline comments
modified:
  pkg/common/ForceEngine.cpp
  pkg/common/HydroForceEngine.cpp
  pkg/common/InsertionSortCollider.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 'pkg/common/ForceEngine.cpp'
--- pkg/common/ForceEngine.cpp	2017-04-05 17:18:06 +
+++ pkg/common/ForceEngine.cpp	2017-04-13 11:56:42 +
@@ -1,6 +1,5 @@
 // 2004 © Janek Kozicki  
 // 2009 © Václav Šmilauer  
-// 2014 © Raphael Maurin  
 
 #include"ForceEngine.hpp"
 #include

=== modified file 'pkg/common/HydroForceEngine.cpp'
--- pkg/common/HydroForceEngine.cpp	2017-04-05 17:18:06 +
+++ pkg/common/HydroForceEngine.cpp	2017-04-13 11:56:42 +
@@ -1,5 +1,3 @@
-// 2004 © Janek Kozicki  
-// 2009 © Václav Šmilauer  
 // 2014 © Raphael Maurin  
 
 #include"HydroForceEngine.hpp"

=== modified file 'pkg/common/InsertionSortCollider.cpp'
--- pkg/common/InsertionSortCollider.cpp	2016-08-24 16:28:27 +
+++ pkg/common/InsertionSortCollider.cpp	2017-04-13 11:56:42 +
@@ -404,6 +404,9 @@
 	return (xNorm-floor(xNorm))*(x1-x0);
 }
 
+//NOTE: possible improvements:
+// 1) (not only periodic) keep a mask defining overlaps in directions 1,2,3, and compare the sum instead of checking overlap in three directions everytime there is an inversion. (maybe not possible? does it need a N² table?!!)
+// 2) use norm() only when needed (first and last elements, mainly, can be treated as special cases)
 void InsertionSortCollider::insertionSortPeri(VecBounds& v, InteractionContainer* interactions, Scene*, bool doCollide){
 	assert(periodic);
 	long =v.loIdx; const long =v.size;

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 4031: move HydroForceEngine to independent source files.

2017-04-05 Thread noreply

revno: 4031
committer: bchareyre 
timestamp: Wed 2017-04-05 19:18:06 +0200
message:
  move HydroForceEngine to independent source files.
added:
  pkg/common/HydroForceEngine.cpp
  pkg/common/HydroForceEngine.hpp
modified:
  pkg/common/ForceEngine.cpp
  pkg/common/ForceEngine.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/common/ForceEngine.cpp'
--- pkg/common/ForceEngine.cpp	2017-04-05 17:18:06 +
+++ pkg/common/ForceEngine.cpp	2017-04-05 17:18:06 +
@@ -15,7 +15,7 @@
 #include 
 #include 
 
-YADE_PLUGIN((ForceEngine)(InterpolatingDirectedForceEngine)(RadialForceEngine)(DragEngine)(LinearDragEngine)(HydroForceEngine));
+YADE_PLUGIN((ForceEngine)(InterpolatingDirectedForceEngine)(RadialForceEngine)(DragEngine)(LinearDragEngine));
 
 void ForceEngine::action(){
 	FOREACH(Body::id_t id, ids){
@@ -81,737 +81,3 @@
 		}
 	}
 }
-
-
-void HydroForceEngine::action(){
-	/* Application of hydrodynamical forces */
-	if (activateAverage==true) averageProfile(); //Calculate the average solid profiles
-
-	FOREACH(Body::id_t id, ids){
-		Body* b=Body::byId(id,scene).get();
-		if (!b) continue;
-		if (!(scene->bodies->exists(id))) continue;
-		const Sphere* sphere = dynamic_cast(b->shape.get());
-		if (sphere){
-			Vector3r posSphere = b->state->pos;//position vector of the sphere
-			int p = floor((posSphere[2]-zRef)/deltaZ); //cell number in which the particle is
-			if ((p=0)) {
-Vector3r liftForce = Vector3r::Zero();
-Vector3r dragForce = Vector3r::Zero();
-Vector3r convAccForce = Vector3r::Zero();
-//deterministic version
-// Vector3r vRel = Vector3r(vxFluid[p],0,0) -  b->state->vel;//fluid-particle relative velocity
-Vector3r vRel = Vector3r(vxFluid[p]+vFluctX[id],vFluctY[id],vFluctZ[id]) -  b->state->vel;//fluid-particle relative velocity
-//Drag force calculation
-if (vRel.norm()!=0.0) {
-	dragForce = 0.5*densFluid*Mathr::PI*pow(sphere->radius,2.0)*(0.44*vRel.norm()+24.4*viscoDyn/(densFluid*sphere->radius*2))*pow(1-phiPart[p],-expoRZ)*vRel;
-}
-//lift force calculation due to difference of fluid pressure between top and bottom of the particle
-int intRadius = floor(sphere->radius/deltaZ);
-if ((p+intRadius0)&&(lift==true)) {
-	Real vRelTop = vxFluid[p+intRadius] -  b->state->vel[0]; // relative velocity of the fluid wrt the particle at the top of the particle
-	Real vRelBottom = vxFluid[p-intRadius] -  b->state->vel[0]; // same at the bottom
-	liftForce[2] = 0.5*densFluid*Mathr::PI*pow(sphere->radius,2.0)*Cl*(vRelTop*vRelTop-vRelBottom*vRelBottom);
-}
-//buoyant weight force calculation
-Vector3r buoyantForce = -4.0/3.0*Mathr::PI*pow(sphere->radius,3.0)*densFluid*gravity;
-if (convAccOption==true){convAccForce[0] = - convAcc[p];}
-//add the hydro forces to the particle
-scene->forces.addForce(id,dragForce+liftForce+buoyantForce+convAccForce);		
-			}
-		}
-	}
-}
-
-void HydroForceEngine::averageProfile(){
-	//Initialization
-	int minZ;
-	int maxZ;
-	int numLayer;
-	Real deltaCenter;
-	Real zInf;
-	Real zSup;
-	Real volPart;
-	Vector3r uRel = Vector3r::Zero();
-	Vector3r fDrag  = Vector3r::Zero();
-
-	int nMax = nCell;
-	vector velAverageX(nMax,0.0);
-vector velAverageY(nMax,0.0);
-vector velAverageZ(nMax,0.0);
-	vector phiAverage(nMax,0.0);
-	vector dragAverage(nMax,0.0);
-	vector phiAverage1(nMax,0.0);
-	vector dragAverage1(nMax,0.0);
-	vector velAverageX1(nMax,0.0);
-vector velAverageY1(nMax,0.0);
-vector velAverageZ1(nMax,0.0);
-	vector phiAverage2(nMax,0.0);
-	vector dragAverage2(nMax,0.0);
-	vector velAverageX2(nMax,0.0);
-vector velAverageY2(nMax,0.0);
-vector velAverageZ2(nMax,0.0);
-
-	//Loop over the particles
-	FOREACH(const shared_ptr& b, *Omega::instance().getScene()->bodies){
-		shared_ptr s=YADE_PTR_DYN_CAST(b->shape); if(!s) continue;
-		const Real zPos = b->state->pos[2]-zRef;
-		int Np = floor(zPos/deltaZ);	//Define the layer number with 0 corresponding to zRef. Let the z position wrt to zero, that way all z altitude are positive. (otherwise problem with volPart evaluation)
-		if ((b->state->blockedDOFs==State::DOF_ALL)&&(zPos > s->radius)) continue;// to remove contribution from the fixed particles on the sidewalls.
-
-		// Relative fluid/particle velocity using also the associated fluid vel. fluct. 
-		if ((Np>=0)&&(Npid], vFluctY[b->id],vFluctZ[b->id]) - b->state->vel;
-			// Drag force with a Dallavalle formulation (drag coef.) and Richardson-Zaki Correction (hindrance effect)
-			fDrag = 

[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 4030: extended version of ForceEngine with its own fluid solver (by J. Chauchat)

2017-04-05 Thread noreply

revno: 4030
committer: bchareyre 
timestamp: Wed 2017-04-05 19:18:06 +0200
message:
  extended version of ForceEngine with its own fluid solver (by J. Chauchat)
modified:
  pkg/common/ForceEngine.cpp
  pkg/common/ForceEngine.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/common/ForceEngine.cpp'
--- pkg/common/ForceEngine.cpp	2017-01-23 16:38:29 +
+++ pkg/common/ForceEngine.cpp	2017-04-05 17:18:06 +
@@ -82,7 +82,8 @@
 	}
 }
 
-void HydroForceEngine::action(){	
+
+void HydroForceEngine::action(){
 	/* Application of hydrodynamical forces */
 	if (activateAverage==true) averageProfile(); //Calculate the average solid profiles
 
@@ -98,6 +99,8 @@
 Vector3r liftForce = Vector3r::Zero();
 Vector3r dragForce = Vector3r::Zero();
 Vector3r convAccForce = Vector3r::Zero();
+//deterministic version
+// Vector3r vRel = Vector3r(vxFluid[p],0,0) -  b->state->vel;//fluid-particle relative velocity
 Vector3r vRel = Vector3r(vxFluid[p]+vFluctX[id],vFluctY[id],vFluctZ[id]) -  b->state->vel;//fluid-particle relative velocity
 //Drag force calculation
 if (vRel.norm()!=0.0) {
@@ -455,4 +458,360 @@
 	}
 }
 
-
+/* function declaration */
+void doubleq(double ddam1[],double ddam2[],double ddam3[],double ddbm[],double ddxm[],int n);
+void calbeta(int irheolf, double alphas[], double beta[], double alphasmax, unsigned long n);
+void calviscotlm(int iturbu, int ilm, double dz, double h,double ufn[], double alphas[], double alphasmax, double kappa, double lmExp, double viscoft[], unsigned long n);
+void fluidModel(double h,double sig[],double dsig[],double dp,double ufn[],double alphaf[],double rhof,double viscof,double usnp[],double alphas[],double rhos,double alphasmax,double dpdx,double slope, double gra, double tfin,double dt,double cfdpYade[], double ufnp[], double viscoft[]);
+
+void  HydroForceEngine::updateVelocity() {
+	fluidModel(fluidHeight,[0],[0],diameterPart,[0],
+			[0],//FIXME: in the py script it's in fact (1-phiPart) which is passed to nsmp, wtf? and why the redundancy wrt [#] (below)
+			densFluid,
+			viscoDyn /*is it really the dynamic one here? else pass viscoDyn/densFluid (awkward anyway) */,
+			[0],
+			[0] /*[#] WHY PASSING IT AGAIN?!! It seems to be equal to phiPart in practice */,
+			densPart, alphasmax, dpdx, slope,
+			gravity[2],/*FIXME: I'm assuming that gravity is along 2-axis (??), does it mean that users have to define gravity multiple times in one single script? Newton::gravity, HydroForceEngine::gravity? ugly... :-\ */
+			fluidResolPeriod,dtFluid,
+			[0],
+			[0],[0]); //< output of the function
+}
+
+
+void fluidModel(double h,double sig[],double dsig[],double dp,double ufn[],double alphaf[],double rhof,double viscof,double usnp[],double alphas[],double rhos,double alphasmax,double dpdx,double slope, double gra, double tfin,double dt,double cfdpYade[], double ufnp[], double viscoft[])
+{
+	const unsigned& ndimz=HydroForceEngine::ndimz;
+  unsigned j;
+  int irheolf,idrag,iturbu,ilm,iusl,idrift;
+  double dummy,dn1,ds1,dn2,ds2,dz,dzn,dzs,dzm;
+  double alphafp,alphafwn,alphafws,rhop;
+  double kappa,lmExp,expoRZ;
+  double as,an,ap1,a[ndimz],b[ndimz],c[ndimz],s[ndimz],udrift[ndimz],beta[ndimz],cfdp[ndimz];
+  double Rep,cd;
+  double time=0;
+
+  // impose constant grid size
+  dz=dsig[0]*h;
+  
+  //
+  // Option of the code
+  //
+  //irheolf = 0 : Viscosite du fluide pur
+  //  1 : Viscosite d'Einstein
+  //  2 : Viscosite de Graham
+  //  3 : Viscosite de Krieger-Dougherty / Ishii-Zuber
+  //  4 : Viscosite de Boyer et al. 
+  irheolf = 0;
+
+  // idrag = 0 : Trainee de Dallavale
+  // 1 : Trainee de Schiller & Naumann
+  // 2 : Trainee de Clift & Gauvin
+  // 3 : Loi de Stokes
+  // 4 : Loi de Darcy
+  // 5 : Loi de Ergun
+  // 6 : Imposed from averaged drag force (Yade) 
+  idrag = 0;
+
+  // exposant de Richardson-Zaki (fonction d'entravement)
+  expoRZ = -3.1;
+  
+  // iturbu = 0 : Pas de turbulence
+  //  1 : Longueur de mélange 
+  //  ilm = 0 : longueur de melange de Prandtl
+  //1 : longueur de melange de Prandtl avec effet de Surface libre
+  //2 : Li and Sawamoto  (1995)
+  iturbu = 1;
+  ilm = 2;
+
+  kappa = 0.41;
+  lmExp = 1;
+
+  // iusl = 0 : Condition de Dirichlet (u=0 en z=h)
+  //1 : Condition de Neumann   (dudz=0 en z=h)
+  iusl = 1; 
+	
+  // idrift = 0 : Sans vitesse de dispersion
+  //  1 : Avec vitesse de dispersion
+  idrift = 0;
+
+
+  // Time loop
+  while 

[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 4029: add exemple script for two-phase flow with 2PFV technique, related to Yuan and Chareyre (2017)

2017-03-30 Thread noreply

revno: 4029
committer: bchareyre 
timestamp: Thu 2017-03-30 18:42:26 +0200
message:
  add exemple script for two-phase flow with 2PFV technique, related to Yuan 
and Chareyre (2017)
added:
  examples/FluidCouplingPFV/drainage-2PFV-Yuan_and_Chareyre_2017.py


--
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
=== added file 'examples/FluidCouplingPFV/drainage-2PFV-Yuan_and_Chareyre_2017.py'
--- examples/FluidCouplingPFV/drainage-2PFV-Yuan_and_Chareyre_2017.py	1970-01-01 00:00:00 +
+++ examples/FluidCouplingPFV/drainage-2PFV-Yuan_and_Chareyre_2017.py	2017-03-30 16:42:26 +
@@ -0,0 +1,148 @@
+# encoding: utf-8
+# This script demonstrates a simple case of drainage simulation using the "2PFV" two-phase model implemented in UnsaturatedEngine.
+# The script was used to generate the result and supplementary material (video) of [1]. The only difference is the problem size (40k particles in the paper vs. 1k (default) in this version)
+# [1] Yuan, C., & Chareyre, B. (2017). A pore-scale method for hydromechanical coupling in deformable granular media. Computer Methods in Applied Mechanics and Engineering, 318, 1066-1079. (http://www.sciencedirect.com/science/article/pii/S0045782516307216)
+
+import matplotlib; matplotlib.rc('axes',grid=True)
+from yade import pack
+import pylab
+from numpy import *
+
+utils.readParamsFromTable(seed=1,num_spheres=1000,compFricDegree = 15.0)
+from yade.params import table
+
+seed=table.seed
+num_spheres=table.num_spheres# number of spheres
+compFricDegree = table.compFricDegree # initial contact friction during the confining phase (will be decreased during the REFD compaction process)
+confiningS=-1e5
+
+## creat a packing with a specific particle side distribution (PSD)
+psdSizes,psdCumm=[.599,0.6,0.849,0.85,1.0,1.40],[0.,0.35,0.35,0.70,.70,1.]
+sp=pack.SpherePack()
+mn,mx=Vector3(0,0,0),Vector3(10,10,10)
+sp.makeCloud(minCorner=mn,maxCorner=mx,psdSizes=psdSizes,psdCumm=psdCumm,distributeMass=True,num=num_spheres,seed=seed)
+
+## create material #0, which will be used as default
+O.materials.append(FrictMat(young=15e7,poisson=.4,frictionAngle=radians(compFricDegree),density=2600,label='spheres'))
+O.materials.append(FrictMat(young=15e7,poisson=.4,frictionAngle=0,density=0,label='frictionless'))
+
+## create walls around the packing
+walls=aabbWalls((mn,mx),thickness=0,material='frictionless')
+wallIds=O.bodies.append(walls)
+
+O.bodies.append([utils.sphere(center,rad,material='spheres') for center,rad in sp])
+
+triax=TriaxialStressController(
+	internalCompaction=True,
+	goal1=confiningS,
+	goal2=confiningS,
+	goal3=confiningS,
+	max_vel=10,
+	label="triax"
+)
+
+newton=NewtonIntegrator(damping=0.4)
+
+O.engines=[
+	ForceResetter(),
+	InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Box_Aabb()]),
+	InteractionLoop(
+		[Ig2_Sphere_Sphere_ScGeom(),Ig2_Box_Sphere_ScGeom()],
+		[Ip2_FrictMat_FrictMat_FrictPhys()],
+		[Law2_ScGeom_FrictPhys_CundallStrack()]
+	),
+	GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=100,timestepSafetyCoefficient=0.8),
+	triax,
+	newton
+]
+
+while 1:
+  O.run(1000,True)
+  unb=unbalancedForce()
+  if unb<0.01 and abs(triax.goal1-triax.meanStress)/abs(triax.goal1)<0.001:
+break
+
+#
+##   REACH NEW EQU. STATE ###
+#
+finalFricDegree = 30 # contact friction during the deviatoric loading
+
+#We move to deviatoric loading, let us turn internal compaction off to keep particles sizes constant
+triax.internalCompaction=False
+# Change contact friction (remember that decreasing it would generate instantaneous instabilities)
+setContactFriction(radians(finalFricDegree))
+
+while 1:
+  O.run(1000,True)
+  unb=unbalancedForce()
+  if unb<0.001 and abs(triax.goal1-triax.meanStress)/abs(triax.goal1)<0.001:
+break  
+
+triax.depth0=triax.depth
+triax.height0=triax.height
+triax.width0=triax.width
+O.save('1kPacking.yade') #save the packing, which can be reloaded later.
+
+O.run(1000,True)
+ei0=-triax.strain[0];ei1=-triax.strain[1];ei2=-triax.strain[2]
+si0=-triax.stress(0)[0];si1=-triax.stress(2)[1];si2=-triax.stress(4)[2]
+
+from yade import plot
+O.engines=O.engines+[PyRunner(iterPeriod=20,command='history()',dead=1,label='recorder')]
+
+def history():
+  	plot.addData(e11=-triax.strain[0]-ei0, e22=-triax.strain[1]-ei1, e33=-triax.strain[2]-ei2,
+		s11=-triax.stress(0)[0]-si0,
+		s22=-triax.stress(2)[1]-si1,
+		s33=-triax.stress(4)[2]-si2,
+		pc=-unsat.bndCondValue[2],
+		sw=unsat.getSaturation(False),
+		i=O.iter
+		)
+
+plot.plots={'pc':('sw',None,'e22')}
+plot.plot()
+
+###
+## Drainage Test under oedometer conditions ###

[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 4028: small updates in doc, fixing compile errors and some warnings

2017-03-27 Thread noreply

revno: 4028
committer: bchareyre 
timestamp: Mon 2017-03-27 18:01:35 +0200
message:
  small updates in doc, fixing compile errors and some warnings
modified:
  doc/sphinx/amazonEC2.rst
  doc/sphinx/book/confBook.py
  doc/sphinx/book/confManual.py
  doc/sphinx/book/confReference.py
  doc/sphinx/book/confTheory.py
  doc/sphinx/conf.py
  doc/sphinx/index-toctree-theory.rst
  doc/sphinx/introduction.rst
  doc/yade-articles.bib


--
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/amazonEC2.rst'
--- doc/sphinx/amazonEC2.rst	2017-03-22 19:40:46 +
+++ doc/sphinx/amazonEC2.rst	2017-03-27 16:01:35 +
@@ -4,9 +4,6 @@
 Using YADE with cloud computing on Amazon EC2
 =
 
-.. role:: math(raw)
-	:format: html latex
-
 (Note: we thank Robert Caulk for preparing and sharing this guide)
 
 Summary
@@ -31,14 +28,15 @@
 
 	Amazon Web Services (AWS) Console
 
+
 Start by signing into the console on `Amazon
 EC2 `__. This will require an
 existing or new Amazon account. Once you’ve signed in, you should find
 the EC2 console by clicking on ‘services’ in the upper left hand corner
 of the AWS homepage. Start by clicking on the \`\`launch an instance“
-blue button (Fig. :ref:`fig-console`). Select the Amazon
+blue button (Fig. `fig-console`_). Select the Amazon
 Machine Image (AMI): \`\`Ubuntu Server 16.04 LTS\`\` (Fig.
-:ref:`fig-ubuntu`).
+`fig-ubuntu`_).
 
 .. _fig-ubuntu:
 .. figure:: fig/ubunut.*
@@ -58,7 +56,7 @@
 selection. The \`\`Compute Optimized" instances are necessary for most
 YADE simulations because they provide access to high performing
 processors and guaranteed computing power. The C3.2xlarge (Fig.
-:ref:`fig-type`) is equivalent to an 8 core 2.8ghz Xeon E5
+`fig-type`_) is equivalent to an 8 core 2.8ghz Xeon E5
 with 25 mb of cache, which is likely the best option for medium-large
 scale YADE simulations.
 
@@ -90,7 +88,7 @@
 a java based terminal on the AWS website. You can find the necessary
 information by navigating to \`\`Instances" in the left menu of the AWS
 console. Right click on the instance as shown in Fig.
-:ref:`fig-connect` and click connect.
+`fig-connect`_ and click connect.
 
 
 .. _fig-connect:
@@ -101,7 +99,7 @@
 	Connecting to the instance
 
 You will be presented with the public DNS, which should look something
-like Fig. :ref:`fig-dns`.
+like Fig. `fig-dns`_.
 
 
 .. _fig-dns:
@@ -121,13 +119,13 @@
 
 ::
 
-	#install yadedaily 
+	#install yadedaily
 	sudo bash -c 'echo "deb http://www.yade-dem.org/packages/ xenial/" >> /etc/apt/sources.list'
 	wget -O - http://www.yade-dem.org/packages/yadedev_pub.gpg | sudo apt-key add -
 	sudo apt-get update
 	sudo apt-get install -y yadedaily
 
-	# install python 
+	# install python
 	sudo apt-get -y install python
 	sudo apt-get -y install python-pip python-dev build-essential
 
@@ -152,7 +150,7 @@
 
 ::
 
-	yadedaily nameOfSimulation.py 
+	yadedaily nameOfSimulation.py
 
 In order to retrieve the output files (folder titled ‘out’ below) for
 post processing purposes, you will use the same command that you used to

=== modified file 'doc/sphinx/book/confBook.py'
--- doc/sphinx/book/confBook.py	2017-03-08 12:27:22 +
+++ doc/sphinx/book/confBook.py	2017-03-27 16:01:35 +
@@ -670,7 +670,7 @@
 
 # -- Options for LaTeX output --
 
-my_maketitle=u'''
+my_maketitle=r'''
 \begin{titlepage}
 
 \begin{flushright}
@@ -706,16 +706,16 @@
  \item \text{\sffamily\bfseries\normalsize Sergei Dorofeenko}\\ \text{\sffamily\small IPCP RAS, Chernogolovka}
  \item \text{\sffamily\bfseries\normalsize J\'er\^ome Duriez}\\ \text{\sffamily\small Grenoble INP, UJF, CNRS, lab. 3SR}
  \item \text{\sffamily\bfseries\normalsize Nolan Dyck}\\ \text{\sffamily\small Univ. of Western Ontario}
- \item \text{\sffamily\bfseries\normalsize Jan Eliáš}\\ \text{\sffamily\small Brno University of Technology}
+ \item \text{\sffamily\bfseries\normalsize Eli\'{a}\v{s}}\\ \text{\sffamily\small Brno University of Technology}
  \item \text{\sffamily\bfseries\normalsize Burak Er}\\ \text{\sffamily\small Bursa Technical University}
  \item \text{\sffamily\bfseries\normalsize Alexander Eulitz}\\ \text{\sffamily\small TU Berlin / Institute for Machine Tools}\\ \text{\sffamily\small and Factory Management}
  \item \text{\sffamily\bfseries\normalsize Anton Gladky}\\ \text{\sffamily\small TU Bergakademie Freiberg}
  \item \text{\sffamily\bfseries\normalsize Ning Guo}\\ \text{\sffamily\small Hong Kong Univ. of Science and Tech.}
  \item \text{\sffamily\bfseries\normalsize Christian Jakob}\\ \text{\sffamily\small TU Bergakademie Freiberg}
- \item 

[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 4027: added tmux command tip

2017-03-23 Thread noreply

revno: 4027
committer: robcaulk 
timestamp: Wed 2017-03-22 12:40:46 -0700
message:
  added tmux command tip
modified:
  doc/sphinx/amazonEC2.rst


--
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/amazonEC2.rst'
--- doc/sphinx/amazonEC2.rst	2017-03-08 12:27:22 +
+++ doc/sphinx/amazonEC2.rst	2017-03-22 19:40:46 +
@@ -211,3 +211,13 @@
you always dedicate 8 cores to each simulation and ensure 100% of the
processor is running.
 
+-  Create a tmux session to avoid ending YADE simulations upon
+   disconnecting from the server.
+
+::
+
+  tmux  # starts a new session
+  tmux attach -t 0  # attach session 0
+  tmux kill -t 0  # kill session
+  ## cntrl - b - d to move back to home
+  ## cntrl - b - [ to navigate within the session

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 4026: Put brackets in the right place (thx Robert).

2017-03-22 Thread noreply

revno: 4026
author: Bruno Chareyre 
committer: GitHub 
timestamp: Wed 2017-03-22 13:42:47 +0100
message:
  Put brackets in the right place (thx Robert).
modified:
  pkg/pfv/DFNFlow.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 'pkg/pfv/DFNFlow.cpp'
--- pkg/pfv/DFNFlow.cpp	2017-03-14 17:55:33 +
+++ pkg/pfv/DFNFlow.cpp	2017-03-22 12:42:47 +
@@ -208,7 +208,7 @@
 	RTriangulation::Facet_circulator facet1 = Tri.incident_facets(*edge);
 	RTriangulation::Facet_circulator facet0=facet1++;
 	trickPermeability(facet0, aperture,residualAperture, edge);
-	while ( facet1!=facet0 ) trickPermeability(facet1, aperture, residualAperture, edge); facet1++;
+	while ( facet1!=facet0 ) {trickPermeability(facet1, aperture, residualAperture, edge); facet1++;}
 	/// Needs the fracture surface for this edge?
 // 	double edgeArea = solver->T[solver->currentTes].computeVFacetArea(edge); cout<<"edge area="<

[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 4024: new data 'crackArea' added to DFNFlow cells and updated automatically - first step toward solving...

2017-03-14 Thread noreply

revno: 4024
committer: bchareyre 
timestamp: Tue 2017-03-14 18:54:25 +0100
message:
  new data 'crackArea' added to DFNFlow cells and updated automatically - first 
step toward solving the artificial compressibility of fluids in cracks
modified:
  pkg/pfv/DFNFlow.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 'pkg/pfv/DFNFlow.cpp'
--- pkg/pfv/DFNFlow.cpp	2017-03-07 17:06:18 +
+++ pkg/pfv/DFNFlow.cpp	2017-03-14 17:54:25 +
@@ -14,7 +14,7 @@
 //it will save compilation time for everyone else
 //when you want it compiled, you can pass -DDFNFLOW to cmake, or just uncomment the following line
 
-// #define DFNFLOW
+#define DFNFLOW
 
 #ifdef DFNFLOW
 #include "FlowEngine_DFNFlowEngineT.hpp"
@@ -24,10 +24,11 @@
 	public:
 	Real anotherVariable;
 	bool crack;
+	Real crackArea;// the volume of cracks
 // 	bool preExistingJoint;
 // 	void anotherFunction() {};
 // 	DFNCellInfo() : FlowCellInfo(),crack(false)  {}
-	DFNCellInfo() : crack(false)  {}
+	DFNCellInfo() : crack(false), crackArea(0) {}
 };
 
 class DFNVertexInfo : public FlowVertexInfo_DFNFlowEngineT {
@@ -127,19 +128,20 @@
 {
 	public :
 	void trickPermeability();
-	void trickPermeability (RTriangulation::Facet_circulator& facet,Real aperture, Real residualAperture);
+	void trickPermeability (RTriangulation::Facet_circulator& facet,Real aperture, Real residualAperture, RTriangulation::Finite_edges_iterator& edge);
 	void trickPermeability (RTriangulation::Finite_edges_iterator& edge,Real aperture, Real residualAperture);
 	void setPositionsBuffer(bool current);
 // 	void computeTotalFractureArea(Real totalFracureArea,bool printFractureTotalArea);/// Trying to get fracture's surface
 	Real totalFracureArea; /// Trying to get fracture's surface
+	CELL_SCALAR_GETTER(double,.crackArea,crackArea)
 
 	YADE_CLASS_BASE_DOC_ATTRS_INIT_CTOR_PY(DFNFlowEngine,DFNFlowEngineT,"This is an enhancement of the FlowEngine for intact and fractured rocks that takes into acount pre-existing discontinuities and bond breakage between particles. The local conductivity around the broken link is calculated according to parallel plates model",
 	((Real, jointResidual, 0,,"calibration parameter for residual aperture of joints"))
 	((bool, updatePositions, false,,"update particles positions when rebuilding the mesh (experimental)"))
  	((bool, printFractureTotalArea, 0,,"The final fracture area computed through the network")) /// Trying to get fracture's surface
-	,
-	,
-	,
+	((bool, calcCrackArea, true,,"The amount of crack per pore () is updated if calcCrackArea=True")) /// Trying to get fracture's surface
+	,,,
+	.def("getCrackArea",::crackArea,(boost::python::arg("id")),"get the cracked area within cell 'id'.")
 // 	.def("computeTotalFractureArea",::computeTotalFractureArea," Compute and print the total fracture area of the network") /// Trying to get fracture's surface
 // 	.def("trickPermeability",::trickPermeability,"measure the mean trickPermeability in the period")
 	)
@@ -168,7 +170,7 @@
 	}
 }
 
-void DFNFlowEngine::trickPermeability(RTriangulation::Facet_circulator& facet, Real aperture, Real residualAperture)
+void DFNFlowEngine::trickPermeability(RTriangulation::Facet_circulator& facet, Real aperture, Real residualAperture, RTriangulation::Finite_edges_iterator& ed_it)
 {
 	const RTriangulation::Facet& currentFacet = *facet; // seems verbose but facet->first was declaring a junk cell and crashing program (https://bugs.launchpad.net/yade/+bug/1666339)
 	const RTriangulation& Tri = solver->T[solver->currentTes].Triangulation();
@@ -188,15 +190,25 @@
 	totalFracureArea += networkFractureArea; /// Trying to get fracture's surface 
 // 	cout <<" -- The total surface area up to here is " << totalFracureArea << endl;
 // 	printFractureTotalArea = totalFracureArea; /// Trying to get fracture's surface 
+	if (calcCrackArea) {
+			CVector edge = ed_it->first->vertex(ed_it->second)->point().point() - ed_it->first->vertex(ed_it->third)->point().point();
+			CVector unitV = edge*(1./sqrt(edge.squared_length()));
+			Point p3 = ed_it->first->vertex(ed_it->third)->point().point() + unitV*(cell1->info() - ed_it->first->vertex(ed_it->third)->point().point())*unitV;
+			Real halfCrackArea = 0.25*sqrt(std::abs(cross_product(CellCentre1-p3,CellCentre2-p3).squared_length()));//
+			cell1->info().crackArea += halfCrackArea;
+			cell2->info().crackArea += halfCrackArea;
+		}
 }
 
 void DFNFlowEngine::trickPermeability(RTriangulation::Finite_edges_iterator& edge, Real aperture, Real residualAperture)
 {
 	const RTriangulation& Tri = solver->T[solver->currentTes].Triangulation();
+	
+	
 	RTriangulation::Facet_circulator facet1 = Tri.incident_facets(*edge);
 

[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 4025: #define DFNFLOW commented out

2017-03-14 Thread noreply

revno: 4025
committer: bchareyre 
timestamp: Tue 2017-03-14 18:55:33 +0100
message:
  #define DFNFLOW commented out
modified:
  pkg/pfv/DFNFlow.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 'pkg/pfv/DFNFlow.cpp'
--- pkg/pfv/DFNFlow.cpp	2017-03-14 17:54:25 +
+++ pkg/pfv/DFNFlow.cpp	2017-03-14 17:55:33 +
@@ -14,7 +14,7 @@
 //it will save compilation time for everyone else
 //when you want it compiled, you can pass -DDFNFLOW to cmake, or just uncomment the following line
 
-#define DFNFLOW
+// #define DFNFLOW
 
 #ifdef DFNFLOW
 #include "FlowEngine_DFNFlowEngineT.hpp"

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 4023: new logic for interating on facets in periodic triangulations (following ref. Rev.26efbec and fol...

2017-03-14 Thread noreply

revno: 4023
committer: bchareyre 
timestamp: Tue 2017-03-14 15:56:50 +0100
message:
  new logic for interating on facets in periodic triangulations (following ref. 
Rev.26efbec and followers)
modified:
  lib/triangulation/FlowBoundingSphere.ipp


--
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 'lib/triangulation/FlowBoundingSphere.ipp'
--- lib/triangulation/FlowBoundingSphere.ipp	2017-03-10 11:09:31 +
+++ lib/triangulation/FlowBoundingSphere.ipp	2017-03-14 14:56:50 +
@@ -662,12 +662,13 @@
 {
 	RTriangulation& Tri = T[currentTes].Triangulation();
 	vector constrictions;
-	for (FiniteFacetsIterator f_it=Tri.finite_facets_begin(); f_it != Tri.finite_facets_end();f_it++){
-		// in the periodic case, we retain only the facets incident to at least one non-ghost cell
-		// plus if one cell is ghost it must be facet->first (else they would appear twice) 
-		if ( f_it->first->info().isGhost ||  f_it->first->info().index == 0 || f_it->first->neighbor(f_it->second)->info().index == 0) continue;
-		constrictions.push_back(computeEffectiveRadius(f_it->first, f_it->second));
-	}
+	CellHandle neighbourCell; const FiniteCellsIterator& cellEnd = Tri.finite_cells_end();
+	for (FiniteCellsIterator cell = Tri.finite_cells_begin(); cell != cellEnd; cell++) {
+			if (cell->info().isGhost) continue;// retain only the cells with barycenter in the (0,0,0) period
+			for (int j=0; j<4; j++) {
+neighbourCell = cell->neighbor(j);
+if (cell->info().id < neighbourCell->info().id)
+	constrictions.push_back(computeEffectiveRadius(cell, j));}}
 	return constrictions;
 }
 
@@ -676,18 +677,21 @@
 {
 	RTriangulation& Tri = T[currentTes].Triangulation();
 	vector constrictions;
-	for (FiniteFacetsIterator f_it=Tri.finite_facets_begin(); f_it != Tri.finite_facets_end();f_it++){
-		//in the periodic case, we retain only the facets incident to at least one non-ghost cell 
-		if ( f_it->first->info().isGhost ||  f_it->first->info().index == 0 || f_it->first->neighbor(f_it->second)->info().index == 0) continue;
-		vector rn;
-		const CVector& normal = f_it->first->info().facetSurfaces[f_it->second];
-		if (!normal[0] && !normal[1] && !normal[2]) continue;
-		rn.push_back(computeEffectiveRadius(f_it->first, f_it->second));
-		rn.push_back(normal[0]);
-		rn.push_back(normal[1]);
-		rn.push_back(normal[2]);
-		Constriction cons (pair(f_it->first->info().id,f_it->first->neighbor(f_it->second)->info().id),rn);
-		constrictions.push_back(cons);
+	CellHandle neighbourCell; const FiniteCellsIterator& cellEnd = Tri.finite_cells_end();
+	for (FiniteCellsIterator cell = Tri.finite_cells_begin(); cell != cellEnd; cell++) {
+			if (cell->info().isGhost) continue;// retain only the cells with barycenter in the (0,0,0) period
+			for (int j=0; j<4; j++) {
+neighbourCell = cell->neighbor(j);
+if (cell->info().id < neighbourCell->info().id) {
+	vector rn;
+	const CVector& normal = cell->info().facetSurfaces[j];
+	if (!normal[0] && !normal[1] && !normal[2]) continue;
+	rn.push_back(computeEffectiveRadius(cell, j));
+	rn.push_back(normal[0]);
+	rn.push_back(normal[1]);
+	rn.push_back(normal[2]);
+	Constriction cons (pair(cell->info().id,neighbourCell->info().id),rn);
+	constrictions.push_back(cons);}}
 	}
 	return constrictions;
 }

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 4022: -split computeEffectiveRadius() for obtaining reff by pos and radius; -clean redundant functions.

2017-03-10 Thread noreply

revno: 4022
committer: Chao Yuan 
timestamp: Fri 2017-03-10 12:09:31 +0100
message:
  -split computeEffectiveRadius() for obtaining reff by pos and radius; -clean 
redundant functions.
modified:
  lib/triangulation/FlowBoundingSphere.hpp
  lib/triangulation/FlowBoundingSphere.ipp
  pkg/pfv/TwoPhaseFlowEngine.cpp
  pkg/pfv/TwoPhaseFlowEngine.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 'lib/triangulation/FlowBoundingSphere.hpp'
--- lib/triangulation/FlowBoundingSphere.hpp	2016-11-17 15:32:26 +
+++ lib/triangulation/FlowBoundingSphere.hpp	2017-03-10 11:09:31 +
@@ -123,6 +123,7 @@
 
 		double dotProduct ( CVector x, CVector y );
 		double computeEffectiveRadius(CellHandle cell, int j);
+		double computeEffectiveRadiusByPosRadius(const Point& posA, const double& rA, const Point& posB, const double& rB, const Point& posC, const double& rC);
 		double computeEquivalentRadius(CellHandle cell, int j);
 		//return the list of constriction values
 		vector getConstrictions();

=== modified file 'lib/triangulation/FlowBoundingSphere.ipp'
--- lib/triangulation/FlowBoundingSphere.ipp	2017-03-08 17:35:20 +
+++ lib/triangulation/FlowBoundingSphere.ipp	2017-03-10 11:09:31 +
@@ -698,9 +698,25 @@
 	RTriangulation& Tri = T[currentTes].Triangulation();
 if (Tri.is_infinite(cell->neighbor(j))) return 0;
 
-	CVector B = cell->vertex(facetVertices[j][1])->point().point()-cell->vertex(facetVertices[j][0])->point().point();
+	Point pos[3]; //spheres pos
+	double r[3]; //spheres radius
+	for (int i=0; i<3; i++) {
+	  pos[i] = cell->vertex(facetVertices[j][i])->point().point();
+	  r[i] = sqrt(cell->vertex(facetVertices[j][i])->point().weight());}
+	
+	double reff=computeEffectiveRadiusByPosRadius(pos[0],r[0],pos[1],r[1],pos[2],r[2]);
+	if (reff<0) return 0;//happens very rarely, with bounding spheres most probably
+	//if the facet involves one ore more bounding sphere, we return R with a minus sign
+	if (cell->vertex(facetVertices[j][2])->info().isFictious || cell->vertex(facetVertices[j][1])->info().isFictious || cell->vertex(facetVertices[j][2])->info().isFictious) return -reff;
+	else return reff;
+}
+compute inscribed radius independently by position and radius
+template  
+double FlowBoundingSphere::computeEffectiveRadiusByPosRadius(const Point& posA, const double& rA, const Point& posB, const double& rB, const Point& posC, const double& rC)
+{
+	CVector B = posB - posA;
 	CVector x = B/sqrt(B.squared_length());
-	CVector C = cell->vertex(facetVertices[j][2])->point().point()-cell->vertex(facetVertices[j][0])->point().point();
+	CVector C = posC - posA;
 	CVector z = CGAL::cross_product(x,C);
 	CVector y = CGAL::cross_product(x,z);
 	y = y/sqrt(y.squared_length());
@@ -708,10 +724,6 @@
 	double b1[2]; b1[0] = B*x; b1[1] = B*y;
 	double c1[2]; c1[0] = C*x; c1[1] = C*y;
 
-	double rA = sqrt(cell->vertex(facetVertices[j][0])->point().weight());
-	double rB = sqrt(cell->vertex(facetVertices[j][1])->point().weight());
-	double rC = sqrt(cell->vertex(facetVertices[j][2])->point().weight());
-
 	double A = ((pow(rA,2))*(1-c1[0]/b1[0])+((pow(rB,2)*c1[0])/b1[0])-pow(rC,2)+pow(c1[0],2)+pow(c1[1],2)-((pow(b1[0],2)+pow(b1[1],2))*c1[0]/b1[0]))/(2*c1[1]-2*b1[1]*c1[0]/b1[0]);
 	double BB = (rA-rC-((rA-rB)*c1[0]/b1[0]))/(c1[1]-b1[1]*c1[0]/b1[0]);
 	double CC = (pow(rA,2)-pow(rB,2)+pow(b1[0],2)+pow(b1[1],2))/(2*b1[0]);
@@ -725,10 +737,7 @@
 
 	if ((pow(b,2)-4*a*c)<0){cout << "NEGATIVE DETERMINANT" << endl; }
 	double reff = (-b+sqrt(pow(b,2)-4*a*c))/(2*a);
-	if (reff<0) return 0;//happens very rarely, with bounding spheres most probably
-	//if the facet involves one ore more bounding sphere, we return R with a minus sign
-	if (cell->vertex(facetVertices[j][2])->info().isFictious || cell->vertex(facetVertices[j][1])->info().isFictious || cell->vertex(facetVertices[j][2])->info().isFictious) return -reff;
-	else return reff;
+	return reff;
 }
 
 template  

=== modified file 'pkg/pfv/TwoPhaseFlowEngine.cpp'
--- pkg/pfv/TwoPhaseFlowEngine.cpp	2017-03-07 10:48:59 +
+++ pkg/pfv/TwoPhaseFlowEngine.cpp	2017-03-10 11:09:31 +
@@ -218,46 +218,94 @@
 
 Vector3r pos[3]; //solid pos
 double r[3]; //solid radius
-double e[3]; //edges of triangulation
-double g[3]; //gap radius between solid
 
 for (int i=0; i<3; i++) {
   pos[i] = makeVector3r(cell->vertex(facetVertices[j][i])->point().point());
   r[i] = sqrt(cell->vertex(facetVertices[j][i])->point().weight());
 }
-
-e[0] = (pos[1]-pos[2]).norm();
-e[1] = (pos[2]-pos[0]).norm();
-e[2] = (pos[1]-pos[0]).norm();
-g[0] = ((e[0]-r[1]-r[2])>0) ? 0.5*(e[0]-r[1]-r[2]):0 ;
-g[1] = ((e[1]-r[2]-r[0])>0) ? 0.5*(e[1]-r[2]-r[0]):0 

[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 4021: capillaryLaplaceYoung scripts: update of reference labels

2017-03-08 Thread noreply

revno: 4021
committer: jduriez 
timestamp: Wed 2017-03-08 11:58:48 -0700
message:
  capillaryLaplaceYoung scripts: update of reference labels
modified:
  examples/capillaryLaplaceYoung/README.txt
  examples/capillaryLaplaceYoung/solveLaplace_uc.m
  examples/capillaryLaplaceYoung/solveLiqBridge.m


--
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 'examples/capillaryLaplaceYoung/README.txt'
--- examples/capillaryLaplaceYoung/README.txt	2016-10-26 16:59:05 +
+++ examples/capillaryLaplaceYoung/README.txt	2017-03-08 18:58:48 +
@@ -21,7 +21,7 @@
 - solveLiqBridge.m solves the Laplace-Young equation for one given bridge, defined in terms of the input attributes of the solveLiqBridge function (see therein). The solveLiqBridge function is usually called by other files (see below) during capillary files generation, however it can also be executed on its own in order to study (e.g. plot) capillary bridge profile.
 
 Code comments include references to:
- * Duriez2016: J. Duriez and R. Wan, Contact angle mechanical influence for wet granular soils, Acta Geotechnica, 2016, doi:10.1007/s11440-016-0500-6
+ * Duriez2017: J. Duriez and R. Wan, Contact angle mechanical influence for wet granular soils, Acta Geotechnica, 12, 2017
  * Lian1993: G. Lian and C. Thornton and M. J. Adams, A Theoretical Study of the Liquid Bridge Forces between Two Rigid Spherical Bodies, Journal of Colloid and Interface Science, 161(1), 1993
  * Scholtes2008 (french): L. Scholtes, Modelisation Micro-Mecanique des Milieux Granulaires Partiellement Satures, PhD Thesis from Institut polytechnique de Grenoble, 2008
  * Soulie2005 (french): F. Soulie, Cohesion par capillarite et comportement mecanique de milieux granulaires, PhD Thesis from Universite Montpellier II, 2005

=== modified file 'examples/capillaryLaplaceYoung/solveLaplace_uc.m'
--- examples/capillaryLaplaceYoung/solveLaplace_uc.m	2016-09-21 16:48:23 +
+++ examples/capillaryLaplaceYoung/solveLaplace_uc.m	2017-03-08 18:58:48 +
@@ -59,7 +59,7 @@
 % disp(['We had to suppress ',num2str((1-nNonDvSol/nPhysSol)*100),' % of diverged "solutions"'])
 
 % Get rid of unstable physical solutions:(those with biggest volumes)
-% We use volume values for this purpose, see e.g. Duriez2016
+% We use volume values for this purpose, see e.g. Duriez2017
 distRupt = max(nonDvSol(:,1));
 % eRupt = nonDvSol(nonDvSol(:,1)==distRupt,7); % does not work since eRupt can be a global maximum
 % (when two branches are increasing with d*)

=== modified file 'examples/capillaryLaplaceYoung/solveLiqBridge.m'
--- examples/capillaryLaplaceYoung/solveLiqBridge.m	2016-09-21 16:48:23 +
+++ examples/capillaryLaplaceYoung/solveLiqBridge.m	2017-03-08 18:58:48 +
@@ -24,7 +24,7 @@
 % close all
 global cstC
 % cstC is the dimensionless capillary force: constant all along the profile
-% see [9] Lian1993, (6) Duriez2016, or (2.51) Soulie2005 ~ (10) Soulie2006..
+% see [9] Lian1993, (6) Duriez2017, or (2.51) Soulie2005 ~ (10) Soulie2006..
 cstC = 1/rRatio * sin(radians(delta1)) * sin(radians(delta1+theta)) + 1/2 * uStar * rRatio^-2 * sin(radians(delta1))^2;
 
 % Use of cstC to get the right filling angle delta2:
@@ -45,7 +45,7 @@
 
 %-
 % Finite diff. scheme to compute whole profile ie compute rho and rhoPrime
-% See Lian1993, Duriez2016, etc..
+% See Lian1993, Duriez2017, etc..
 
 % Some remarks about next loop:
 % - this loop may extend the size of rho without problem
@@ -70,7 +70,7 @@
 d1 = radians(delta1); d2 = radians(delta2);
 
 % Inter particle dimensionless distance:
-% see (7) Duriez2016, (33) Scholtes2008, etc. (not (5) Soulie2006..)
+% see (7) Duriez2017, (33) Scholtes2008, etc. (not (5) Soulie2006..)
 lastZ = deltaZ*(length(rho) -1);
 dist = lastZ - 1/rRatio * ( 1-cos(d1) ) - ( 1-cos(d2) );
 
@@ -78,13 +78,13 @@
 force = cstC;
 
 % Dimensionless volume:
-% Cf (4) Soulie2006, (34) Appendix Scholtes2008, (8) Duriez2016 etc. :
+% Cf (4) Soulie2006, (34) Appendix Scholtes2008, (8) Duriez2017 etc. :
 vol = pi*sum(rho(2:length(rho)).^2)*deltaZ;
 vol = vol - pi/3 * rRatio^(-3) * ( 1-cos(d1) )^2 * ( 2+cos(d1) );
 vol = vol - pi/3 * ( 1-cos(d2) )^2 * ( 2+cos(d2) );
 
 % Capillary bridge dimensionless free energy:
-% (12) Duriez2016 rather than [35] Lian1993 (was for cst volume stability)
+% (12) Duriez2017 rather than [35] Lian1993 (was for cst volume stability)
 dArea = rho .* ( 1+rhoPrime.^2).^(1/2); % ~ infinitesimal liquid gas area
 eStar = 2*pi * sum(dArea(2:length(dArea))) * deltaZ + uStar * vol; %+/- uStar changes the values but not the shape
 eStar = eStar - 2*pi*cos(radians(theta)) * ( (1-cos(d1))/rRatio^2 + 1 - cos(d2) );
@@ -148,14 +148,14 @@
 

[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 4020: Articles .bib entries: fixes https://bugs.launchpad.net/yade/+bug/1671045, plus update of entries...

2017-03-08 Thread noreply

revno: 4020
committer: jduriez 
timestamp: Wed 2017-03-08 11:07:25 -0700
message:
  Articles .bib entries: fixes https://bugs.launchpad.net/yade/+bug/1671045, 
plus update of entries data
modified:
  doc/yade-articles.bib


--
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/yade-articles.bib'
--- doc/yade-articles.bib	2017-03-08 12:27:27 +
+++ doc/yade-articles.bib	2017-03-08 18:07:25 +
@@ -239,44 +239,44 @@
 	year = {2013}
 }
 
-@article{Duriez2016a,
+@article{Duriez2016,
 title = {Micromechanics of wing crack propagation for different flaw properties},
 author = {Duriez, J. and Scholtès, L. and Donzé, F.V.},
 journal = {Engineering Fracture Mechanics},
 volume = {153},
-pages = {378 - 398},
+pages = {378 -- 398},
 year = {2016},
 doi = {10.1016/j.engfracmech.2015.12.034}
 }
 
 @Article{Duriez2016b,
 author = {J. Duriez and R. Wan},
+title = {Stress in wet granular media with interfaces via homogenization and discrete element approaches},
+year = {2016},volume = {142},number = {12},
+journal = {Journal of Engineering Mechanics},
+doi = {10.1061/(ASCE)EM.1943-7889.0001163}
+}
+
+@Article{Duriez2017,
+author = {J. Duriez and R. Wan},
+title = {Subtleties in discrete-element modelling of wet granular soils},
+year = {2017},volume = {67},number = {4},pages = {365--370},
+journal = {Géotechnique},
+doi = {10.1680/jgeot.15.P.113}
+}
+
+@Article{Duriez2017b,
+author = {J. Duriez and R. Wan},
 title = {Contact angle mechanical influence for wet granular soils},
-year = {2016},
+year = {2017},volume={12},number={1},pages={67--83},
 journal = {Acta Geotechnica},
 doi = {10.1007/s11440-016-0500-6}
 }
 
-@Article{Duriez2016c,
-author = {J. Duriez and R. Wan},
-title = {Subtleties in Discrete Element Modelling of wet granular soils},
-year = {2016},
-journal = {Géotechnique},
-doi = {10.1680/jgeot.15.P.113}
-}
-
-@Article{Duriez2016d,
-author = {J. Duriez and R. Wan},
-title = {Stress in wet granular media with interfaces via homogenization and discrete element approaches},
-year = {2016},
-journal = {Journal of Engineering Mechanics},
-doi = {10.1061/(ASCE)EM.1943-7889.0001163}
-}
-
-@article{Duriez2016e,
+@article{Duriez2017c,
 title = {The micromechanical nature of stresses in triphasic granular media with interfaces},
 journal = {Journal of the Mechanics and Physics of Solids},
-year = {2016},
+year = {2017},volume = {99},pages = {495--511},
 doi = {10.1016/j.jmps.2016.10.011},
 author = {J. Duriez and M. Eghbalian and R. Wan and F. Darve}
 }

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 4019: small fix in getConstriction() + a typo

2017-03-08 Thread noreply

revno: 4019
committer: bchareyre 
timestamp: Wed 2017-03-08 18:35:20 +0100
message:
  small fix in getConstriction() + a typo
modified:
  lib/triangulation/FlowBoundingSphere.ipp
  pkg/pfv/DummyFlowEngine.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 'lib/triangulation/FlowBoundingSphere.ipp'
--- lib/triangulation/FlowBoundingSphere.ipp	2017-03-08 10:33:22 +
+++ lib/triangulation/FlowBoundingSphere.ipp	2017-03-08 17:35:20 +
@@ -663,9 +663,9 @@
 	RTriangulation& Tri = T[currentTes].Triangulation();
 	vector constrictions;
 	for (FiniteFacetsIterator f_it=Tri.finite_facets_begin(); f_it != Tri.finite_facets_end();f_it++){
-		//in the periodic case, we retain only the facets incident to at least one non-ghost cell 
-		if ( (f_it->first->neighbor(f_it->second)->info().isGhost && f_it->first->info().isGhost)
-		||  f_it->first->info().index == 0 || f_it->first->neighbor(f_it->second)->info().index == 0) continue;
+		// in the periodic case, we retain only the facets incident to at least one non-ghost cell
+		// plus if one cell is ghost it must be facet->first (else they would appear twice) 
+		if ( f_it->first->info().isGhost ||  f_it->first->info().index == 0 || f_it->first->neighbor(f_it->second)->info().index == 0) continue;
 		constrictions.push_back(computeEffectiveRadius(f_it->first, f_it->second));
 	}
 	return constrictions;
@@ -678,8 +678,7 @@
 	vector constrictions;
 	for (FiniteFacetsIterator f_it=Tri.finite_facets_begin(); f_it != Tri.finite_facets_end();f_it++){
 		//in the periodic case, we retain only the facets incident to at least one non-ghost cell 
-		if ( (f_it->first->neighbor(f_it->second)->info().isGhost && f_it->first->info().isGhost)
-		||  f_it->first->info().index == 0 || f_it->first->neighbor(f_it->second)->info().index == 0) continue;
+		if ( f_it->first->info().isGhost ||  f_it->first->info().index == 0 || f_it->first->neighbor(f_it->second)->info().index == 0) continue;
 		vector rn;
 		const CVector& normal = f_it->first->info().facetSurfaces[f_it->second];
 		if (!normal[0] && !normal[1] && !normal[2]) continue;

=== modified file 'pkg/pfv/DummyFlowEngine.cpp'
--- pkg/pfv/DummyFlowEngine.cpp	2014-11-17 14:04:32 +
+++ pkg/pfv/DummyFlowEngine.cpp	2017-03-08 17:35:20 +
@@ -9,7 +9,7 @@
 // This is an example of how to derive a new FlowEngine with additional data and possibly completely new behaviour.
 // Every functions of the base engine can be overloaded, and new functions can be added
 
-//keep this #ifdef as long as you don't really want to realize a final version publicly, it will save compilation time for everyone else
+//keep this #ifdef as long as you don't really want to release a final version publicly, it will save compilation time for everyone else
 //when you want it compiled, you can pass -DDUMMYFLOW to cmake, or just uncomment the following line
 // #define DUMMYFLOW
 #ifdef DUMMYFLOW

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 4014: fix a compile warning

2017-03-08 Thread noreply

revno: 4014
committer: bchareyre 
timestamp: Wed 2017-03-08 13:27:21 +0100
message:
  fix a compile warning
modified:
  py/wrapper/yadeWrapper.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 'py/wrapper/yadeWrapper.cpp'
--- py/wrapper/yadeWrapper.cpp	2017-01-19 18:11:51 +
+++ py/wrapper/yadeWrapper.cpp	2017-03-08 12:27:21 +
@@ -125,7 +125,7 @@
 		const shared_ptr clump(YADE_PTR_CAST(clumpBody->shape));
 		if (clump->members.size()==1 ){
 			Clump::del(clumpBody,memberBody); //phD was not commented out
-			for (int i=0; iids.size(); i++){
+			for (unsigned i=0; iids.size(); i++){
 if (clump->ids[i] == memberBody->getId()){
 	clump->ids.erase(clump->ids.begin()+i);
 }
@@ -135,7 +135,7 @@
 			
 		}else{
 			Clump::del(clumpBody,memberBody); //pHD was not commented out
-			for (int i=0; iids.size(); i++){
+			for (unsigned i=0; iids.size(); i++){
 if (clump->ids[i] == memberBody->getId()){
 	clump->ids.erase(clump->ids.begin()+i);
 }

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 4013: + Christian Jakob's PhD in references

2017-03-08 Thread noreply

revno: 4013
author: Bruno Chareyre 
committer: GitHub 
timestamp: Wed 2017-03-08 11:52:08 +0100
message:
  + Christian Jakob's PhD in references
modified:
  doc/yade-theses.bib


--
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/yade-theses.bib'
--- doc/yade-theses.bib	2016-10-21 11:54:30 +
+++ doc/yade-theses.bib	2017-03-08 10:52:08 +
@@ -168,3 +168,11 @@
 	school={Universidad de Chile},
 	url={https://dl.dropboxusercontent.com/u/7663386/0_tesis.pdf}
 }
+
+@phdthesis{Jakob2016,
+author = {Christian Jakob},
+school = {TU Bergakademie Freiberg},
+title = {Numerische Modellierung des Verflüssigungsverhaltens von Kippen des Braunkohlenbergbaus beim und nach dem Wiederaufgang von Grundwasser (in german with extended summary in english)},
+year = {2016},
+url = {http://nbn-resolving.de/urn:nbn:de:bsz:14-qucosa-218045}
+} 

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 4017: add a reference url

2017-03-08 Thread noreply

revno: 4017
committer: bchareyre 
timestamp: Wed 2017-03-08 13:27:27 +0100
message:
  add a reference url
modified:
  doc/yade-articles.bib


--
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/yade-articles.bib'
--- doc/yade-articles.bib	2017-03-07 18:03:29 +
+++ doc/yade-articles.bib	2017-03-08 12:27:27 +
@@ -1065,7 +1065,8 @@
   author={C. Yuan and B. Chareyre},
   journal={Computer Methods in Applied Mechanics and Engineering (in press)},
   year={2017},
-  doi ={10.1016/j.cma.2017.02.024}
+  doi ={10.1016/j.cma.2017.02.024},
+  url = {https://arxiv.org/pdf/1703.02319}
 }
 
 @ARTICLE{Zhao2015,

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 4012: re-apply the fix of rev 26efbec to getConstrictionFull()

2017-03-08 Thread noreply

revno: 4012
committer: bchareyre 
timestamp: Wed 2017-03-08 11:33:22 +0100
message:
  re-apply the fix of rev 26efbec to getConstrictionFull()
modified:
  lib/triangulation/FlowBoundingSphere.ipp


--
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 'lib/triangulation/FlowBoundingSphere.ipp'
--- lib/triangulation/FlowBoundingSphere.ipp	2017-02-23 14:14:02 +
+++ lib/triangulation/FlowBoundingSphere.ipp	2017-03-08 10:33:22 +
@@ -677,10 +677,9 @@
 	RTriangulation& Tri = T[currentTes].Triangulation();
 	vector constrictions;
 	for (FiniteFacetsIterator f_it=Tri.finite_facets_begin(); f_it != Tri.finite_facets_end();f_it++){
-		//in the periodic case, we skip facets with lowest id out of the base period
- 		 if ( ((f_it->first->info().index <= f_it->first->neighbor(f_it->second)->info().index) && f_it->first->info().isGhost)
-		||  ((f_it->first->info().index >= f_it->first->neighbor(f_it->second)->info().index) && f_it->first->neighbor(f_it->second)->info().isGhost)
-		|| f_it->first->info().index == 0 || f_it->first->neighbor(f_it->second)->info().index == 0) continue;
+		//in the periodic case, we retain only the facets incident to at least one non-ghost cell 
+		if ( (f_it->first->neighbor(f_it->second)->info().isGhost && f_it->first->info().isGhost)
+		||  f_it->first->info().index == 0 || f_it->first->neighbor(f_it->second)->info().index == 0) continue;
 		vector rn;
 		const CVector& normal = f_it->first->info().facetSurfaces[f_it->second];
 		if (!normal[0] && !normal[1] && !normal[2]) continue;

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 4018: fix compiler warning

2017-03-08 Thread noreply

revno: 4018
committer: bchareyre 
timestamp: Wed 2017-03-08 13:27:27 +0100
message:
  fix compiler warning
modified:
  pkg/common/Gl1_PotentialBlock.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 'pkg/common/Gl1_PotentialBlock.cpp'
--- pkg/common/Gl1_PotentialBlock.cpp	2016-10-11 14:44:26 +
+++ pkg/common/Gl1_PotentialBlock.cpp	2017-03-08 12:27:27 +
@@ -460,7 +460,7 @@
 			functionBool = new vtkSmartPointer [clump->ids.size()];
 			ImplicitBoolNo = clump->ids.size();
 			
-			for (int i=0; iids.size();i++){
+			for (unsigned i=0; iids.size();i++){
 const shared_ptr  clumpMember = Body::byId(clump->ids[i],scene);
 const PotentialBlock* pbShape =dynamic_cast(clumpMember->shape.get()); 
 functionBool[i] = vtkSmartPointer::New();

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 4016: fix unicode warning (documentation build)

2017-03-08 Thread noreply

revno: 4016
committer: bchareyre 
timestamp: Wed 2017-03-08 13:27:22 +0100
message:
  fix unicode warning (documentation build)
modified:
  doc/sphinx/book/confBook.py
  doc/sphinx/book/confManual.py
  doc/sphinx/book/confReference.py
  doc/sphinx/book/confTheory.py
  doc/sphinx/conf.py


--
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/book/confBook.py'
--- doc/sphinx/book/confBook.py	2016-11-02 22:08:33 +
+++ doc/sphinx/book/confBook.py	2017-03-08 12:27:22 +
@@ -670,7 +670,7 @@
 
 # -- Options for LaTeX output --
 
-my_maketitle=r'''
+my_maketitle=u'''
 \begin{titlepage}
 
 \begin{flushright}

=== modified file 'doc/sphinx/book/confManual.py'
--- doc/sphinx/book/confManual.py	2016-11-02 22:08:33 +
+++ doc/sphinx/book/confManual.py	2017-03-08 12:27:22 +
@@ -661,7 +661,7 @@
 
 # -- Options for LaTeX output --
 
-my_maketitle=r'''
+my_maketitle=u'''
 \begin{titlepage}
 
 \begin{flushright}

=== modified file 'doc/sphinx/book/confReference.py'
--- doc/sphinx/book/confReference.py	2016-11-02 22:08:33 +
+++ doc/sphinx/book/confReference.py	2017-03-08 12:27:22 +
@@ -661,7 +661,7 @@
 
 # -- Options for LaTeX output --
 
-my_maketitle=r'''
+my_maketitle=u'''
 \begin{titlepage}
 
 \begin{flushright}

=== modified file 'doc/sphinx/book/confTheory.py'
--- doc/sphinx/book/confTheory.py	2016-11-02 22:08:33 +
+++ doc/sphinx/book/confTheory.py	2017-03-08 12:27:22 +
@@ -661,7 +661,7 @@
 
 # -- Options for LaTeX output --
 
-my_maketitle=r'''
+my_maketitle=u'''
 \begin{titlepage}
 
 \begin{flushright}

=== modified file 'doc/sphinx/conf.py'
--- doc/sphinx/conf.py	2016-11-02 22:08:33 +
+++ doc/sphinx/conf.py	2017-03-08 12:27:22 +
@@ -661,7 +661,7 @@
 
 # -- Options for LaTeX output --
 
-my_maketitle=r'''
+my_maketitle=u'''
 \begin{titlepage}
 
 \begin{flushright}

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 4015: fix an indentation problem in shinx document - hopefully fixing the buildbot

2017-03-08 Thread noreply

revno: 4015
committer: bchareyre 
timestamp: Wed 2017-03-08 13:27:22 +0100
message:
  fix an indentation problem in shinx document - hopefully fixing the buildbot
modified:
  doc/sphinx/amazonEC2.rst


--
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/amazonEC2.rst'
--- doc/sphinx/amazonEC2.rst	2017-02-23 11:21:46 +
+++ doc/sphinx/amazonEC2.rst	2017-03-08 12:27:22 +
@@ -5,7 +5,7 @@
 =
 
 .. role:: math(raw)
-   :format: html latex
+	:format: html latex
 
 (Note: we thank Robert Caulk for preparing and sharing this guide)
 
@@ -26,11 +26,10 @@
 
 .. _fig-console:
 .. figure:: fig/launchinstance.*
-   :scale: 60 %
-   :align: center
-   
-   Amazon Web Services (AWS) Console
+	:scale: 60 %
+	:align: center
 
+	Amazon Web Services (AWS) Console
 
 Start by signing into the console on `Amazon
 EC2 `__. This will require an
@@ -43,10 +42,10 @@
 
 .. _fig-ubuntu:
 .. figure:: fig/ubunut.*
-   :scale: 60 %
-   :align: center
-   
-   Select Ubuntu server 16.04 LTS AMI
+	:scale: 60 %
+	:align: center
+
+	Select Ubuntu server 16.04 LTS AMI
 
 You will now select the instance type. It is worth looking at the
 `specifications for each of the
@@ -65,10 +64,10 @@
 
 .. _fig-type:
 .. figure:: fig/instancetype.*
-   :scale: 60 %
-   :align: center
-
-Compute optimized (C3) instance tier
+	:scale: 60 %
+	:align: center
+
+	 Compute optimized (C3) instance tier
 
 
 Before launching, you will be asked to \`\`select an existing key pair
@@ -78,14 +77,14 @@
 
 ::
 
-chmod 400 KeyPair.pem
+	chmod 400 KeyPair.pem
 
 Now the instance is launched, you will need to connect to it via SSH. On
 unix systems this is as easy as typing:
 
 ::
 
-ssh -i path/to/KeyPair.pem ubu...@ec2-xx-xxx-xx-xx.us-west-2.compute.amazon.com
+	ssh -i path/to/KeyPair.pem ubu...@ec2-xx-xxx-xx-xx.us-west-2.compute.amazon.com
 
 into the terminal. There are other options such as using PuTTY, or even
 a java based terminal on the AWS website. You can find the necessary
@@ -96,10 +95,10 @@
 
 .. _fig-connect:
 .. figure:: fig/connect.*
-   :scale: 60 %
-   :align: center
-   
-   Connecting to the instance
+	:scale: 60 %
+	:align: center
+
+	Connecting to the instance
 
 You will be presented with the public DNS, which should look something
 like Fig. :ref:`fig-dns`.
@@ -107,10 +106,10 @@
 
 .. _fig-dns:
 .. figure:: fig/publicdns.*
-   :scale: 60 %
-   :align: center
-   
-   Public DNS
+	:scale: 100 %
+	:align: center
+
+	Public DNS
 
 
 Installing YADE and managing files
@@ -122,18 +121,18 @@
 
 ::
 
-#install yadedaily 
-sudo bash -c 'echo "deb http://www.yade-dem.org/packages/ xenial/" >> /etc/apt/sources.list'
-wget -O - http://www.yade-dem.org/packages/yadedev_pub.gpg | sudo apt-key add -
-sudo apt-get update
-sudo apt-get install -y yadedaily
-
-# install python 
-sudo apt-get -y install python
-sudo apt-get -y install python-pip python-dev build-essential
-
-# install htop
-sudo apt-get -y install htop
+	#install yadedaily 
+	sudo bash -c 'echo "deb http://www.yade-dem.org/packages/ xenial/" >> /etc/apt/sources.list'
+	wget -O - http://www.yade-dem.org/packages/yadedev_pub.gpg | sudo apt-key add -
+	sudo apt-get update
+	sudo apt-get install -y yadedaily
+
+	# install python 
+	sudo apt-get -y install python
+	sudo apt-get -y install python-pip python-dev build-essential
+
+	# install htop
+	sudo apt-get -y install htop
 
 | Note that \`\`..packages/ xenial/" should match the Ubuntu
 distribution. 16.04 LTS is Xenial, but if you chose to start Ubuntu
@@ -146,14 +145,14 @@
 
 ::
 
-scp -r -i path/to/KeyYADEbox.pem path/to/yadeSimulation ubu...@ec2-xx-xxx-xx-xx.us-west-2.compute.amazonaws.com:~/yadeSimulation
+	scp -r -i path/to/KeyYADEbox.pem path/to/yadeSimulation ubu...@ec2-xx-xxx-xx-xx.us-west-2.compute.amazonaws.com:~/yadeSimulation
 
 You should now be able to run your simulation by changing to the proper
 directory and typing:
 
 ::
 
-yadedaily nameOfSimulation.py 
+	yadedaily nameOfSimulation.py 
 
 In order to retrieve the output files (folder titled ‘out’ below) for
 post processing purposes, you will use the same command that you used to
@@ -162,7 +161,7 @@
 
 ::
 
-scp -r -i path/to/KeyYADEbox.pem ubu...@ec2-xx-xxx-xx-xx.us-west-2.compute.amazonaws.com:~/yadeSimulation/out/ path/to/yadeSimulation/out
+	scp -r -i path/to/KeyYADEbox.pem ubu...@ec2-xx-xxx-xx-xx.us-west-2.compute.amazonaws.com:~/yadeSimulation/out/ path/to/yadeSimulation/out
 
 Plotting output in the terminal
 ===
@@ -175,9 +174,9 @@
 
 ::
 
-gnuplot
-set terminal dumb
-plot 

[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 4011: +2 journal papers

2017-03-07 Thread noreply

revno: 4011
author: Bruno Chareyre 
committer: GitHub 
timestamp: Tue 2017-03-07 19:03:29 +0100
message:
  +2 journal papers
modified:
  doc/yade-articles.bib


--
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/yade-articles.bib'
--- doc/yade-articles.bib	2017-03-07 18:00:33 +
+++ doc/yade-articles.bib	2017-03-07 18:03:29 +
@@ -1051,6 +1051,23 @@
   note = {under review}
 }
 
+@article{Yuan2016,
+  title={Pore-scale simulations of drainage in granular materials: finite size effects and the representative elementary volume},
+  author={C. Yuan and B. Chareyre and F. Darve},
+  journal={Adv. in Water Ressources},
+  volume={95},
+  pages={109--124},
+  year={2016}
+}
+
+@article{Yuan2017,
+  title={A pore-scale method for hydromechanical coupling in deformable granular media},
+  author={C. Yuan and B. Chareyre},
+  journal={Computer Methods in Applied Mechanics and Engineering (in press)},
+  year={2017},
+  doi ={10.1016/j.cma.2017.02.024}
+}
+
 @ARTICLE{Zhao2015,
   author = {J. Zhao and N. Guo},
   title = {The interplay between anisotropy and strain localisation in granular soils: a multiscale insight},

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 4009: Fix https://bugs.launchpad.net/yade/+bug/1666339 (thx Robert)

2017-03-07 Thread noreply

revno: 4009
author: Bruno Chareyre 
committer: GitHub 
timestamp: Tue 2017-03-07 18:06:18 +0100
message:
  Fix https://bugs.launchpad.net/yade/+bug/1666339 (thx Robert)
modified:
  pkg/pfv/DFNFlow.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 'pkg/pfv/DFNFlow.cpp'
--- pkg/pfv/DFNFlow.cpp	2014-11-17 14:04:32 +
+++ pkg/pfv/DFNFlow.cpp	2017-03-07 17:06:18 +
@@ -170,11 +170,12 @@
 
 void DFNFlowEngine::trickPermeability(RTriangulation::Facet_circulator& facet, Real aperture, Real residualAperture)
 {
+	const RTriangulation::Facet& currentFacet = *facet; // seems verbose but facet->first was declaring a junk cell and crashing program (https://bugs.launchpad.net/yade/+bug/1666339)
 	const RTriangulation& Tri = solver->T[solver->currentTes].Triangulation();
-	const CellHandle& cell1 = facet->first;
-	const CellHandle& cell2 = facet->first->neighbor(facet->second);
+	const CellHandle& cell1 = currentFacet.first;
+	const CellHandle& cell2 = currentFacet.first->neighbor(facet->second);
 	if ( Tri.is_infinite(cell1) || Tri.is_infinite(cell2)) cerr<<"Infinite cell found in trickPermeability, should be handled somehow, maybe"<info().kNorm()[facet->second]=cell2->info().kNorm()[Tri.mirror_index(cell1, facet->second)] = pow((aperture+residualAperture),3)/(12*viscosity);
+	cell1->info().kNorm()[currentFacet.second]=cell2->info().kNorm()[Tri.mirror_index(cell1, currentFacet.second)] = pow((aperture+residualAperture),3)/(12*viscosity);
 	//For vtk recorder:
 	cell1->info().crack= 1;
 	cell2->info().crack= 1;

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 4008: add functions to get pore throat radius (by cells or spheres).

2017-03-07 Thread noreply

revno: 4008
committer: Chao Yuan 
timestamp: Tue 2017-03-07 11:48:59 +0100
message:
  add functions to get pore throat radius (by cells or spheres).
modified:
  pkg/pfv/TwoPhaseFlowEngine.cpp
  pkg/pfv/TwoPhaseFlowEngine.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/pfv/TwoPhaseFlowEngine.cpp'
--- pkg/pfv/TwoPhaseFlowEngine.cpp	2017-01-25 16:17:13 +
+++ pkg/pfv/TwoPhaseFlowEngine.cpp	2017-03-07 10:48:59 +
@@ -1122,6 +1122,163 @@
 	}
 }
 
+bool TwoPhaseFlowEngine::isCellNeighbor(unsigned int cell1, unsigned int cell2)
+{
+  bool neighbor=false;
+  for (unsigned int i=0;i<4;i++) {
+if (solver->T[solver->currentTes].cellHandles[cell1]->neighbor(i)->info().id==cell2)
+{neighbor=true;break;}
+  }
+  return neighbor;
+}
+
+void TwoPhaseFlowEngine::setPoreThroatRadius(unsigned int cell1, unsigned int cell2, double radius)
+{
+if (isCellNeighbor(cell1,cell2)==false) {
+cout<<"cell1 and cell2 are not neighbors."<T[solver->currentTes].cellHandles[cell1]->neighbor(i)->info().id==cell2)
+solver->T[solver->currentTes].cellHandles[cell1]->info().poreThroatRadius[i]=radius;}}
+}
+double TwoPhaseFlowEngine::getPoreThroatRadius(unsigned int cell1, unsigned int cell2)
+{
+double r =-1.;
+if (isCellNeighbor(cell1,cell2)==false) {
+cout<<"cell1 and cell2 are not neighbors."<T[solver->currentTes].cellHandles[cell1]->neighbor(i)->info().id==cell2)
+r = solver->T[solver->currentTes].cellHandles[cell1]->info().poreThroatRadius[i];}}
+return r;
+}
+
+compute entry pc independently
+double TwoPhaseFlowEngine::computeEffRcByPosRadius(const Vector3r& posA, const double& rA, const Vector3r& posB, const double& rB, const Vector3r& posC, const double& rC)
+{
+	CVector B = makeCgVect(posB - posA);
+	CVector x = B/sqrt(B.squared_length());
+	CVector C = makeCgVect(posC - posA);
+	CVector z = CGAL::cross_product(x,C);
+	CVector y = CGAL::cross_product(x,z);
+	y = y/sqrt(y.squared_length());
+
+	double b1[2]; b1[0] = B*x; b1[1] = B*y;
+	double c1[2]; c1[0] = C*x; c1[1] = C*y;
+
+	double A = ((pow(rA,2))*(1-c1[0]/b1[0])+((pow(rB,2)*c1[0])/b1[0])-pow(rC,2)+pow(c1[0],2)+pow(c1[1],2)-((pow(b1[0],2)+pow(b1[1],2))*c1[0]/b1[0]))/(2*c1[1]-2*b1[1]*c1[0]/b1[0]);
+	double BB = (rA-rC-((rA-rB)*c1[0]/b1[0]))/(c1[1]-b1[1]*c1[0]/b1[0]);
+	double CC = (pow(rA,2)-pow(rB,2)+pow(b1[0],2)+pow(b1[1],2))/(2*b1[0]);
+	double D = (rA-rB)/b1[0];
+	double E = b1[1]/b1[0];
+	double F = pow(CC,2)+pow(E,2)*pow(A,2)-2*CC*E*A;
+
+	double c = -F-pow(A,2)+pow(rA,2);
+	double b = 2*rA-2*(D-BB*E)*(CC-E*A)-2*A*BB;
+	double a = 1-pow((D-BB*E),2)-pow(BB,2);
+
+	if ((pow(b,2)-4*a*c)<0){cout << "NEGATIVE DETERMINANT" << endl; }
+	double reff = (-b+sqrt(pow(b,2)-4*a*c))/(2*a);
+	if (reff<0) return 0;//happens very rarely, with bounding spheres most probably
+	//if the facet involves one ore more bounding sphere, we return R with a minus sign
+// 	if (cell->vertex(facetVertices[j][2])->info().isFictious || cell->vertex(facetVertices[j][1])->info().isFictious || cell->vertex(facetVertices[j][2])->info().isFictious) return -reff;
+	else return reff;
+}
+double TwoPhaseFlowEngine::computeMSPRcByPosRadius(const Vector3r& posA, const double& rA, const Vector3r& posB, const double& rB, const Vector3r& posC, const double& rC)
+{
+// Vector3r pos[3]; //solid pos
+// double r[3]; //solid radius
+double e[3]; //edges of triangulation
+double g[3]; //gap radius between solid
+
+e[0] = (posB-posC).norm();
+e[1] = (posC-posA).norm();
+e[2] = (posB-posA).norm();
+g[0] = ((e[0]-rB-rC)>0) ? 0.5*(e[0]-rB-rC):0 ;
+g[1] = ((e[1]-rC-rA)>0) ? 0.5*(e[1]-rC-rA):0 ;
+g[2] = ((e[2]-rA-rB)>0) ? 0.5*(e[2]-rA-rB):0 ;
+
+double rmin= (std::max(g[0],std::max(g[1],g[2]))==0) ? 1.0e-10:std::max(g[0],std::max(g[1],g[2])) ;
+double rmax = std::abs(computeEffRcByPosRadius(posA, rA, posB, rB, posC, rC));
+// if(rmin>rmax) { cerr<<"WARNING! rmin>rmax. rmin="<[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 4007: Add dependency on python-pyqt5.qtsvg.


revno: 4007
committer: Anton Gladky 
timestamp: Tue 2017-02-28 21:56:41 +0100
message:
  Add dependency on python-pyqt5.qtsvg.
modified:
  doc/sphinx/installation.rst


--
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/installation.rst'
--- doc/sphinx/installation.rst	2017-02-23 11:21:46 +
+++ doc/sphinx/installation.rst	2017-02-28 20:56:41 +
@@ -144,7 +144,7 @@
 		libboost-all-dev fakeroot dpkg-dev build-essential g++ \
 		python-dev ipython python-matplotlib libsqlite3-dev python-numpy python-tk gnuplot \
 		libgts-dev python-pygraphviz libvtk6-dev python-numpy libeigen3-dev \
-		python-xlib python-pyqt5 pyqt5-dev-tools python-pyqt5.qtwebkit gtk2-engines-pixbuf python-argparse \
+		python-xlib python-pyqt5 pyqt5-dev-tools python-pyqt5.qtwebkit gtk2-engines-pixbuf python-argparse python-pyqt5.qtsvg\
 		libqglviewer-dev python-imaging libjs-jquery python-sphinx python-git python-bibtex \
 		libxmu-dev libxi-dev libcgal-dev help2man libbz2-dev zlib1g-dev python-minieigen
 		
@@ -319,4 +319,4 @@
 Cloud Computing
 
 
-It is possible to exploit cloud computing services to run Yade. The combo Yade/Amazon Web Service has been found to work well, namely. Detailed instructions for migrating to amazon can be found in the section :ref:`CloudComputing`.
\ No newline at end of file
+It is possible to exploit cloud computing services to run Yade. The combo Yade/Amazon Web Service has been found to work well, namely. Detailed instructions for migrating to amazon can be found in the section :ref:`CloudComputing`.

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 4006: Initialize gui in IPython 5.


revno: 4006
committer: Anton Gladky 
timestamp: Sat 2017-02-25 22:43:21 +0100
message:
  Initialize gui in IPython 5.
  
  Thanks Remi for investigation and Vaclav for the code in Woo.
modified:
  core/main/main.py.in


--
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 'core/main/main.py.in'
--- core/main/main.py.in	2016-12-10 20:21:52 +
+++ core/main/main.py.in	2017-02-25 21:43:21 +
@@ -205,7 +205,7 @@
 '"\e[A": history-search-backward', '"\e[B": history-search-forward', # incremental history forward/backward
 		]
 	)
-	
+
 	# show python console
 	# handle both ipython 0.10 and 0.11 (incompatible API)
 	if yade.runtime.ipython_version==10:
@@ -244,6 +244,9 @@
 		InteractiveShellEmbed.config=cfg
 		InteractiveShellEmbed.banner1=banner+'\n'
 		ipshell=InteractiveShellEmbed()
+		# If IPython > 5 one need to initialize graphic gui
+		if ((gui == "qt5" or gui == "qt4")and yade.runtime.ipython_version>=500):
+			ipshell.enable_gui(gui)
 		ipshell()
 
 ## run userSession in a way corresponding to the features we use:
@@ -261,7 +264,7 @@
 		# contrary to display.Display, _BaseDisplay does not check for extensions and that avoids spurious message "Xlib.protocol.request.QueryExtension" (bug?)
 		Xlib.display._BaseDisplay();
 		yade.runtime.hasDisplay=True
-	except: 
+	except:
 		# usually Xlib.error.DisplayError, but there can be Xlib.error.XauthError etc as well
 		# let's just pretend any exception means the display would not work
 		gui=None

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 4004: Robert Caulk's guide to cloud computing inserted in doc


revno: 4004
committer: bchareyre 
timestamp: Thu 2017-02-23 12:21:46 +0100
message:
  Robert Caulk's guide to cloud computing inserted in doc
added:
  doc/sphinx/amazonEC2.rst
  doc/sphinx/fig/connect.png
  doc/sphinx/fig/gnuplot.png
  doc/sphinx/fig/instancetype.png
  doc/sphinx/fig/launchinstance.png
  doc/sphinx/fig/publicdns.png
  doc/sphinx/fig/ubunut.png
modified:
  doc/sphinx/index-toctree.rst
  doc/sphinx/installation.rst


--
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
=== added file 'doc/sphinx/amazonEC2.rst'
--- doc/sphinx/amazonEC2.rst	1970-01-01 00:00:00 +
+++ doc/sphinx/amazonEC2.rst	2017-02-23 11:21:46 +
@@ -0,0 +1,214 @@
+.. _CloudComputing:
+
+=
+Using YADE with cloud computing on Amazon EC2
+=
+
+.. role:: math(raw)
+   :format: html latex
+
+(Note: we thank Robert Caulk for preparing and sharing this guide)
+
+Summary
+===
+
+This guide is intended to help YADE users migrate their simulations to
+Amazon Web Service (AWS) EC2. Two of the most notable benefits of using
+scalable cloud computing for YADE include decreased upfront cost and
+increased productivity. The entire process, from launching an instance,
+to installing YADE, to running a YADE simulation on the cloud can be
+executed in under 5 minutes. Once the EC2 instance is running, you can
+submit YADE scripts the same way you would submit jobs on a local
+workstation.
+
+Launching an EC2 instance
+=
+
+.. _fig-console:
+.. figure:: fig/launchinstance.*
+   :scale: 60 %
+   :align: center
+   
+   Amazon Web Services (AWS) Console
+
+
+Start by signing into the console on `Amazon
+EC2 `__. This will require an
+existing or new Amazon account. Once you’ve signed in, you should find
+the EC2 console by clicking on ‘services’ in the upper left hand corner
+of the AWS homepage. Start by clicking on the \`\`launch an instance“
+blue button (Fig. :ref:`fig-console`). Select the Amazon
+Machine Image (AMI): \`\`Ubuntu Server 16.04 LTS\`\` (Fig.
+:ref:`fig-ubuntu`).
+
+.. _fig-ubuntu:
+.. figure:: fig/ubunut.*
+   :scale: 60 %
+   :align: center
+   
+   Select Ubuntu server 16.04 LTS AMI
+
+You will now select the instance type. It is worth looking at the
+`specifications for each of the
+instances `__ so you can
+properly select the power you need for you YADE simulation. This
+document will not go into detail in the selection of size, but you can
+find plenty of `YADE specific performance
+reports `__ that
+will help you decide. However, the instance type is an important
+selection. The \`\`Compute Optimized" instances are necessary for most
+YADE simulations because they provide access to high performing
+processors and guaranteed computing power. The C3.2xlarge (Fig.
+:ref:`fig-type`) is equivalent to an 8 core 2.8ghz Xeon E5
+with 25 mb of cache, which is likely the best option for medium-large
+scale YADE simulations.
+
+.. _fig-type:
+.. figure:: fig/instancetype.*
+   :scale: 60 %
+   :align: center
+
+Compute optimized (C3) instance tier
+
+
+Before launching, you will be asked to \`\`select an existing key pair
+or create a new key pair". Create a new one, download it, and place it
+in a folder that you know the path to. Modify the permissions on the
+file by navigating to the same directory in the terminal and typing:
+
+::
+
+chmod 400 KeyPair.pem
+
+Now the instance is launched, you will need to connect to it via SSH. On
+unix systems this is as easy as typing:
+
+::
+
+ssh -i path/to/KeyPair.pem ubu...@ec2-xx-xxx-xx-xx.us-west-2.compute.amazon.com
+
+into the terminal. There are other options such as using PuTTY, or even
+a java based terminal on the AWS website. You can find the necessary
+information by navigating to \`\`Instances" in the left menu of the AWS
+console. Right click on the instance as shown in Fig.
+:ref:`fig-connect` and click connect.
+
+
+.. _fig-connect:
+.. figure:: fig/connect.*
+   :scale: 60 %
+   :align: center
+   
+   Connecting to the instance
+
+You will be presented with the public DNS, which should look something
+like Fig. :ref:`fig-dns`.
+
+
+.. _fig-dns:
+.. figure:: fig/publicdns.*
+   :scale: 60 %
+   :align: center
+   
+   Public DNS
+
+
+Installing YADE and managing files
+==
+
+After you’ve connected to the instance through SSH, you will need to
+install YADE. The following commands should be issued to install
+yadedaily, python, and some other useful tools:
+
+::
+
+#install yadedaily 
+sudo bash -c 

[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 4003: documentation on changing the boundary conditions in FlowEngine and derivatives


revno: 4003
committer: bchareyre 
timestamp: Tue 2017-02-21 15:12:30 +0100
message:
  documentation on changing the boundary conditions in FlowEngine and 
derivatives
modified:
  pkg/pfv/FlowEngine.hpp.in


--
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/pfv/FlowEngine.hpp.in'
--- pkg/pfv/FlowEngine.hpp.in	2016-11-17 15:32:26 +
+++ pkg/pfv/FlowEngine.hpp.in	2017-02-21 14:12:30 +
@@ -253,7 +253,7 @@
 		((double,pZero,0,,"The value used for initializing pore pressure. It is useless for incompressible fluid, but important for compressible model."))
 		((double,tolerance,1e-06,,"Gauss-Seidel tolerance"))
 		((double,relax,1.9,,"Gauss-Seidel relaxation"))
-		((bool, updateTriangulation, 0,,"If true the medium is retriangulated. Can be switched on to force retriangulation after some events (else it will be true periodicaly based on :yref:`FlowEngine::defTolerance` and :yref:`FlowEngine::meshUpdateInterval`. Of course, it costs CPU time."))
+		((bool, updateTriangulation, 0,,"If true the medium is retriangulated. Can be switched on to force retriangulation after some events (else it will be true periodicaly based on :yref:`FlowEngine::defTolerance` and :yref:`FlowEngine::meshUpdateInterval`. Of course, it costs CPU time. Note that the new triangulation will start to be effectively used only after one iteration (i.e. O.run(2) gives a result with the new one, O.run(1) does not)."))
 		((int,meshUpdateInterval,1000,,"Maximum number of timesteps between re-triangulation events. See also :yref:`FlowEngine::defTolerance`."))
 		((double, epsVolMax, 0,(Attr::readonly),"Maximal absolute volumetric strain computed at each iteration. |yupdate|"))
 		((double, defTolerance,0.05,,"Cumulated deformation threshold for which retriangulation of pore space is performed. If negative, the triangulation update will occure with a fixed frequency on the basis of :yref:`FlowEngine::meshUpdateInterval`"))
@@ -343,7 +343,7 @@
 		.def("getPorePressure",_@TEMPLATE_FLOW_NAME@::getPorePressure,(boost::python::arg("pos")),"Measure pore pressure in position pos[0],pos[1],pos[2]")
 		.def("averageSlicePressure",_@TEMPLATE_FLOW_NAME@::averageSlicePressure,(boost::python::arg("posY")),"Measure slice-averaged pore pressure at height posY")
 		.def("averagePressure",_@TEMPLATE_FLOW_NAME@::averagePressure,"Measure averaged pore pressure in the entire volume, the cells adjacent to the boundaries are ignored if includeBoundaries=False")
-		.def("updateBCs",_@TEMPLATE_FLOW_NAME@::updateBCs,"tells the engine to update it's boundary conditions before running (especially useful when changing boundary pressure - should not be needed for point-wise imposed pressure)")
+		.def("updateBCs",_@TEMPLATE_FLOW_NAME@::updateBCs,"Update the boundary condition to reflect changes of boundary pressure (needed typically after changing :yref:`FlowEngine::bndCondValue`). It is not sufficient to reflect changes of the type of boundary condition (:yref:`FlowEngine::bndCondIsPressure`), in such case re-triangulation is needed (see :yref:`FlowEngine::updateTriangulation`). Conversely, the update is not necessary for point-wise imposed pressure (:yref:`FlowEngine::imposePressure`)")
 		.def("emulateAction",_@TEMPLATE_FLOW_NAME@::emulateAction,"get scene and run action (may be used to manipulate an engine outside the timestepping loop).")
 		.def("getCell",_@TEMPLATE_FLOW_NAME@::getCell,(boost::python::arg("pos")),"get id of the cell containing (X,Y,Z).")
 		.def("getCellBarycenter",_@TEMPLATE_FLOW_NAME@::cellBarycenterFromId,(boost::python::arg("id")),"get barycenter of cell 'id'.")

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 4005: return a consistent set of constrictions in the periodic case (some constrictions were previsousl...


revno: 4005
committer: bchareyre 
timestamp: Thu 2017-02-23 15:14:02 +0100
message:
  return a consistent set of constrictions in the periodic case (some 
constrictions were previsously skipped inconsistenty)
modified:
  lib/triangulation/FlowBoundingSphere.ipp


--
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 'lib/triangulation/FlowBoundingSphere.ipp'
--- lib/triangulation/FlowBoundingSphere.ipp	2016-11-17 15:32:26 +
+++ lib/triangulation/FlowBoundingSphere.ipp	2017-02-23 14:14:02 +
@@ -663,10 +663,9 @@
 	RTriangulation& Tri = T[currentTes].Triangulation();
 	vector constrictions;
 	for (FiniteFacetsIterator f_it=Tri.finite_facets_begin(); f_it != Tri.finite_facets_end();f_it++){
-		//in the periodic case, we skip facets with lowest id out of the base period
-		if ( ((f_it->first->info().index <= f_it->first->neighbor(f_it->second)->info().index) && f_it->first->info().isGhost)
-		||  ((f_it->first->info().index >= f_it->first->neighbor(f_it->second)->info().index) && f_it->first->neighbor(f_it->second)->info().isGhost)
-		|| f_it->first->info().index == 0 || f_it->first->neighbor(f_it->second)->info().index == 0) continue;
+		//in the periodic case, we retain only the facets incident to at least one non-ghost cell 
+		if ( (f_it->first->neighbor(f_it->second)->info().isGhost && f_it->first->info().isGhost)
+		||  f_it->first->info().index == 0 || f_it->first->neighbor(f_it->second)->info().index == 0) continue;
 		constrictions.push_back(computeEffectiveRadius(f_it->first, f_it->second));
 	}
 	return constrictions;

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 4001: move PBC example scripts


revno: 4001
committer: bchareyre 
timestamp: Tue 2017-02-07 17:46:13 +0100
message:
  move PBC example scripts
added:
  examples/PeriodicBoundaries/
  examples/PeriodicBoundaries/cellFlipping.py
  examples/PeriodicBoundaries/peri3dController_example1.py
  examples/PeriodicBoundaries/peri3dController_shear.py
  examples/PeriodicBoundaries/peri3dController_triaxialCompression.py
  examples/PeriodicBoundaries/periodic-compress.py
  examples/PeriodicBoundaries/periodic-grow.py
  examples/PeriodicBoundaries/periodic-shear.py
  examples/PeriodicBoundaries/periodic-simple-shear.py
  examples/PeriodicBoundaries/periodic-simple.py
  examples/PeriodicBoundaries/periodic-triax-settingHsize.py
  examples/PeriodicBoundaries/periodic-triax.py
  examples/PeriodicBoundaries/periodicSandPile.py


--
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
=== added directory 'examples/PeriodicBoundaries'
=== added file 'examples/PeriodicBoundaries/cellFlipping.py'
--- examples/PeriodicBoundaries/cellFlipping.py	1970-01-01 00:00:00 +
+++ examples/PeriodicBoundaries/cellFlipping.py	2017-02-07 16:46:13 +
@@ -0,0 +1,48 @@
+# coding: utf-8
+# 2017 Bruno Chareyre 
+"Demonstrate cell flipping in periodic boundary conditions"
+from yade import pack,qt,plot
+
+O.periodic=True
+O.cell.Hsize=Matrix3(0.1,0,0, 0,0.1,0, 0,0,0.1)
+sp=pack.SpherePack()
+radius=5e-3
+num=sp.makeCloud((0,0,0),(.1,.1,.1),radius,.2,100,periodic=True)
+O.bodies.append([sphere(s[0],s[1]) for s in sp])
+
+
+O.engines=[
+	ForceResetter(),
+	InsertionSortCollider([Bo1_Sphere_Aabb()],verletDist=.05*radius),
+	InteractionLoop(
+		[Ig2_Sphere_Sphere_ScGeom()],
+		[Ip2_FrictMat_FrictMat_FrictPhys()],
+		[Law2_ScGeom_FrictPhys_CundallStrack()]
+	),	PeriTriaxController(dynCell=True,mass=0.2,maxUnbalanced=0.01,relStressTol=0.02,goal=[-1e4,-1e4,-1e4],stressMask=7,globUpdate=5,maxStrainRate=[1.,1.,1.],doneHook='triaxDone()',label='triax'),
+	NewtonIntegrator(damping=.2),
+]
+O.dt=2.e-5
+phase=0
+def triaxDone():
+	global phase
+	if phase==0:
+		print 'Here we are: stress',triax.stress,'strain',triax.strain,'stiffness',triax.stiff
+		print 'Now shearing.'
+		O.cell.velGrad=Matrix3(0,1,0, 0,0,0, 0,0,0)
+		triax.stressMask=7
+		triax.goal=[-1e4,-1e4,-1e4]
+		phase+=1
+		O.saveTmp()
+		O.pause()
+
+O.run(-1,True)
+
+def addPlotData():
+	plot.addData(t=O.time,gamma=O.cell.trsf[0,1], unb = unbalancedForce(),s=getStress()[0,1])
+O.engines=O.engines+[PyRunner(command='addPlotData()',iterPeriod=20)]
+plot.plots={'gamma':'unb'}
+plot.plot()
+
+O.engines=O.engines+[PyRunner(command='if O.cell.hSize[0,1]>O.cell.hSize[0,0]: flipCell()',iterPeriod=20)]
+
+#now click play and watch the flips happening, the evolution of stress or unbalanced force should not show any discontinuity
\ No newline at end of file

=== added file 'examples/PeriodicBoundaries/peri3dController_example1.py'
--- examples/PeriodicBoundaries/peri3dController_example1.py	1970-01-01 00:00:00 +
+++ examples/PeriodicBoundaries/peri3dController_example1.py	2017-02-07 16:46:13 +
@@ -0,0 +1,67 @@
+# peri3dController_example1.py
+# script, that explains funcionality and input parameters of Peri3dController
+
+from yade import pack, plot
+
+# create some material
+O.materials.append(CpmMat(neverDamage=True,young=25e9,frictionAngle=.7,poisson=.2,sigmaT=3e6,epsCrackOnset=1e-4,relDuctility=30))
+
+# create periodic assembly of particles
+initSize=1.2
+sp=pack.randomPeriPack(radius=.05,initSize=Vector3(initSize,initSize,initSize),memoizeDb='/tmp/packDb.sqlite')
+sp.toSimulation()
+
+# plotting 
+#plot.live=False
+plot.plots={'progress':('sx','sy','sz','syz','szx','sxy',),'progress_':('ex','ey','ez','eyz','ezx','exy',)}
+def plotAddData():
+	plot.addData(
+		progress=p3d.progress,progress_=p3d.progress,
+		sx=p3d.stress[0],sy=p3d.stress[1],sz=p3d.stress[2],
+		syz=p3d.stress[3],szx=p3d.stress[4],sxy=p3d.stress[5],
+		ex=p3d.strain[0],ey=p3d.strain[1],ez=p3d.strain[2],
+		eyz=p3d.strain[3],ezx=p3d.strain[4],exy=p3d.strain[5],
+	)
+
+# in how many time steps should be the goal state reached
+nSteps=4000
+
+O.dt=PWaveTimeStep()/2
+EnlargeFactor=1.5
+EnlargeFactor=1.0
+O.engines=[
+	ForceResetter(),
+	InsertionSortCollider([Bo1_Sphere_Aabb(aabbEnlargeFactor=EnlargeFactor,label='bo1s')]),
+	InteractionLoop(
+		[Ig2_Sphere_Sphere_ScGeom(interactionDetectionFactor=EnlargeFactor,label='ig2ss')],
+		[Ip2_CpmMat_CpmMat_CpmPhys()],[Law2_ScGeom_CpmPhys_Cpm()]),
+	NewtonIntegrator(),
+	Peri3dController(
+			goal=(20e-4,-6e-4,0, -2e6,3e-4,2e6), # Vector6 of prescribed final values (xx,yy,zz, yz,zx,xy)
+			stressMask=0b101100,# prescribed ex,ey,sz,syz,ezx,sxy;   e..strain;  s..stress
+			nSteps=nSteps, 			# how many 

[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 4002: cleaning examples


revno: 4002
committer: bchareyre 
timestamp: Tue 2017-02-07 17:46:13 +0100
message:
  cleaning examples
removed:
  examples/periodic-compress.py
  examples/periodic-grow.py
  examples/periodicSandPile.py
  examples/test/peri3dController_example1.py
  examples/test/peri3dController_shear.py
  examples/test/peri3dController_triaxialCompression.py
  examples/test/periodic-shear.py
  examples/test/periodic-simple-shear.py
  examples/test/periodic-simple.py
  examples/test/periodic-triax-settingHsize.py
  examples/test/periodic-triax.py


--
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
=== removed file 'examples/periodic-compress.py'
--- examples/periodic-compress.py	2013-03-28 10:53:06 +
+++ examples/periodic-compress.py	1970-01-01 00:00:00 +
@@ -1,48 +0,0 @@
-'''
-This example shows compression of a packing with a periodic cell.
-'''
-
-O.periodic=True
-O.cell.setBox(20,20,10)
-
-from yade import pack,timing
-
-O.materials.append(FrictMat(young=30e9,density=2400))
-p=pack.SpherePack()
-p.makeCloud(Vector3(0,0,0),Vector3(20,20,10),1,.5,700,True)
-for sph in p:
-	O.bodies.append(sphere(sph[0],sph[1]))
-
-
-O.timingEnabled=True
-O.engines=[
-	ForceResetter(),
-	InsertionSortCollider([Bo1_Sphere_Aabb()],allowBiggerThanPeriod=True),
-	InteractionLoop(
-		[Ig2_Sphere_Sphere_ScGeom()],
-		[Ip2_FrictMat_FrictMat_FrictPhys()],
-		[Law2_ScGeom_FrictPhys_CundallStrack()],
-	),
-	PeriIsoCompressor(charLen=.5,stresses=[-50e9,-1e8],doneHook="print 'FINISHED'; O.pause() ",keepProportions=True),
-	NewtonIntegrator(damping=.4)
-]
-O.dt=PWaveTimeStep()
-O.saveTmp()
-#print O.cell.refSize
-from yade import qt; qt.Controller(); qt.View()
-O.run()
-O.wait()
-timing.stats()
-#while True:
-#	O.step()
-
-
-# now take that packing and pad some larger volume with it
-#sp=pack.SpherePack()
-#sp.fromSimulation() # take spheres from simulation; cellSize is set as well
-#O.reset()
-#print sp.cellSize
-#sp.cellFill((30,30,30))
-#print sp.cellSize
-#for s in sp:
-#	O.bodies.append(sphere(s[0],s[1]))

=== removed file 'examples/periodic-grow.py'
--- examples/periodic-grow.py	2013-03-28 10:53:06 +
+++ examples/periodic-grow.py	1970-01-01 00:00:00 +
@@ -1,39 +0,0 @@
-"""Script that shrinks the periodic cell progressively.
-It prints strain and average stress (computed from total volume force)
-once in a while."""
-
-from yade import timing
-O.engines=[
-	ForceResetter(),
-	InsertionSortCollider([Bo1_Sphere_Aabb()],allowBiggerThanPeriod=True),
-	InteractionLoop(
-		[Ig2_Sphere_Sphere_ScGeom()],
-		[Ip2_FrictMat_FrictMat_FrictPhys()],
-		[Law2_ScGeom_FrictPhys_CundallStrack()],
-	),
-	NewtonIntegrator(damping=.6)
-]
-import random
-for i in xrange(250):
-	O.bodies.append(sphere(Vector3(10*random.random(),10*random.random(),10*random.random()),.5+random.random()))
-cubeSize=20
-# absolute positioning of the cell is not important
-O.periodic=True
-O.cell.setBox(cubeSize,cubeSize,cubeSize)
-O.dt=PWaveTimeStep()
-O.saveTmp()
-from yade import qt
-qt.Controller(); qt.View()
-O.run(200,True)
-rate=-1e-3*cubeSize/(O.dt*200)*Matrix3.Identity
-O.cell.velGrad=rate
-
-print 'Please be patient...'
-
-for i in range(0,25):
-	O.run(2000,True)
-	F,stiff=totalForceInVolume()
-	dim=O.cell.refSize; A=Vector3(dim[1]*dim[2],dim[0]*dim[2],dim[0]*dim[1])
-	avgStress=sum([F[i]/A[i] for i in 0,1,2])/3.
-	print 'strain',(cubeSize-dim[0])/cubeSize,'avg. stress ',avgStress,'unbalanced ',unbalancedForce()
-#O.timingEnabled=True; timing.reset(); O.run(20,True); timing.stats()

=== removed file 'examples/periodicSandPile.py'
--- examples/periodicSandPile.py	2013-08-01 05:04:49 +
+++ examples/periodicSandPile.py	1970-01-01 00:00:00 +
@@ -1,54 +0,0 @@
-#!/usr/bin/python
-# -*- coding: utf-8 -*-
-# © 2012 Bruno Chareyre 
-"""Script showing how large bodies can be combined with periodic boundary conditions using InsertioSortCollider::allowBiggerThanPeriod=True (1)."""
-
-from yade import pack
-from pylab import rand
-from yade import qt
-
-O.periodic=True
-length=0.4
-height=0.6
-width=0.2
-thickness=0.01
-
-O.cell.hSize=Matrix3(length, 0, 0,
-		 0 ,3.*height, 0,
-		0, 0, width)
-
-O.materials.append(FrictMat(density=1,young=1e5,poisson=0.3,frictionAngle=radians(30),label='boxMat'))
-lowBox = box( center=(length/2.0,height-thickness/2.0,width/2.0), extents=(length*1000.0,thickness/2.0,width*1000.0) ,fixed=True,wire=False)
-O.bodies.append(lowBox)
-
-radius=0.01
-O.materials.append(FrictMat(density=1000,young=1e4,poisson=0.3,frictionAngle=radians(30),label='sphereMat'))
-sp=pack.SpherePack()
-sp.makeCloud((0.*length,height+1.2*radius,0.25*width),(0.5*length,2*height-1.2*radius,0.75*width),-1,.2,2000,periodic=True)

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


revno: 4000
committer: bchareyre 
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 +
+++ doc/sphinx/formulation.rst	2017-02-07 16:46:13 +
@@ -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 ` (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 ` (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 +
+++ pkg/dem/Shop_01.cpp	2017-02-07 16:46:13 +
@@ -70,7 +70,8 @@
 
  	// adjust Interaction::cellDist for interactions;
 	Matrix3r invFlip = (Matrix3r::Identity() + flipFloat).inverse();
-	FOREACH(const shared_ptr& i, *scene->interactions) i->cellDist = (invFlip*(i->cellDist.cast())).cast();
+	// FIXME: is Matrix3i.cast().cast() 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& i, *scene->interactions) i->cellDist = invFlip.cast()*i->cellDist;
 
 	// force reinitialization of the collider
 	bool colliderFound=false;

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 3999: fix compile error


revno: 3999
committer: bchareyre 
timestamp: Mon 2017-02-06 19:51:44 +0100
message:
  fix compile error
modified:
  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 'pkg/dem/Shop_01.cpp'
--- pkg/dem/Shop_01.cpp	2017-02-06 17:54:41 +
+++ pkg/dem/Shop_01.cpp	2017-02-06 18:51:44 +
@@ -70,7 +70,7 @@
 
  	// adjust Interaction::cellDist for interactions;
 	Matrix3r invFlip = (Matrix3r::Identity() + flipFloat).inverse();
-	FOREACH(const shared_ptr& i, *scene->interactions) i->cellDist = invFlip*i->cellDist;
+	FOREACH(const shared_ptr& i, *scene->interactions) i->cellDist = (invFlip*(i->cellDist.cast())).cast();
 
 	// force reinitialization of the collider
 	bool colliderFound=false;

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 3998: fix the flipCell() function


revno: 3998
committer: bchareyre 
timestamp: Mon 2017-02-06 18:54:41 +0100
message:
  fix the flipCell() function
modified:
  pkg/dem/Shop_01.cpp
  py/_utils.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 'pkg/dem/Shop_01.cpp'
--- pkg/dem/Shop_01.cpp	2016-05-26 16:30:41 +
+++ pkg/dem/Shop_01.cpp	2017-02-06 17:54:41 +
@@ -48,63 +48,29 @@
 
 CREATE_LOGGER(Shop);
 
-/*! Flip periodic cell by given number of cells.
-
-Still broken, some interactions are missed. Should be checked.
-*/
-
+/*! Flip periodic cell for shearing indefinitely.*/
 Matrix3r Shop::flipCell(const Matrix3r& _flip){
-	Scene* scene=Omega::instance().getScene().get(); const shared_ptr& cell(scene->cell); const Matrix3r& trsf(cell->trsf);
-	Vector3r size=cell->getSize();
-	Matrix3r flip;
+	Scene* scene=Omega::instance().getScene().get(); const shared_ptr& cell(scene->cell);
+	Matrix3r& hSize = cell->hSize;
+	Matrix3i flip;
 	if(_flip==Matrix3r::Zero()){
 		bool hasNonzero=false;
 		for(int i=0; i<3; i++) for(int j=0; j<3; j++) {
 			if(i==j){ flip(i,j)=0; continue; }
-			flip(i,j)=-floor(.5+trsf(i,j)/(size[j]/size[i]));
+			flip(i,j)=-floor(hSize.col(j).dot(hSize.col(i))/hSize.col(i).dot(hSize.col(i)));
 			if(flip(i,j)!=0) hasNonzero=true;
 		}
 		if(!hasNonzero) {LOG_TRACE("No flip necessary."); return Matrix3r::Zero();}
-		LOG_DEBUG("Computed flip matrix: upper "<bodies->size());
-	FOREACH(const shared_ptr& b, *scene->bodies){
-		if(!b) continue; cell->wrapShearedPt(b->state->pos,oldCells[b->getId()]);
-	}
-
-	// change cell trsf here
-	Matrix3r trsfInc;
-	for(int i=0; i<3; i++) for(int j=0; j<3; j++){
-		if(i==j) { if(flip(i,j)!=0) LOG_WARN("Non-zero diagonal term at ["<trsf+=trsfInc;
+		flip=_flip.cast();
+	}
+	Matrix3r flipFloat = flip.cast();
+	cell->hSize+=cell->hSize*flipFloat;
 	cell->postLoad(*cell);
 
-	// new cell coords of bodies
-	vector newCells; newCells.resize(scene->bodies->size());
-	FOREACH(const shared_ptr& b, *scene->bodies){
-		if(!b) continue;
-		cell->wrapShearedPt(b->state->pos,newCells[b->getId()]);
-	}
-
-	// remove all potential interactions
-	scene->interactions->eraseNonReal();
-	// adjust Interaction::cellDist for real interactions;
-	FOREACH(const shared_ptr& i, *scene->interactions){
-		Body::id_t id1=i->getId1(),id2=i->getId2();
-		// this must be the same for both old and new interaction: cell2-cell1+cellDist
-		// c₂-c₁+c₁₂=k; c'₂+c₁'+c₁₂'=k   (new cell coords have ')
-		// c₁₂'=(c₂-c₁+c₁₂)-(c₂'-c₁')
-		i->cellDist=(oldCells[id2]-oldCells[id1]+i->cellDist)-(newCells[id2]-newCells[id1]);
-	}
-
+ 	// adjust Interaction::cellDist for interactions;
+	Matrix3r invFlip = (Matrix3r::Identity() + flipFloat).inverse();
+	FOREACH(const shared_ptr& i, *scene->interactions) i->cellDist = invFlip*i->cellDist;
 
 	// force reinitialization of the collider
 	bool colliderFound=false;
@@ -113,7 +79,7 @@
 		if(c){ colliderFound=true; c->invalidatePersistentData(); }
 	}
 	if(!colliderFound) LOG_WARN("No collider found while flipping cell; continuing simulation might give garbage results.");
-	return flip;
+	return flipFloat;
 }
 
 /* Apply force on contact point to 2 bodies; the force is oriented as it applies on the first body and is reversed on the second.

=== modified file 'py/_utils.cpp'
--- py/_utils.cpp	2016-10-18 13:46:31 +
+++ py/_utils.cpp	2017-02-06 17:54:41 +
@@ -487,7 +487,7 @@
 	py::def("wireAll",wireAll,"Set :yref:`Shape::wire` on all bodies to True, rendering them with wireframe only.");
 	py::def("wireNone",wireNone,"Set :yref:`Shape::wire` on all bodies to False, rendering them as solids.");
 	py::def("wireNoSpheres",wireNoSpheres,"Set :yref:`Shape::wire` to True on non-spherical bodies (:yref:`Facets`, :yref:`Walls`).");
-	py::def("flipCell",::flipCell,(py::arg("flip")=Matrix3r(Matrix3r::Zero())),"Flip periodic cell so that angles between $R^3$ axes and transformed axes are as small as possible. This function relies on the fact that periodic cell defines by repetition or its corners regular grid of points in $R^3$; however, all cells generating identical grid are equivalent and can be flipped one over another. This necessiatates adjustment of 

[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 3996: fix compile error.


revno: 3996
committer: Chao Yuan 
timestamp: Wed 2017-01-25 19:08:06 +0100
message:
  fix compile error.
modified:
  pkg/pfv/TwoPhaseFlowEngine.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/pfv/TwoPhaseFlowEngine.hpp'
--- pkg/pfv/TwoPhaseFlowEngine.hpp	2017-01-25 16:17:13 +
+++ pkg/pfv/TwoPhaseFlowEngine.hpp	2017-01-25 18:08:06 +
@@ -30,6 +30,7 @@
 	std::vector poreThroatRadius;
 	double poreBodyRadius;
 	double poreBodyVolume;
+	double porosity;
 	int windowsID;//a temp cell info for experiment comparison(used by chao)
 	double solidLine [4][4];//the length of intersecting line between sphere and facet. [i][j] is for facet "i" and sphere (facetVertices)"[i][j]". Last component [i][3] for 1/sumLines in the facet "i" (used by chao).
 	

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 3995: add porosity in cell info.


revno: 3995
committer: Chao Yuan 
timestamp: Wed 2017-01-25 17:17:13 +0100
message:
  add porosity in cell info.
modified:
  pkg/pfv/TwoPhaseFlowEngine.cpp
  pkg/pfv/TwoPhaseFlowEngine.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/pfv/TwoPhaseFlowEngine.cpp'
--- pkg/pfv/TwoPhaseFlowEngine.cpp	2016-12-19 16:47:50 +
+++ pkg/pfv/TwoPhaseFlowEngine.cpp	2017-01-25 16:17:13 +
@@ -38,7 +38,7 @@
 		else if(entryPressureMethod > 3){cout << endl << "ERROR - Method for determining the entry pressure does not exist";}
 		
 		computePoreBodyRadius();//save pore body radius before imbibition
-		computePoreBodyVolume();//save capillary volume of all cells, for fast calculating saturation
+		computePoreBodyVolume();//save capillary volume of all cells, for fast calculating saturation. Also save the porosity of each cell.
 		computeSolidLine();//save cell->info().solidLine[j][y]
 		initializeReservoirs();//initial pressure, reservoir flags and local pore saturation
 // 		if(isCellLabelActivated) updateReservoirLabel();
@@ -52,6 +52,7 @@
 FiniteCellsIterator cellEnd = tri.finite_cells_end();
 for (FiniteCellsIterator cell = tri.finite_cells_begin(); cell != cellEnd; cell++) {
 cell->info().poreBodyVolume = std::abs( cell->info().volume() ) - std::abs(solver->volumeSolidPore(cell));
+	cell->info().porosity = cell->info().poreBodyVolume/std::abs( cell->info().volume() );
 }
 }
 
@@ -369,6 +370,13 @@
 	}
 	vtkfile.end_data();
 
+	vtkfile.begin_data("Porosity",CELL_DATA,SCALARS,FLOAT);
+	for (FiniteCellsIterator cell = Tri.finite_cells_begin(); cell != Tri.finite_cells_end(); ++cell) {
+		bool isDrawable = cell->info().isReal() && cell->vertex(0)->info().isReal() && cell->vertex(1)->info().isReal() && cell->vertex(2)->info().isReal()  && cell->vertex(3)->info().isReal();
+		if (isDrawable){vtkfile.write_data(cell->info().porosity);}
+	}
+	vtkfile.end_data();
+
 	vtkfile.begin_data("Label",CELL_DATA,SCALARS,FLOAT);
 	for (FiniteCellsIterator cell = Tri.finite_cells_begin(); cell != Tri.finite_cells_end(); ++cell) {
 		bool isDrawable = cell->info().isReal() && cell->vertex(0)->info().isReal() && cell->vertex(1)->info().isReal() && cell->vertex(2)->info().isReal()  && cell->vertex(3)->info().isReal();

=== modified file 'pkg/pfv/TwoPhaseFlowEngine.hpp'
--- pkg/pfv/TwoPhaseFlowEngine.hpp	2016-12-20 12:45:40 +
+++ pkg/pfv/TwoPhaseFlowEngine.hpp	2017-01-25 16:17:13 +
@@ -46,6 +46,7 @@
 		windowsID = 0;
 		for (int k=0; k<4;k++) for (int l=0; l<4;l++) solidLine[k][l]=0;
 		label=-1;
+		porosity=0.;
 	}
 	
 };
@@ -210,6 +211,7 @@
 	CELL_SCALAR_GETTER(bool,.hasInterface,cellHasInterface) //Temporary function to allow for simulations in Python
 	CELL_SCALAR_GETTER(Real,.poreBodyRadius,cellInSphereRadius) //Temporary function to allow for simulations in Python	
 	CELL_SCALAR_GETTER(Real,.poreBodyVolume,cellVoidVolume) //Temporary function to allow for simulations in Python	
+	CELL_SCALAR_GETTER(Real,.porosity,cellPorosity)
 	CELL_SCALAR_SETTER(bool,.hasInterface,setCellHasInterface) //Temporary function to allow for simulations in Python
 	CELL_SCALAR_GETTER(int,.label,cellLabel)
 
@@ -249,6 +251,7 @@
 	.def("getCellHasInterface",::cellHasInterface,"indicates whether a NW-W interface is present within the cell")
 	.def("getCellInSphereRadius",::cellInSphereRadius,"get the radius of the inscribed sphere in a pore unit")
 	.def("getCellVoidVolume",::cellVoidVolume,"get the volume of pore space in each pore unit")
+	.def("getCellPorosity",::cellPorosity,"get the porosity of individual cells.")
 	.def("setCellHasInterface",::setCellHasInterface,"change wheter a cell has a NW-W interface")
 	.def("savePoreNetwork",::savePoreNetwork,"Extract the pore network of the granular material")
 	.def("getCellLabel",::cellLabel,"get cell label. 0 for NW-reservoir; 1 for W-reservoir; others for disconnected W-clusters.")

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 3993: HydroForceEngine: add an optional input parameter to account for convective acceleration


revno: 3993
committer: raphm1 
timestamp: Mon 2017-01-23 17:38:29 +0100
message:
  HydroForceEngine: add an optional input parameter to account for convective 
acceleration
  The input convective acceleration term take the form of a depth dependent 
vector
modified:
  pkg/common/ForceEngine.cpp
  pkg/common/ForceEngine.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/common/ForceEngine.cpp'
--- pkg/common/ForceEngine.cpp	2016-07-08 22:16:22 +
+++ pkg/common/ForceEngine.cpp	2017-01-23 16:38:29 +
@@ -97,6 +97,7 @@
 			if ((p=0)) {
 Vector3r liftForce = Vector3r::Zero();
 Vector3r dragForce = Vector3r::Zero();
+Vector3r convAccForce = Vector3r::Zero();
 Vector3r vRel = Vector3r(vxFluid[p]+vFluctX[id],vFluctY[id],vFluctZ[id]) -  b->state->vel;//fluid-particle relative velocity
 //Drag force calculation
 if (vRel.norm()!=0.0) {
@@ -111,8 +112,9 @@
 }
 //buoyant weight force calculation
 Vector3r buoyantForce = -4.0/3.0*Mathr::PI*pow(sphere->radius,3.0)*densFluid*gravity;
+if (convAccOption==true){convAccForce[0] = - convAcc[p];}
 //add the hydro forces to the particle
-scene->forces.addForce(id,dragForce+liftForce+buoyantForce);		
+scene->forces.addForce(id,dragForce+liftForce+buoyantForce+convAccForce);		
 			}
 		}
 	}

=== modified file 'pkg/common/ForceEngine.hpp'
--- pkg/common/ForceEngine.hpp	2016-07-08 22:16:22 +
+++ pkg/common/ForceEngine.hpp	2017-01-23 16:38:29 +
@@ -116,6 +116,8 @@
 		((vector,simplifiedReynoldStresses,,,"Vector of size equal to :yref:`nCell` containing the Reynolds stresses divided by the fluid density in function of the depth. simplifiedReynoldStresses(z) $=  (z)^2$"))
 		((Real,bedElevation,,,"Elevation of the bed above which the fluid flow is turbulent and the particles undergo turbulent velocity fluctuation."))
 		((vector,fluctTime,,,"Vector containing the time of life of the fluctuations associated to each particles."))
+		((vector,convAcc,0,,"Convective acceleration, depth dependent"))
+		((Real,convAccOption,false,,"To activate the convective acceleration"))
 		((Real,dtFluct,,,"Execution time step of the turbulent fluctuation model."))
 
 	,/*ctor*/

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 3994: yade-article.bib: add a journal paper


revno: 3994
committer: raphm1 
timestamp: Mon 2017-01-23 17:49:41 +0100
message:
  yade-article.bib: add a journal paper
modified:
  doc/yade-articles.bib


--
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/yade-articles.bib'
--- doc/yade-articles.bib	2016-11-21 22:58:59 +
+++ doc/yade-articles.bib	2017-01-23 16:49:41 +
@@ -601,6 +601,17 @@
doi = {10.1063/1.4935703}
 }
 
+@Article{Maurin2016,
+   author = {Maurin, R. and Chauchat, J. and Frey, P.},
+   title = {Dense granular flow rheology in turbulent bedload transport},
+   journal = {Journal of Fluid Mechanics},
+   year = {2016},
+   volume = {804},
+   pages = {490–512},
+   url = {https://arxiv.org/abs/1602.06712},
+   doi = {10.1017/jfm.2016.520}
+}
+
 @Article{Nicot2011,
   	author = {Nicot, F. and Hadda, N. and Bourrier, F. and Sibille, L. and Darve, F.},
   	title = {Failure mechanisms in granular media: a discrete element analysis},

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 3990: Add RELEASE file.


revno: 3990
committer: Anton Gladky 
timestamp: Thu 2017-01-19 22:23:17 +0100
message:
  Add RELEASE file.
added:
  RELEASE


--
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
=== added file 'RELEASE'
--- RELEASE	1970-01-01 00:00:00 +
+++ RELEASE	2017-01-19 21:23:17 +
@@ -0,0 +1,1 @@
+2017.01a

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 3989: Add missing header include


revno: 3989
committer: Anton Gladky 
timestamp: Thu 2017-01-19 19:11:51 +0100
message:
  Add missing header include 
  
  https://answers.launchpad.net/yade/+question/432848
modified:
  py/wrapper/yadeWrapper.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 'py/wrapper/yadeWrapper.cpp'
--- py/wrapper/yadeWrapper.cpp	2016-10-11 14:44:26 +
+++ py/wrapper/yadeWrapper.cpp	2017-01-19 18:11:51 +
@@ -39,6 +39,7 @@
 
 #include 
 #include 
+#include 
 
 namespace py = boost::python;
 

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 3991: Update changelog.


revno: 3991
tags: 2017.01a
committer: Anton Gladky 
timestamp: Thu 2017-01-19 22:23:17 +0100
message:
  Update changelog.
modified:
  ChangeLog


--
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 'ChangeLog'
--- ChangeLog	2016-06-14 18:37:57 +
+++ ChangeLog	2017-01-19 21:23:17 +
@@ -1,4 +1,112 @@
 ==
+yade-2017.01a
+Thu, Jan 19 22:07:25 2017 +0100
+Anton Gladky (20):
+  Remove RELEASE file.
+  Add some notes about how to make releases.
+  Make Yade compatible with VTK7.
+  Use C++11 constructions for InteractionLoop.
+  Optimize using of ndarray.
+  Partly fix webpage help show. LP:1598174
+  Final fix for LP:1598174
+  Add missing dependency on python-pyqt5.qtwebkit.
+  Fix load/save in GUI-QT5.
+  Drop unused typedef.
+  Disable LAW2_SCGEOM_CAPILLARYPHYS_Capillarity1 by default.
+  Remove some deprecated scripts.
+  Increase the size of force container.
+  +1 paper.
+  Provide a proper functioning with IPython5.
+  Add -fext-numeric-literals to fix FTBFS against boost_1.62
+  Fix yade with IPython5.
+  Update distro names in documentation
+  Add missing header include 
+  Add RELEASE file.
+
+Bruno Chareyre (12):
+  +2 articles (thanks to Bettina Suhr)
+  + 1 proceedings (thanks to Bettina Suhr)
+  Update citing_yade.bib
+  revert the revert ca0e29ac57
+  list authors of the doc as in doi:10.5281/zenodo.34073
+  a note on using distcc and ccache
+  minor editing of installation page
+  Master thesis Morales2012a
+  Introduce Network::surfaceSolidThroatInPore() for partial solid surfaces per half-throat
+  make the recursion conditional for invasion in multiphase flow
+  push a file missing in commit e91ff135b7
+  Yade bibtex: "and others" invalid for less than 9 authors
+
+Chao Yuan (4):
+  Add cell label for phase cluster. NW-res label 0, W-res label 1, disconnected w-clusters start from 2. label can be saved in savePhaseVtk.
+  fix comment on label.
+  clean UnsaturatedEngine, move all functions to TwoPhaseFlowEngine.
+  Revert DryingEngine.
+
+Francois Kneib (1):
+  Fix O.engines in examples/cylinders/cylinderconnection-roots.py
+
+Jan Stránský (11):
+  fixed a small bug in shear force computation in CPM model
+  Added PolyhedraSplitter example
+  Changed L3Geom to ScGeom in tutorial example scripts
+  fixed a minor compilation issue in ConcretePM
+  Fixed call of _utils.interactionAnglesHistogram with default arduments
+  making all Law2::go virtual
+  Matrix_computeUnitaryPositive, changed computeThinX to computeFullX flags
+  User's manual, added how to visualize force chain in Paraview
+  UnstructuredGrid: fiexd little bug in manual setting of facet position from vertices
+  added pack.inHalfSpace and pack.inConvexPolygon + example script
+  fixed another little bug in utils.UnstructuredGrid
+
+Jerome Duriez (11):
+  Doc clarification for TriaxialStressController.externalWork (http://www.mail-archive.com/yade-dev@lists.launchpad.net/msg12083.html)
+  Doc of utils.readParamsFromTable() hopefully improved
+  Friendlier BibTex entries for 2015 doc. To avoid Smilauer and et al in manuscripts
+  Doc Getting help section updated to reflect current practice
+  Including interface orientation data in CapillaryPhys code
+  Capillary scripts commit (http://www.mail-archive.com/yade-dev@lists.launchpad.net/msg12103.html). Located in a new examples/capillaryLaplaceYoung folder intended to illustrates capillary Law2. With one new simulation script example and another old one, moved here
+  Typo and minor corrections of previous capillary commit
+  Capillary law2: erasing when necessary sphere-non sphere interactions (bug LP: #1628273) + minor changes
+  Capillary law2: restricting test shape. Plus minor change in capillaryLaplaceYoung/README text file
+  Doc: small updates in PartialEngine and KinematicEngines
+  References .bib files: including new entries
+
+Raphael Maurin (4):
+  HydroForceEngine: add a condition to ignore particles fixed on the sideWalls.
+  Add an example for the use of HydroForceEngine
+  HydroForceEngine: new fluctuation model for the example script + small correction Add new simple discrete random walk fluctuation model, to be used with the new example script fluidizedBed.py Change the condition for applying the fluid force from p>0 to p>=0, which is more appropriate
+  Add two example scripts for the use of HydroForceEngine One simple example to get familiar with the application of buoyancy 

[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 3992: Remove RELEASE file.


revno: 3992
committer: Anton Gladky 
timestamp: Thu 2017-01-19 22:25:08 +0100
message:
  Remove RELEASE file.
removed:
  RELEASE


--
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
=== removed file 'RELEASE'
--- RELEASE	2017-01-19 21:23:17 +
+++ RELEASE	1970-01-01 00:00:00 +
@@ -1,1 +0,0 @@
-2017.01a

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 3988: Update distro names in documentation


revno: 3988
committer: Anton Gladky 
timestamp: Mon 2017-01-16 20:55:04 +0100
message:
  Update distro names in documentation
modified:
  doc/sphinx/installation.rst


--
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/installation.rst'
--- doc/sphinx/installation.rst	2016-10-20 12:41:32 +
+++ doc/sphinx/installation.rst	2017-01-16 19:55:04 +
@@ -19,13 +19,13 @@
 To install the daily-version you need to add the repository to your
 /etc/apt/sources.list, add the PGP-key AA915EEB as trusted and install ``yadedaily``::
 
-	sudo bash -c 'echo "deb http://www.yade-dem.org/packages/ trusty/" >> /etc/apt/sources.list'
+	sudo bash -c 'echo "deb http://www.yade-dem.org/packages/ xenial/" >> /etc/apt/sources.list'
 	wget -O - http://www.yade-dem.org/packages/yadedev_pub.gpg | sudo apt-key add -
 	sudo apt-get update
 	sudo apt-get install yadedaily
 
 If you have another distribution, not Ubuntu Trusty (Version 14.04 LTS), be sure to use the
-correct name in the first line (for instance, trusty, jessie or wheezy). For the list
+correct name in the first line (for instance, xenial, stretch or jessie). For the list
 of currently supported distributions, please visit `yade-dem.org/packages `_.
 
 After that you can normally start Yade using the command ``yadedaily`` or ``yadedaily-batch``.
@@ -33,7 +33,7 @@
 versions, shipped with particular distribution. 
 
 The Git-repository for packaging stuff is available on `GitHub `_. 
-Each branch corresponds to one distribution, e.g., trusty, jessie etc.
+Each branch corresponds to one distribution, e.g., xenial, stretch etc.
 The scripts for building all of this stuff are `here `__. 
 It uses "pbuilder" to build packages, so all packages are built in a clean environment.
 

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 3986: ViscoelasticPM : fix resolution problem in find_cn_from_en function


revno: 3986
committer: raphm1 
timestamp: Wed 2017-01-04 23:18:49 +0100
message:
  ViscoelasticPM : fix resolution problem in find_cn_from_en function
  Change the value of the initial perturbation for the resolution of the 
equation to obtain the damping from the restitution coefficient. Allows for a 
much wider range of resolution in terms of mass, stiffness and restitution 
coefficient.
  Put a limiter to avoid division by zero and force the loop to print the 
warning message if "error" goes to nan (no warning in these cases previously)
modified:
  pkg/dem/ViscoelasticPM.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 'pkg/dem/ViscoelasticPM.cpp'
--- pkg/dem/ViscoelasticPM.cpp	2015-12-16 06:39:37 +
+++ pkg/dem/ViscoelasticPM.cpp	2017-01-04 22:18:49 +
@@ -19,7 +19,7 @@
 /* ViscElPhys */
 ViscElPhys::~ViscElPhys(){}
 
-Real Ip2_ViscElMat_ViscElMat_ViscElPhys::epsilon = 1.0e-15;
+Real Ip2_ViscElMat_ViscElMat_ViscElPhys::epsilon = 1.0e-8;
 
 /* Ip2_ViscElMat_ViscElMat_ViscElPhys */
 void Ip2_ViscElMat_ViscElMat_ViscElPhys::go(const shared_ptr& b1, const shared_ptr& b2, const shared_ptr& interaction) {
@@ -291,13 +291,16 @@
 	Real en_temp=get_en_from_cn(cn,m ,kn);
 	int i =0;
 	Real error = 1.0/eps;
-	while (error > 1.0e-2){
+	while (error > 1.0e-2 or error!=error){
 		if(i>15){
+			cn = 0.;
+			en_temp = 1.;
 			cerr<<"Warning in ViscoelasticPM.cpp : Newton-Raphson algorithm did not converged within 15 iterations for contact between "[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 3985: 2PFLOW engine: remove useless int from getInterfaces()'s parameters


revno: 3985
committer: bchareyre 
timestamp: Tue 2016-12-20 13:45:40 +0100
message:
  2PFLOW engine: remove useless int from getInterfaces()'s parameters
modified:
  pkg/pfv/TwoPhaseFlowEngine.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/pfv/TwoPhaseFlowEngine.hpp'
--- pkg/pfv/TwoPhaseFlowEngine.hpp	2016-12-19 16:47:50 +
+++ pkg/pfv/TwoPhaseFlowEngine.hpp	2016-12-20 12:45:40 +
@@ -73,7 +73,7 @@
 			for (vector::iterator it =  pores.begin(); it!=pores.end(); it++) res.push_back((*it)->info().id);
 			return res;}
 			
-		boost::python::list getInterfaces(unsigned int clusterId){
+		boost::python::list getInterfaces(){
 			boost::python::list ints;
 			for (vector >::iterator it =  interfaces.begin(); it!=interfaces.end(); it++)
 ints.append(boost::python::make_tuple(it->first.first,it->first.second,it->second));

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 3984: further improvement of the cluster labeling in multiphase model


revno: 3984
committer: bchareyre 
timestamp: Mon 2016-12-19 17:47:50 +0100
message:
  further improvement of the cluster labeling in multiphase model
modified:
  pkg/pfv/TwoPhaseFlowEngine.cpp
  pkg/pfv/TwoPhaseFlowEngine.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/pfv/TwoPhaseFlowEngine.cpp'
--- pkg/pfv/TwoPhaseFlowEngine.cpp	2016-11-25 17:09:35 +
+++ pkg/pfv/TwoPhaseFlowEngine.cpp	2016-12-19 16:47:50 +
@@ -634,7 +634,10 @@
 
 void TwoPhaseFlowEngine::clusterGetFacet(PhaseCluster* cluster, CellHandle cell, int facet) {
 	cell->info().hasInterface = true;
-	cluster->interfacialArea += std::abs(cell->info().poreThroatRadius[facet]);//FIXME: define area correctly
+	double interfArea = sqrt((cell->info().facetSurfaces[facet]*cell->info().facetFluidSurfacesRatio[facet]).squared_length());
+	cluster->interfaces.push_back(std::pair(
+		std::pair(cell->info().id,cell->neighbor(facet)->info().id),interfArea));
+	cluster->interfacialArea += interfArea;
 	if (cluster->entryRadius < cell->info().poreThroatRadius[facet]){
 		cluster->entryRadius = cell->info().poreThroatRadius[facet];
 		cluster->entryPore = cell->info().id;}

=== modified file 'pkg/pfv/TwoPhaseFlowEngine.hpp'
--- pkg/pfv/TwoPhaseFlowEngine.hpp	2016-11-25 17:09:35 +
+++ pkg/pfv/TwoPhaseFlowEngine.hpp	2016-12-19 16:47:50 +
@@ -66,12 +66,20 @@
 	public :
 		virtual ~PhaseCluster();
 		vector pores;
+		vector > interfaces;
 		TwoPhaseFlowEngineT::RTriangulation* tri;
-		void reset() {label=entryPore=-1;volume=entryRadius=interfacialArea=0; pores.clear();}
+		void reset() {label=entryPore=-1;volume=entryRadius=interfacialArea=0; pores.clear(); interfaces.clear();}
 		vector getPores() { vector res;
 			for (vector::iterator it =  pores.begin(); it!=pores.end(); it++) res.push_back((*it)->info().id);
 			return res;}
-		
+			
+		boost::python::list getInterfaces(unsigned int clusterId){
+			boost::python::list ints;
+			for (vector >::iterator it =  interfaces.begin(); it!=interfaces.end(); it++)
+ints.append(boost::python::make_tuple(it->first.first,it->first.second,it->second));
+			return ints;
+		}
+
 		YADE_CLASS_BASE_DOC_ATTRS_INIT_CTOR_PY(PhaseCluster,Serializable,"Preliminary.",
 		((int,label,-1,,"Unique label of this cluster, should be reflected in pores of this cluster."))
 		((double,volume,0,,"cumulated volume of all pores."))
@@ -80,6 +88,7 @@
 		((double,interfacialArea,0,,"interfacial area of the cluster"))
 		,,,
 		.def("getPores",::getPores,"get the list of pores by index")
+		.def("getInterfaces",::getInterfaces,"get the list of interfacial pore-throats associated to a cluster, listed as [id1,id2,area] where id2 is the neighbor pore outside the cluster.")
 		)
 };
 REGISTER_SERIALIZABLE(PhaseCluster);

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 3983: Fix yade with IPython5.


revno: 3983
committer: Anton Gladky 
timestamp: Sat 2016-12-10 21:21:52 +0100
message:
  Fix yade with IPython5.
modified:
  core/main/main.py.in


--
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 'core/main/main.py.in'
--- core/main/main.py.in	2015-08-28 19:31:57 +
+++ core/main/main.py.in	2016-12-10 20:21:52 +
@@ -228,9 +228,14 @@
 			from IPython.terminal.embed import InteractiveShellEmbed
 		else:
 			from IPython.frontend.terminal.embed import InteractiveShellEmbed
-		from IPython.config.loader import Config
-		cfg = Config()
-		prompt_config = cfg.PromptManager
+		if yade.runtime.ipython_version>=500:
+			from traitlets.config.loader import Config
+			cfg = Config()
+			prompt_config = cfg.TerminalInteractiveShell.prompts_class
+		else:
+			from IPython.config.loader import Config
+			cfg = Config()
+			prompt_config = cfg.PromptManager
 		prompt_config.in_template = ipconfig['prompt_in1']
 		prompt_config.in2_template = ipconfig['prompt_in2']
 		prompt_config.out_template = ipconfig['prompt_out']

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 3982: Add -fext-numeric-literals to fix FTBFS against boost_1.62


revno: 3982
committer: Anton Gladky 
timestamp: Sat 2016-12-03 12:19:23 +0100
message:
  Add -fext-numeric-literals to fix FTBFS against boost_1.62
  
  Debian bug #845742: https://bugs.debian.org/845742
modified:
  CMakeLists.txt


--
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 'CMakeLists.txt'
--- CMakeLists.txt	2016-09-25 08:55:02 +
+++ CMakeLists.txt	2016-12-03 11:19:23 +
@@ -73,7 +73,7 @@
   ENDIF()
 ENDIF()
 
-SET(CMAKE_CXX_FLAGS  "${CMAKE_CXX_FLAGS} -fPIC -O2 --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -Wall -std=c++11 ")
+SET(CMAKE_CXX_FLAGS  "${CMAKE_CXX_FLAGS} -fPIC -O2 --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -Wall -std=c++11 -fext-numeric-literals")
 
 IF (DEBUG)
   SET(CMAKE_VERBOSE_MAKEFILE 1)

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 3980: small optimization in Clump::updateProperties


revno: 3980
committer: bchareyre 
timestamp: Fri 2016-11-25 18:08:12 +0100
message:
  small optimization in Clump::updateProperties
modified:
  core/Clump.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 'core/Clump.cpp'
--- core/Clump.cpp	2016-10-11 14:44:26 +
+++ core/Clump.cpp	2016-11-25 17:08:12 +
@@ -144,17 +144,18 @@
 	(some parts copied from woo: http://bazaar.launchpad.net/~eudoxos/woo/trunk/view/head:/pkg/dem/Clump.cpp)
 	*/
 	if(intersecting){	
-		//get boundaries and minimum radius of clump:
-		Real rMin=1./0.; AlignedBox3r aabb;
+		//get boundaries of clump:
+		AlignedBox3r aabb;
 		FOREACH(MemberMap::value_type& mm, clump->members){
 			const shared_ptr subBody = Body::byId(mm.first);
 			if (subBody->shape->getClassIndex() == Sph_Index){//clump member should be a sphere
 const Sphere* sphere = YADE_CAST (subBody->shape.get());
 aabb.extend(subBody->state->pos + Vector3r::Constant(sphere->radius));
 aabb.extend(subBody->state->pos - Vector3r::Constant(sphere->radius));
-rMin=min(rMin,sphere->radius);
 			}
 		}
+		Real rMin=min(aabb.diagonal()[0],min(aabb.diagonal()[1],aabb.diagonal()[2])); 
+		
 		//get volume and inertia tensor using regular cubic cell array inside bounding box of the clump:
 		Real dx = rMin/discretization; 	//edge length of cell
 		Real dv = pow(dx,3);		//volume of cell
@@ -182,8 +183,7 @@
 }
 			}
 		}
-	}
-	if(!intersecting){
+	} else {//not intersecting
 		FOREACH(MemberMap::value_type& mm, clump->members){
 			// mm.first is Body::id_t, mm.second is Se3r of that body
 			const shared_ptr subBody=Body::byId(mm.first);

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 3981: update phaseCluster attributes: volume, interfacial area, etc. + various smallfixes in the cluste...


revno: 3981
committer: bchareyre 
timestamp: Fri 2016-11-25 18:09:35 +0100
message:
  update phaseCluster attributes: volume, interfacial area, etc. + various 
smallfixes in the cluster labelling
modified:
  pkg/pfv/TwoPhaseFlowEngine.cpp
  pkg/pfv/TwoPhaseFlowEngine.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/pfv/TwoPhaseFlowEngine.cpp'
--- pkg/pfv/TwoPhaseFlowEngine.cpp	2016-11-23 14:35:05 +
+++ pkg/pfv/TwoPhaseFlowEngine.cpp	2016-11-25 17:09:35 +
@@ -41,7 +41,7 @@
 		computePoreBodyVolume();//save capillary volume of all cells, for fast calculating saturation
 		computeSolidLine();//save cell->info().solidLine[j][y]
 		initializeReservoirs();//initial pressure, reservoir flags and local pore saturation
-		if(isCellLabelActivated) updateReservoirLabel();
+// 		if(isCellLabelActivated) updateReservoirLabel();
 		solver->noCache = true;
 }
 
@@ -619,12 +619,13 @@
 
 void TwoPhaseFlowEngine:: updateReservoirLabel()
 {
+clusters[0]->reset(); clusters[0]->label=0;
+clusters[1]->reset(); clusters[1]->label=1;
 RTriangulation& tri = solver->T[solver->currentTes].Triangulation();
-FiniteCellsIterator cellEnd = tri.finite_cells_end();
-clusters[0]->reset(); clusters[1]->reset(); 
+FiniteCellsIterator cellEnd = tri.finite_cells_end(); 
 for ( FiniteCellsIterator cell = tri.finite_cells_begin(); cell != cellEnd; cell++ ) {
-  if (cell->info().isNWRes) {cell->info().label=0; clusters[0]->pores.push_back(cell);}
-  else if (cell->info().isWRes) {cell->info().label=1; clusters[1]->pores.push_back(cell);
+  if (cell->info().isNWRes) clusterGetPore(clusters[0].get(),cell);
+  else if (cell->info().isWRes) { clusterGetPore(clusters[1].get(),cell);
 	  for (int facet = 0; facet < 4; facet ++) if (!cell->neighbor(facet)->info().isWRes) clusterGetFacet(clusters[1].get(),cell,facet);}
   else if (cell->info().label>1) continue;
   else cell->info().label=-1;
@@ -633,43 +634,52 @@
 
 void TwoPhaseFlowEngine::clusterGetFacet(PhaseCluster* cluster, CellHandle cell, int facet) {
 	cell->info().hasInterface = true;
-	cluster->interfacialArea += cell->info().poreThroatRadius[facet];//FIXME: define area correctly
+	cluster->interfacialArea += std::abs(cell->info().poreThroatRadius[facet]);//FIXME: define area correctly
 	if (cluster->entryRadius < cell->info().poreThroatRadius[facet]){
 		cluster->entryRadius = cell->info().poreThroatRadius[facet];
-		cluster->entryPore = cell->info().index;
-	}
-}
+		cluster->entryPore = cell->info().id;}
+}
+
+void TwoPhaseFlowEngine::clusterGetPore(PhaseCluster* cluster, CellHandle cell) {
+	cell->info().label=cluster->label;
+	cluster->volume+=cell->info().poreBodyVolume;
+	cluster->pores.push_back(cell);
+}
+// int TwoPhaseFlowEngine:: getMaxCellLabel()
+// {
+// int maxLabel=-1;
+// RTriangulation& tri = solver->T[solver->currentTes].Triangulation();
+// FiniteCellsIterator cellEnd = tri.finite_cells_end();
+// for ( FiniteCellsIterator cell = tri.finite_cells_begin(); cell != cellEnd; cell++ ) {
+// if (cell->info().label>maxLabel) maxLabel=cell->info().label;
+// }
+// return maxLabel;
+// }
 
 void TwoPhaseFlowEngine::updateCellLabel()
 {
-int currentLabel = getMaxCellLabel();//FIXME: A loop on cells for each new label?? is it serious??
+// int currentLabel = getMaxCellLabel();//FIXME: A loop on cells for each new label?? is it serious??
 updateReservoirLabel();
+int currentLabel = clusters.size();
 RTriangulation& tri = solver->T[solver->currentTes].Triangulation();
 FiniteCellsIterator cellEnd = tri.finite_cells_end();
 for ( FiniteCellsIterator cell = tri.finite_cells_begin(); cell != cellEnd; cell++ ) {
 if (cell->info().label==-1) {
-	clusters.push_back(shared_ptr (new PhaseCluster()));
-	updateSingleCellLabelRecursion(cell,currentLabel+1,clusters.back().get());
+	shared_ptr clst (new PhaseCluster());
+	clst->label=currentLabel;
+	clusters.push_back(clst);
+	updateSingleCellLabelRecursion(cell,clusters.back().get());
 currentLabel++;
 }
 }
 }
 
-int TwoPhaseFlowEngine:: getMaxCellLabel()
-{
-int maxLabel=-1;
-RTriangulation& tri = solver->T[solver->currentTes].Triangulation();
-FiniteCellsIterator cellEnd = tri.finite_cells_end();
-for ( FiniteCellsIterator cell = tri.finite_cells_begin(); cell != cellEnd; cell++ ) {
-if (cell->info().label>maxLabel) maxLabel=cell->info().label;
-}
-return maxLabel;
-}
-
-void TwoPhaseFlowEngine::updateSingleCellLabelRecursion(CellHandle cell, int label, PhaseCluster* cluster)
-{
-cell->info().label=label;
-

[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 3979: fix compile warnings


revno: 3979
committer: bchareyre 
timestamp: Fri 2016-11-25 18:06:34 +0100
message:
  fix compile warnings
modified:
  pkg/dem/STLImporter.hpp
  pkg/dem/deformablecohesive/DeformableCohesiveElement.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/STLImporter.hpp'
--- pkg/dem/STLImporter.hpp	2015-05-28 18:32:30 +
+++ pkg/dem/STLImporter.hpp	2016-11-25 17:06:34 +
@@ -122,17 +122,18 @@
   set > egs;
 
   /* Read a single facet from an ASCII .STL file */
+  int r=0; //just to escape "warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)',"
   while(!feof(fp))
   {
 float n[3];
 Vrtx v[3];
-fscanf(fp, "%*s %*s %f %f %f\n", [0], [1], [2]);
-fscanf(fp, "%*s %*s");
-fscanf(fp, "%*s %f %f %f\n", [0][0],  [0][1],  [0][2]);
-fscanf(fp, "%*s %f %f %f\n", [1][0],  [1][1],  [1][2]);
-fscanf(fp, "%*s %f %f %f\n", [2][0],  [2][1],  [2][2]);
-fscanf(fp, "%*s"); // end loop
-fscanf(fp, "%*s"); // end facet
+r=fscanf(fp, "%*s %*s %f %f %f\n", [0], [1], [2]);
+r+=fscanf(fp, "%*s %*s");
+r+=fscanf(fp, "%*s %f %f %f\n", [0][0],  [0][1],  [0][2]);
+r+=fscanf(fp, "%*s %f %f %f\n", [1][0],  [1][1],  [1][2]);
+r+=fscanf(fp, "%*s %f %f %f\n", [2][0],  [2][1],  [2][2]);
+r+=fscanf(fp, "%*s"); // end loop
+r+=fscanf(fp, "%*s"); // end facet
 if(feof(fp)) break;
   
 int vid[3];
@@ -170,7 +171,7 @@
 (edges++) = it->first;
 (edges++) = it->second;
   }
-  return true;
+  return (r>0);
 }
 
 template

=== modified file 'pkg/dem/deformablecohesive/DeformableCohesiveElement.hpp'
--- pkg/dem/deformablecohesive/DeformableCohesiveElement.hpp	2016-01-07 17:49:32 +
+++ pkg/dem/deformablecohesive/DeformableCohesiveElement.hpp	2016-11-25 17:06:34 +
@@ -46,6 +46,8 @@
 if (node1.get() > param.node1.get()) return false;
 if (node2.get() < param.node2.get()) return true;
 if (node2.get() > param.node2.get()) return false;
+LOG_ERROR("Incomplete 'if' sequence");
+return false;
 }
 			};
 

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 3978: merging PhaseCluster code with r3975


revno: 3978
committer: bchareyre 
timestamp: Wed 2016-11-23 15:35:05 +0100
message:
  merging PhaseCluster code with r3975
modified:
  pkg/pfv/TwoPhaseFlowEngine.cpp
  pkg/pfv/TwoPhaseFlowEngine.hpp
  pkg/pfv/UnsaturatedEngine.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 'pkg/pfv/TwoPhaseFlowEngine.cpp'
--- pkg/pfv/TwoPhaseFlowEngine.cpp	2016-11-23 10:43:14 +
+++ pkg/pfv/TwoPhaseFlowEngine.cpp	2016-11-23 14:35:05 +
@@ -17,6 +17,9 @@
 #ifdef TWOPHASEFLOW
 YADE_PLUGIN((TwoPhaseFlowEngineT));
 YADE_PLUGIN((TwoPhaseFlowEngine));
+YADE_PLUGIN((PhaseCluster));
+
+PhaseCluster::~PhaseCluster(){}
 
 void TwoPhaseFlowEngine::initialization()
 {
@@ -618,24 +621,35 @@
 {
 RTriangulation& tri = solver->T[solver->currentTes].Triangulation();
 FiniteCellsIterator cellEnd = tri.finite_cells_end();
+clusters[0]->reset(); clusters[1]->reset(); 
 for ( FiniteCellsIterator cell = tri.finite_cells_begin(); cell != cellEnd; cell++ ) {
-  if (cell->info().isNWRes) cell->info().label=0;
-  else if (cell->info().isWRes) cell->info().label=1;
+  if (cell->info().isNWRes) {cell->info().label=0; clusters[0]->pores.push_back(cell);}
+  else if (cell->info().isWRes) {cell->info().label=1; clusters[1]->pores.push_back(cell);
+	  for (int facet = 0; facet < 4; facet ++) if (!cell->neighbor(facet)->info().isWRes) clusterGetFacet(clusters[1].get(),cell,facet);}
   else if (cell->info().label>1) continue;
   else cell->info().label=-1;
 }
 }
 
-void TwoPhaseFlowEngine:: updateCellLabel()
+void TwoPhaseFlowEngine::clusterGetFacet(PhaseCluster* cluster, CellHandle cell, int facet) {
+	cell->info().hasInterface = true;
+	cluster->interfacialArea += cell->info().poreThroatRadius[facet];//FIXME: define area correctly
+	if (cluster->entryRadius < cell->info().poreThroatRadius[facet]){
+		cluster->entryRadius = cell->info().poreThroatRadius[facet];
+		cluster->entryPore = cell->info().index;
+	}
+}
+
+void TwoPhaseFlowEngine::updateCellLabel()
 {
-int currentLabel = getMaxCellLabel();
+int currentLabel = getMaxCellLabel();//FIXME: A loop on cells for each new label?? is it serious??
 updateReservoirLabel();
 RTriangulation& tri = solver->T[solver->currentTes].Triangulation();
 FiniteCellsIterator cellEnd = tri.finite_cells_end();
 for ( FiniteCellsIterator cell = tri.finite_cells_begin(); cell != cellEnd; cell++ ) {
 if (cell->info().label==-1) {
-	clusters.push_back(shared_ptr(new PhaseCluster));
-	updateSingleCellLabelRecursion(cell,currentLabel+1,clusters.back()->pores);
+	clusters.push_back(shared_ptr (new PhaseCluster()));
+	updateSingleCellLabelRecursion(cell,currentLabel+1,clusters.back().get());
 currentLabel++;
 }
 }
@@ -652,10 +666,10 @@
 return maxLabel;
 }
 
-void TwoPhaseFlowEngine:: updateSingleCellLabelRecursion(CellHandle cell, int label, std::vector *outputVector)
+void TwoPhaseFlowEngine::updateSingleCellLabelRecursion(CellHandle cell, int label, PhaseCluster* cluster)
 {
 cell->info().label=label;
-if (outputVector) outputVector->push_back(cell);
+cluster->pores.push_back(cell);
 for (int facet = 0; facet < 4; facet ++) {
 CellHandle nCell = cell->neighbor(facet);
 if (solver->T[solver->currentTes].Triangulation().is_infinite(nCell)) continue;
@@ -663,7 +677,10 @@
 // if ( (nCell->info().isFictious) && (!isInvadeBoundary) ) continue;
 //TODO:the following condition may relax to relate to nCell->info().hasInterface
 if ( (nCell->info().saturation==cell->info().saturation) && (nCell->info().label!=cell->info().label) )
-updateSingleCellLabelRecursion(nCell,label,outputVector);
+		updateSingleCellLabelRecursion(nCell,label,cluster);
+	else {
+		clusterGetFacet(cluster,cell,facet);
+	}
 }
 }
 

=== modified file 'pkg/pfv/TwoPhaseFlowEngine.hpp'
--- pkg/pfv/TwoPhaseFlowEngine.hpp	2016-11-23 10:43:14 +
+++ pkg/pfv/TwoPhaseFlowEngine.hpp	2016-11-23 14:35:05 +
@@ -62,22 +62,23 @@
 class PhaseCluster : public Serializable
 {
 		double totalCellVolume;
+// 		CellHandle entryPoreHandle;
 	public :
 		virtual ~PhaseCluster();
-		vector* pores;
+		vector pores;
 		TwoPhaseFlowEngineT::RTriangulation* tri;
+		void reset() {label=entryPore=-1;volume=entryRadius=interfacialArea=0; pores.clear();}
+		
 		YADE_CLASS_BASE_DOC_ATTRS_INIT_CTOR_PY(PhaseCluster,Serializable,"Preliminary.",
 		((int,label,-1,,"Unique label of this cluster, should be reflected in pores of this cluster."))
 		((double,volume,0,,"cumulated volume of all pores."))
-		((double,entryPc,0,,"smallest entry capillary pressure."))
-		((int,entryPore,0,,"the pore of the 

[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 3977: TwoPhaseFlowEngine: better integration of fluid clusters


revno: 3977
committer: bchareyre 
timestamp: Wed 2016-11-23 11:43:14 +0100
message:
  TwoPhaseFlowEngine: better integration of fluid clusters
modified:
  pkg/pfv/TwoPhaseFlowEngine.cpp
  pkg/pfv/TwoPhaseFlowEngine.hpp
  pkg/pfv/UnsaturatedEngine.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 'pkg/pfv/TwoPhaseFlowEngine.cpp'
--- pkg/pfv/TwoPhaseFlowEngine.cpp	2016-11-22 17:29:15 +
+++ pkg/pfv/TwoPhaseFlowEngine.cpp	2016-11-23 10:43:14 +
@@ -125,47 +125,12 @@
 	r3 = sqrt(cell -> vertex(3) -> point().weight());	
 	
 	//Fill coefficient matrix
-	M(0,0) = 0.0;
-	M(1,0) = d01;
-	M(2,0) = d02;
-	M(3,0) = d03;
-	M(4,0) = pow((r0+Rin),2);
-	M(5,0) = 1.0;
-	
-	M(0,1) = d01;
-	M(1,1) = 0.0;
-	M(2,1) = d12;
-	M(3,1) = d13;
-	M(4,1) = pow((r1+Rin),2);
-	M(5,1) = 1.0;
-	
-	M(0,2) = d02; 
-	M(1,2) = d12;
-	M(2,2) = 0.0;
-	M(3,2) = d23;
-	M(4,2) = pow((r2+Rin),2);
-	M(5,2) = 1.0;
-	
-	M(0,3) = d03;
-	M(1,3) = d13;
-	M(2,3) = d23;
-	M(3,3) = 0.0;
-	M(4,3) = pow((r3+Rin),2);
-	M(5,3) = 1.0;
-	
-	M(0,4) = pow((r0+Rin),2);
-	M(1,4) = pow((r1+Rin),2);
-	M(2,4) = pow((r2+Rin),2);
-	M(3,4) = pow((r3+Rin),2);
-	M(4,4) = 0.0;
-	M(5,4) = 1.0;
-	
-	M(0,5) = 1.0;
-	M(1,5) = 1.0;
-	M(2,5) = 1.0;
-	M(3,5) = 1.0;
-	M(4,5) = 1.0;
-	M(5,5) = 0.0;
+	M(0,0) = 0.0; M(1,0) = d01; M(2,0) = d02; M(3,0) = d03; M(4,0) = pow((r0+Rin),2); M(5,0) = 1.0;
+	M(0,1) = d01; M(1,1) = 0.0; M(2,1) = d12; M(3,1) = d13; M(4,1) = pow((r1+Rin),2); M(5,1) = 1.0;
+	M(0,2) = d02; M(1,2) = d12; M(2,2) = 0.0; M(3,2) = d23; M(4,2) = pow((r2+Rin),2); M(5,2) = 1.0;
+	M(0,3) = d03; M(1,3) = d13; M(2,3) = d23; M(3,3) = 0.0; M(4,3) = pow((r3+Rin),2); M(5,3) = 1.0;
+	M(0,4) = pow((r0+Rin),2); M(1,4) = pow((r1+Rin),2); M(2,4) = pow((r2+Rin),2); M(3,4) = pow((r3+Rin),2); M(4,4) = 0.0; M(5,4) = 1.0;
+	M(0,5) = 1.0; M(1,5) = 1.0; M(2,5) = 1.0; M(3,5) = 1.0; M(4,5) = 1.0; M(5,5) = 0.0;
 	
 	i = 0;
 	check = false;
@@ -669,7 +634,8 @@
 FiniteCellsIterator cellEnd = tri.finite_cells_end();
 for ( FiniteCellsIterator cell = tri.finite_cells_begin(); cell != cellEnd; cell++ ) {
 if (cell->info().label==-1) {
-updateSingleCellLabelRecursion(cell,currentLabel+1);
+	clusters.push_back(shared_ptr(new PhaseCluster));
+	updateSingleCellLabelRecursion(cell,currentLabel+1,clusters.back()->pores);
 currentLabel++;
 }
 }
@@ -686,9 +652,10 @@
 return maxLabel;
 }
 
-void TwoPhaseFlowEngine:: updateSingleCellLabelRecursion(CellHandle cell, int label)
+void TwoPhaseFlowEngine:: updateSingleCellLabelRecursion(CellHandle cell, int label, std::vector *outputVector)
 {
 cell->info().label=label;
+if (outputVector) outputVector->push_back(cell);
 for (int facet = 0; facet < 4; facet ++) {
 CellHandle nCell = cell->neighbor(facet);
 if (solver->T[solver->currentTes].Triangulation().is_infinite(nCell)) continue;
@@ -696,7 +663,7 @@
 // if ( (nCell->info().isFictious) && (!isInvadeBoundary) ) continue;
 //TODO:the following condition may relax to relate to nCell->info().hasInterface
 if ( (nCell->info().saturation==cell->info().saturation) && (nCell->info().label!=cell->info().label) )
-updateSingleCellLabelRecursion(nCell,label);
+updateSingleCellLabelRecursion(nCell,label,outputVector);
 }
 }
 

=== modified file 'pkg/pfv/TwoPhaseFlowEngine.hpp'
--- pkg/pfv/TwoPhaseFlowEngine.hpp	2016-11-22 17:29:15 +
+++ pkg/pfv/TwoPhaseFlowEngine.hpp	2016-11-23 10:43:14 +
@@ -58,10 +58,33 @@
 typedef TemplateFlowEngine_TwoPhaseFlowEngineT TwoPhaseFlowEngineT;
 REGISTER_SERIALIZABLE(TwoPhaseFlowEngineT);
 
+// A class to represent isolated single-phase cluster (main application in convective drying at the moment)
+class PhaseCluster : public Serializable
+{
+		double totalCellVolume;
+	public :
+		virtual ~PhaseCluster();
+		vector* pores;
+		TwoPhaseFlowEngineT::RTriangulation* tri;
+		YADE_CLASS_BASE_DOC_ATTRS_INIT_CTOR_PY(PhaseCluster,Serializable,"Preliminary.",
+		((int,label,-1,,"Unique label of this cluster, should be reflected in pores of this cluster."))
+		((double,volume,0,,"cumulated volume of all pores."))
+		((double,entryPc,0,,"smallest entry capillary pressure."))
+		((int,entryPore,0,,"the pore of the cluster incident to the throat with smallest entry Pc."))
+		((double,interfacialArea,0,,"interfacial area of the cluster"))
+		,,,
+		)
+};
+REGISTER_SERIALIZABLE(PhaseCluster);
+YADE_PLUGIN((PhaseCluster));
+PhaseCluster::~PhaseCluster(){}
+
 class TwoPhaseFlowEngine : public TwoPhaseFlowEngineT
 {
-		double totalCellVolume;
 	public :
+	double totalCellVolume;
+	vector clusters; // the list of 

[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 3975: clean UnsaturatedEngine, move all functions to TwoPhaseFlowEngine.


revno: 3975
committer: Chao Yuan 
timestamp: Tue 2016-11-22 18:29:15 +0100
message:
  clean UnsaturatedEngine, move all functions to TwoPhaseFlowEngine.
modified:
  pkg/pfv/TwoPhaseFlowEngine.cpp
  pkg/pfv/TwoPhaseFlowEngine.hpp
  pkg/pfv/UnsaturatedEngine.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 'pkg/pfv/TwoPhaseFlowEngine.cpp'
--- pkg/pfv/TwoPhaseFlowEngine.cpp	2016-11-02 10:40:55 +
+++ pkg/pfv/TwoPhaseFlowEngine.cpp	2016-11-22 17:29:15 +
@@ -1,4 +1,3 @@
- 
 /*
 *  Copyright (C) 2014 by Bruno Chareyre  *
 *  Copyright (C) 2013 by T. Sweijen (t.swei...@uu.nl)*
@@ -43,12 +42,6 @@
 		solver->noCache = true;
 }
 
-
-
-
-
-
-
 void TwoPhaseFlowEngine::computePoreBodyVolume()
 {
 initializeVolumes(*solver);
@@ -59,8 +52,6 @@
 }
 }
 
-
-
 void TwoPhaseFlowEngine::computePoreThroatRadiusMethod2()
 {
   //Calculate the porethroat radii of the inscribed sphere in each pore-body. 
@@ -85,8 +76,6 @@
   }
 }
 
-
-
 void TwoPhaseFlowEngine::computePoreBodyRadius()
 {
   
@@ -435,8 +424,6 @@
   }
 }
 
-
-
 void TwoPhaseFlowEngine::computeSolidLine()
 {
 RTriangulation& Tri = solver->T[solver->currentTes].Triangulation();
@@ -713,5 +700,420 @@
 }
 }
 
+void TwoPhaseFlowEngine::updatePressure()
+{
+boundaryConditions(*solver);
+solver->pressureChanged=true;
+solver->reApplyBoundaryConditions();
+RTriangulation& tri = solver->T[solver->currentTes].Triangulation();
+FiniteCellsIterator cellEnd = tri.finite_cells_end();
+for ( FiniteCellsIterator cell = tri.finite_cells_begin(); cell != cellEnd; cell++ ) {
+  if (cell->info().isWRes==true) {cell->info().p()=bndCondValue[2];}
+  if (cell->info().isNWRes==true) {cell->info().p()=bndCondValue[3];}
+  if (isPhaseTrapped) {
+	if ( cell->info().isTrapW ) {cell->info().p()=bndCondValue[3]-cell->info().trapCapP;}
+	if ( cell->info().isTrapNW) {cell->info().p()=bndCondValue[2]+cell->info().trapCapP;}
+	//check cell reservoir info.
+	if ( !cell->info().isWRes && !cell->info().isNWRes && !cell->info().isTrapW && !cell->info().isTrapNW ) {cerr<<"ERROR! NOT FIND Cell Info!";}
+// 	{cell->info().p()=bndCondValue[2]; if (isInvadeBoundary) cerr<<"Something wrong in updatePressure.(isInvadeBoundary)";}
+  }
+} 
+}
+
+void TwoPhaseFlowEngine::invasion()
+{
+if (isPhaseTrapped) invasion1();
+else invasion2();
+}
+
+///mode1 and mode2 can share the same invasionSingleCell(), invasionSingleCell() ONLY change neighbor pressure and neighbor saturation, independent of reservoirInfo.
+void TwoPhaseFlowEngine::invasionSingleCell(CellHandle cell)
+{
+double localPressure=cell->info().p();
+double localSaturation=cell->info().saturation;
+for (int facet = 0; facet < 4; facet ++) {
+CellHandle nCell = cell->neighbor(facet);
+if (solver->T[solver->currentTes].Triangulation().is_infinite(nCell)) continue;
+if (nCell->info().Pcondition) continue;//FIXME:defensive
+// if ( (nCell->info().isFictious) && (!isInvadeBoundary) ) continue;
+	if (cell->info().poreThroatRadius[facet]<0) continue;
+
+	if ( (nCell->info().saturation==localSaturation) && (nCell->info().p() != localPressure) && ((nCell->info().isTrapNW)||(nCell->info().isTrapW)) ) {
+	  nCell->info().p() = localPressure;
+	  if(solver->debugOut) {cerr<<"merge trapped phase"<info().saturation>localSaturation) ) {
+	  double nPcThroat=surfaceTension/cell->info().poreThroatRadius[facet];
+	  double nPcBody=surfaceTension/nCell->info().poreBodyRadius;
+	  if( (localPressure-nCell->info().p()>nPcThroat) && (localPressure-nCell->info().p()>nPcBody) ) {
+	nCell->info().p() = localPressure;
+	nCell->info().saturation=localSaturation;
+	nCell->info().hasInterface=false;
+	if(solver->debugOut) {cerr<<"drainage"<info().p()>nPcThroat) && (localPressure-nCell->info().p()info().hasInterface==false) && (nCell->info().hasInterface==false) ) {
+// 	if(solver->debugOut) {cerr<<"invasion paused into pore interface "<info().hasInterface=true;
+// 	  }
+// 	  else continue;
+	}
+	else if ( (nCell->info().saturationinfo().poreThroatRadius[facet];
+	  double nPcBody=surfaceTension/nCell->info().poreBodyRadius;
+	  if( 

[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 3976: Revert DryingEngine.


revno: 3976
committer: Chao Yuan 
timestamp: Tue 2016-11-22 18:45:57 +0100
message:
  Revert DryingEngine.
modified:
  pkg/pfv/UnsaturatedEngine.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 'pkg/pfv/UnsaturatedEngine.cpp'
--- pkg/pfv/UnsaturatedEngine.cpp	2016-11-22 17:29:15 +
+++ pkg/pfv/UnsaturatedEngine.cpp	2016-11-22 17:45:57 +
@@ -357,5 +357,61 @@
 //--end of comparison with experiment
 
 
+//#
+// CONVECTIVE DRYING EXTENSION
+//#
+
+class PhaseCluster : public Serializable
+{
+  		double totalCellVolume;
+	public :
+
+
+		virtual ~PhaseCluster();
+		vector pores;
+		TwoPhaseFlowEngine::RTriangulation* tri;
+
+		
+		YADE_CLASS_BASE_DOC_ATTRS_INIT_CTOR_PY(PhaseCluster,Serializable,"Preliminary.",
+		((int,label,-1,,"Unique label of this cluster, should be reflected in pores of this cluster."))
+		((double,volume,0,,"cumulated volume of all pores."))
+		((double,entryPc,0,,"smallest entry capillary pressure."))
+		((int,entryPore,0,,"the pore of the cluster incident to the throat with smallest entry Pc."))
+		((double,interfacialArea,0,,"interfacial area of the cluster"))
+	,,,
+		)
+};
+
+REGISTER_SERIALIZABLE(PhaseCluster);
+YADE_PLUGIN((PhaseCluster));
+
+PhaseCluster::~PhaseCluster(){}
+
+
+class DryingEngine : public UnsaturatedEngine
+{
+	public :
+		virtual ~DryingEngine();
+		vector clusters;
+		
+		boost::python::list pyClusters() {
+			boost::python::list ret;
+			for(vector::iterator it=clusters.begin(); it!=clusters.end(); ++it) ret.append(*it);
+			return ret;}
+	
+		YADE_CLASS_BASE_DOC_ATTRS_INIT_CTOR_PY(DryingEngine,UnsaturatedEngine,"Extended TwoPhaseFlowEngine for application to convective drying.",
+// 		((shared_ptr , cluster,new PhaseCluster,,"The list of clusters"))
+	,,,
+		.def("getClusters",::pyClusters/*,(boost::python::arg("folder")="./VTK")*/,"Save pressure field in vtk format. Specify a folder name for output.")
+		)
+		DECLARE_LOGGER;
+};
+
+DryingEngine::~DryingEngine(){};
+
+REGISTER_SERIALIZABLE(DryingEngine);
+YADE_PLUGIN((DryingEngine));
+
+
 #endif //TWOPHASEFLOW
 #endif //FLOW_ENGINE

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 3974: References .bib files: including new entries


revno: 3974
committer: jduriez 
timestamp: Mon 2016-11-21 15:58:59 -0700
message:
  References .bib files: including new entries
modified:
  doc/yade-articles.bib
  doc/yade-conferences.bib


--
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/yade-articles.bib'
--- doc/yade-articles.bib	2016-10-14 08:42:32 +
+++ doc/yade-articles.bib	2016-11-21 22:58:59 +
@@ -218,14 +218,46 @@
 	year = {2013}
 }
 
-@article{Duriez2016,
-title = "Micromechanics of wing crack propagation for different flaw properties",
-author = "Duriez, J. and Scholtès, L. and Donzé, F.V.",
-journal = "Engineering Fracture Mechanics",
-volume = "153",
-pages = "378 - 398",
-year = "2016",
-doi = "10.1016/j.engfracmech.2015.12.034"
+@article{Duriez2016a,
+title = {Micromechanics of wing crack propagation for different flaw properties},
+author = {Duriez, J. and Scholtès, L. and Donzé, F.V.},
+journal = {Engineering Fracture Mechanics},
+volume = {153},
+pages = {378 - 398},
+year = {2016},
+doi = {10.1016/j.engfracmech.2015.12.034}
+}
+
+@Article{Duriez2016b,
+author = {J. Duriez and R. Wan},
+title = {Contact angle mechanical influence for wet granular soils},
+year = {2016},
+journal = {Acta Geotechnica},
+doi = {10.1007/s11440-016-0500-6}
+}
+
+@Article{Duriez2016c,
+author = {J. Duriez and R. Wan},
+title = {Subtleties in Discrete Element Modelling of wet granular soils},
+year = {2016},
+journal = {Géotechnique},
+doi = {10.1680/jgeot.15.P.113}
+}
+
+@Article{Duriez2016d,
+author = {J. Duriez and R. Wan},
+title = {Stress in wet granular media with interfaces via homogenization and discrete element approaches},
+year = {2016},
+journal = {Journal of Engineering Mechanics},
+doi = {10.1061/(ASCE)EM.1943-7889.0001163}
+}
+
+@article{Duriez2016e,
+title = {The micromechanical nature of stresses in triphasic granular media with interfaces},
+journal = {Journal of the Mechanics and Physics of Solids},
+year = {2016},
+doi = {10.1016/j.jmps.2016.10.011},
+author = {J. Duriez and M. Eghbalian and R. Wan and F. Darve}
 }
 
 @article{Dyck2015,
@@ -909,13 +941,13 @@
 }
 
 @article{Wan2015,
-title = "A tensorial description of stresses in triphasic granular materials with interfaces",
-journal = "Geomechanics for Energy and the Environment",
-volume = "4",
-pages = "73 - 87",
-year = "2015",
-doi = "10.1016/j.gete.2015.11.004",
-author = "Wan, R. and Duriez, J. and Darve, F.",
+title = {A tensorial description of stresses in triphasic granular materials with interfaces},
+journal = {Geomechanics for Energy and the Environment},
+volume = {4},
+pages = {73 - 87},
+year = {2015},
+doi = {10.1016/j.gete.2015.11.004},
+author = {Wan, R. and Duriez, J. and Darve, F.}
 }
 
 @article{Wang2014,

=== modified file 'doc/yade-conferences.bib'
--- doc/yade-conferences.bib	2016-08-24 14:07:23 +
+++ doc/yade-conferences.bib	2016-11-21 22:58:59 +
@@ -894,3 +894,25 @@
   Publisher = {International Center for Numerical Methods in Engineering (CIMNE) Barcelona, Spain},
   Url = {http://congress.cimne.com/particles2015/frontal/doc/E-book_PARTICLES_2015.pdf}
 }
+
+@InProceedings{Duriez2015,
+title = {Effective stress in unsaturated granular materials: micro-mechanical insights},
+author = {J. Duriez and R. Wan},
+booktitle = {Coupled Problems in Science and Engineering VI},
+year = {2015},
+adress = {Venice},
+pages = {1232--1242},
+editors= {B. Schrefler, E. Onate and M. Papadrakakis},
+url = {http://congress.cimne.com/coupled2015/frontal/doc/Ebook_COUPLED_15.pdf}
+}
+
+@InProceedings{Darve2016,
+	title = {DEM modelling in Geomechanics: some recent breakthroughs},
+	author = {F. Darve, J. Duriez, R. Wan},
+	booktitle = {Proceedings of the 7th International Conference on Discrete Element Methods},
+	editor={Li, Xikui and Feng, Yuntian and Mustoe, Graham},
+	year = {2016},
+	publisher={Springer},
+	adress = {Dalian}
+}
+

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 3973: fix negative volumes issue in triangulation cells, consistentlyy remove the includeBoundary optio...


revno: 3973
committer: bchareyre 
timestamp: Thu 2016-11-17 16:32:26 +0100
message:
  fix negative volumes issue in triangulation cells, consistentlyy remove the 
includeBoundary option (a workaround) in averageVelocity
modified:
  lib/triangulation/FlowBoundingSphere.hpp
  lib/triangulation/FlowBoundingSphere.ipp
  pkg/pfv/FlowEngine.hpp.in
  pkg/pfv/FlowEngine.ipp.in


--
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 'lib/triangulation/FlowBoundingSphere.hpp'
--- lib/triangulation/FlowBoundingSphere.hpp	2016-11-16 17:38:08 +
+++ lib/triangulation/FlowBoundingSphere.hpp	2016-11-17 15:32:26 +
@@ -156,7 +156,7 @@
 		double getPorePressure (double X, double Y, double Z);
 		void measurePressureProfile(double WallUpy, double WallDowny);
 		double averageSlicePressure(double Y);
-		double averagePressure(bool includeBoundaries);
+		double averagePressure();
 		int getCell (double X,double Y,double Z);
 		double boundaryFlux(unsigned int boundaryId);
 		void setBlocked(CellHandle& cell);

=== modified file 'lib/triangulation/FlowBoundingSphere.ipp'
--- lib/triangulation/FlowBoundingSphere.ipp	2016-11-16 17:38:08 +
+++ lib/triangulation/FlowBoundingSphere.ipp	2016-11-17 15:32:26 +
@@ -164,8 +164,8 @@
 	{
 	  if (cell->info().fictious()==0){
 	for (int i=0;i<4;i++){
-	  velocityVolumes[cell->vertex(i)->info().id()] =  velocityVolumes[cell->vertex(i)->info().id()] + cell->info().averageVelocity()*cell->info().volume();
-	  volumes[cell->vertex(i)->info().id()] = volumes[cell->vertex(i)->info().id()] + cell->info().volume();}
+	  velocityVolumes[cell->vertex(i)->info().id()] =  velocityVolumes[cell->vertex(i)->info().id()] + cell->info().averageVelocity()*std::abs(cell->info().volume());
+	  volumes[cell->vertex(i)->info().id()] = volumes[cell->vertex(i)->info().id()] + std::abs(cell->info().volume());}
 	  }}	
 	
 	std::ofstream fluid_vel ("Velocity", std::ios::out);
@@ -204,8 +204,8 @@
 	  if (cell->info().fictious()==0){
 	for (unsigned int i=0;i<4;i++){
 	  if (cell->vertex(i)->info().id()==Id_sph){
-		velocityVolumes = velocityVolumes + cell->info().averageVelocity()*cell->info().volume();
-		volumes = volumes + cell->info().volume();
+		velocityVolumes = velocityVolumes + cell->info().averageVelocity()*std::abs(cell->info().volume());
+		volumes = volumes + std::abs(cell->info().volume());
 		
 	for (int i=0;i<3;i++) result[i] += velocityVolumes[i]/volumes;
 	return result;
@@ -272,17 +272,16 @@
   return P_ave;
 }
 template  
-double FlowBoundingSphere::averagePressure(bool includeBoundaries)
+double FlowBoundingSphere::averagePressure()
 {
   RTriangulation& Tri = T[currentTes].Triangulation();
   double P = 0.f, Ppond=0.f, Vpond=0.f;
   int n = 0;
   for (FiniteCellsIterator cell = Tri.finite_cells_begin(); cell != Tri.finite_cells_end(); cell++) {
-	if (includeBoundaries || cell->info().isReal()){
-		P+=cell->info().p();
-		n++;
-		Ppond+=cell->info().p()*cell->info().volume();
-		Vpond+=cell->info().volume();}}
+	P+=cell->info().p();
+	n++;
+	Ppond+=cell->info().p()*std::abs(cell->info().volume());
+	Vpond+=std::abs(cell->info().volume());}
   P/=n;
   Ppond/=Vpond;
   return Ppond;

=== modified file 'pkg/pfv/FlowEngine.hpp.in'
--- pkg/pfv/FlowEngine.hpp.in	2016-11-16 17:38:08 +
+++ pkg/pfv/FlowEngine.hpp.in	2016-11-17 15:32:26 +
@@ -204,7 +204,7 @@
 		  if (index<0 || index>5) LOG_ERROR("index out of range (0-5)"); normal[max(0,min(5,index))]=v;}
 		
 		double averageSlicePressure(double posY){return solver->averageSlicePressure(posY);}
-		double averagePressure(bool includeBoundaries){return solver->averagePressure(includeBoundaries);}
+		double averagePressure(){return solver->averagePressure();}
 
 		void emulateAction(){
 			scene = Omega::instance().getScene().get();
@@ -342,7 +342,7 @@
 		.def("pressureProfile",_@TEMPLATE_FLOW_NAME@::pressureProfile,(boost::python::arg("wallUpY"),boost::python::arg("wallDownY")),"Measure pore pressure in 6 equally-spaced points along the height of the sample")
 		.def("getPorePressure",_@TEMPLATE_FLOW_NAME@::getPorePressure,(boost::python::arg("pos")),"Measure pore pressure in position pos[0],pos[1],pos[2]")
 		.def("averageSlicePressure",_@TEMPLATE_FLOW_NAME@::averageSlicePressure,(boost::python::arg("posY")),"Measure slice-averaged pore pressure at height posY")
-		.def("averagePressure",_@TEMPLATE_FLOW_NAME@::averagePressure,(boost::python::arg("includeBoundaries")=true),"Measure averaged pore pressure in the entire volume, the cells adjacent to the boundaries are ignored if includeBoundaries=False")
+		.def("averagePressure",_@TEMPLATE_FLOW_NAME@::averagePressure,"Measure averaged pore pressure in the 

[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 3972: (FlowEngine) optionaly include/skip bounding cells when calculating the average pore pressure


revno: 3972
committer: bchareyre 
timestamp: Wed 2016-11-16 18:38:08 +0100
message:
  (FlowEngine) optionaly include/skip bounding cells when calculating the 
average pore pressure
modified:
  lib/triangulation/FlowBoundingSphere.hpp
  lib/triangulation/FlowBoundingSphere.ipp
  lib/triangulation/RegularTriangulation.h
  pkg/pfv/FlowEngine.hpp.in


--
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 'lib/triangulation/FlowBoundingSphere.hpp'
--- lib/triangulation/FlowBoundingSphere.hpp	2016-10-24 11:17:04 +
+++ lib/triangulation/FlowBoundingSphere.hpp	2016-11-16 17:38:08 +
@@ -156,7 +156,7 @@
 		double getPorePressure (double X, double Y, double Z);
 		void measurePressureProfile(double WallUpy, double WallDowny);
 		double averageSlicePressure(double Y);
-		double averagePressure();
+		double averagePressure(bool includeBoundaries);
 		int getCell (double X,double Y,double Z);
 		double boundaryFlux(unsigned int boundaryId);
 		void setBlocked(CellHandle& cell);

=== modified file 'lib/triangulation/FlowBoundingSphere.ipp'
--- lib/triangulation/FlowBoundingSphere.ipp	2016-11-16 09:53:52 +
+++ lib/triangulation/FlowBoundingSphere.ipp	2016-11-16 17:38:08 +
@@ -272,17 +272,17 @@
   return P_ave;
 }
 template  
-double FlowBoundingSphere::averagePressure()
+double FlowBoundingSphere::averagePressure(bool includeBoundaries)
 {
   RTriangulation& Tri = T[currentTes].Triangulation();
   double P = 0.f, Ppond=0.f, Vpond=0.f;
   int n = 0;
   for (FiniteCellsIterator cell = Tri.finite_cells_begin(); cell != Tri.finite_cells_end(); cell++) {
-	P+=cell->info().p();
-	n++;
-	Ppond+=cell->info().p()*cell->info().volume();
-	Vpond+=cell->info().volume();
-  }
+	if (includeBoundaries || cell->info().isReal()){
+		P+=cell->info().p();
+		n++;
+		Ppond+=cell->info().p()*cell->info().volume();
+		Vpond+=cell->info().volume();}}
   P/=n;
   Ppond/=Vpond;
   return Ppond;

=== modified file 'lib/triangulation/RegularTriangulation.h'
--- lib/triangulation/RegularTriangulation.h	2016-11-16 09:53:52 +
+++ lib/triangulation/RegularTriangulation.h	2016-11-16 17:38:08 +
@@ -56,7 +56,7 @@
 	// Care to initialize it if you need it, there is no magic numbering to rely on
 	unsigned int id;
 	Real s;
-	bool isFictious;
+	bool isFictious;//true if the cell has at least one fictious bounding sphere as a vertex
 	SimpleCellInfo (void) {isFictious=false; s=0;}
 	SimpleCellInfo& setPoint(const Point ) { Point::operator= (p); return *this; }
 	SimpleCellInfo& setScalar(const Real ) { s=scalar; return *this; }

=== modified file 'pkg/pfv/FlowEngine.hpp.in'
--- pkg/pfv/FlowEngine.hpp.in	2016-11-16 09:53:52 +
+++ pkg/pfv/FlowEngine.hpp.in	2016-11-16 17:38:08 +
@@ -204,7 +204,7 @@
 		  if (index<0 || index>5) LOG_ERROR("index out of range (0-5)"); normal[max(0,min(5,index))]=v;}
 		
 		double averageSlicePressure(double posY){return solver->averageSlicePressure(posY);}
-		double averagePressure(){return solver->averagePressure();}
+		double averagePressure(bool includeBoundaries){return solver->averagePressure(includeBoundaries);}
 
 		void emulateAction(){
 			scene = Omega::instance().getScene().get();
@@ -342,7 +342,7 @@
 		.def("pressureProfile",_@TEMPLATE_FLOW_NAME@::pressureProfile,(boost::python::arg("wallUpY"),boost::python::arg("wallDownY")),"Measure pore pressure in 6 equally-spaced points along the height of the sample")
 		.def("getPorePressure",_@TEMPLATE_FLOW_NAME@::getPorePressure,(boost::python::arg("pos")),"Measure pore pressure in position pos[0],pos[1],pos[2]")
 		.def("averageSlicePressure",_@TEMPLATE_FLOW_NAME@::averageSlicePressure,(boost::python::arg("posY")),"Measure slice-averaged pore pressure at height posY")
-		.def("averagePressure",_@TEMPLATE_FLOW_NAME@::averagePressure,"Measure averaged pore pressure in the entire volume")
+		.def("averagePressure",_@TEMPLATE_FLOW_NAME@::averagePressure,(boost::python::arg("includeBoundaries")=true),"Measure averaged pore pressure in the entire volume, the cells adjacent to the boundaries are ignored if includeBoundaries=False")
 		.def("updateBCs",_@TEMPLATE_FLOW_NAME@::updateBCs,"tells the engine to update it's boundary conditions before running (especially useful when changing boundary pressure - should not be needed for point-wise imposed pressure)")
 		.def("emulateAction",_@TEMPLATE_FLOW_NAME@::emulateAction,"get scene and run action (may be used to manipulate an engine outside the timestepping loop).")
 		.def("getCell",_@TEMPLATE_FLOW_NAME@::getCell,(boost::python::arg("pos")),"get id of the cell containing (X,Y,Z).")

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net

[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 3971: Implement Darcy scale permeability in FlowEngine, introduce alphaShapes (commented), some code cl...


revno: 3971
committer: bchareyre 
timestamp: Wed 2016-11-16 10:53:52 +0100
message:
  Implement Darcy scale permeability in FlowEngine, introduce alphaShapes 
(commented), some code cleaning and smallfixes
modified:
  lib/triangulation/FlowBoundingSphere.ipp
  lib/triangulation/FlowBoundingSphereLinSolv.ipp
  lib/triangulation/PeriodicFlow.hpp
  lib/triangulation/RegularTriangulation.h
  lib/triangulation/Tesselation.h
  lib/triangulation/Tesselation.ipp
  pkg/pfv/FlowEngine.hpp.in
  pkg/pfv/FlowEngine.ipp.in


--
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 'lib/triangulation/FlowBoundingSphere.ipp'
--- lib/triangulation/FlowBoundingSphere.ipp	2016-11-02 15:14:59 +
+++ lib/triangulation/FlowBoundingSphere.ipp	2016-11-16 09:53:52 +
@@ -578,7 +578,9 @@
 	meanK /= pass;
 	meanRadius /= pass;
 	meanDistance /= pass;
-	Real globalK=kFactor*meanDistance*vPoral/(sSolidTot*8.*viscosity);//An approximate value of macroscopic permeability, for clamping local values below
+	Real globalK;
+	if (kFactor>0) globalK=kFactor*meanDistance*vPoral/(sSolidTot*8.*viscosity);//An approximate value of macroscopic permeability, for clamping local values below
+	else globalK=meanK;
 	if (debugOut) {
 		cout << "PassCompK = " << pass << endl;
 		cout << "meanK = " << meanK << endl;

=== modified file 'lib/triangulation/FlowBoundingSphereLinSolv.ipp'
--- lib/triangulation/FlowBoundingSphereLinSolv.ipp	2015-09-17 14:08:41 +
+++ lib/triangulation/FlowBoundingSphereLinSolv.ipp	2016-11-16 09:53:52 +
@@ -160,7 +160,6 @@
 			if (!cell->info().Pcondition && !cell->info().blocked) ++ncols;}
 //		//Segfault on 14.10, and useless overall since SuiteSparse has preconditionners (including metis)
 // 		spatial_sort(orderedCells.begin(),orderedCells.end(), CellTraits_for_spatial_sort());
-
 		T_cells.clear();
 		T_index=0;
 		isLinearSystemSet=false;
@@ -273,12 +272,8 @@
 		#ifdef EIGENSPARSE_LIB
 		} else if (useSolver==3){
 			tripletList.clear(); tripletList.resize(T_nnz);
-			for(int k=0;k0) {
-			cerr << "something went wrong in Cholesky factorization, use LDLt as fallback this time" << endl;
+			cerr << "something went wrong in Cholesky factorization, use LDLt as fallback this time" << eSolver.cholmod().status << endl;
 			eSolver.setMode(Eigen::CholmodLDLt);
 			eSolver.compute(A);
 		}

=== modified file 'lib/triangulation/PeriodicFlow.hpp'
--- lib/triangulation/PeriodicFlow.hpp	2016-11-02 15:14:59 +
+++ lib/triangulation/PeriodicFlow.hpp	2016-11-16 09:53:52 +
@@ -14,6 +14,11 @@
 // #endif
 
 
+/* TODO:
+- remove computePermeability(), mostly a duplicate of the non-periodic version
+
+*/
+
 namespace CGT{
 
 // 	typedef CGT::FlowBoundingSphere PeriodicFlowBoundingSphere;

=== modified file 'lib/triangulation/RegularTriangulation.h'
--- lib/triangulation/RegularTriangulation.h	2014-10-15 06:44:01 +
+++ lib/triangulation/RegularTriangulation.h	2016-11-16 09:53:52 +
@@ -12,6 +12,12 @@
 #include 
 #include 
 #include 
+#define ALPHASHAPES
+#ifdef ALPHASHAPES
+	#include 
+	#include 
+	#include 
+#endif
 #include 
 #include 
 #include 
@@ -92,11 +98,19 @@
 typedef cell_infoCell_Info;
 typedef CGAL::Triangulation_vertex_base_with_info_3	Vb_info;
 typedef CGAL::Triangulation_cell_base_with_info_3		Cb_info;
+#ifdef ALPHASHAPES
+typedef CGAL::Alpha_shape_vertex_base_3 Vb;
+typedef CGAL::Alpha_shape_cell_base_3   Fb;
+typedef CGAL::Triangulation_data_structure_3Tds;
+#else
 typedef CGAL::Triangulation_data_structure_3			Tds;
+#endif
 
 typedef CGAL::Triangulation_3		Triangulation;
 typedef CGAL::Regular_triangulation_3RTriangulation;
-
+#ifdef ALPHASHAPES
+typedef CGAL::Alpha_shape_3  	AlphaShape;
+#endif
 typedef typename RTriangulation::Vertex_iterator		VertexIterator;
 typedef typename RTriangulation::Vertex_handle  		VertexHandle;
 typedef typename RTriangulation::Finite_vertices_iterator	FiniteVerticesIterator;

=== modified file 'lib/triangulation/Tesselation.h'
--- lib/triangulation/Tesselation.h	2014-03-21 18:47:45 +
+++ 

[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 3970: Introduce DryingEngine (two phase flow with convection in one phase)


revno: 3970
committer: bchareyre 
timestamp: Tue 2016-11-15 19:09:17 +0100
message:
  Introduce DryingEngine (two phase flow with convection in one phase)
modified:
  pkg/pfv/UnsaturatedEngine.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 'pkg/pfv/UnsaturatedEngine.cpp'
--- pkg/pfv/UnsaturatedEngine.cpp	2016-11-02 10:40:55 +
+++ pkg/pfv/UnsaturatedEngine.cpp	2016-11-15 18:09:17 +
@@ -281,7 +281,7 @@
 	if ( cell->info().isTrapNW) {cell->info().p()=bndCondValue[2]+cell->info().trapCapP;}
}
 if(solver->debugOut) {cout<<"invasion1.update trapped W-phase/NW-phase Pressure"<debugOut) {cout<<"update cell labels"< clusters;
+		
+		boost::python::list pyClusters() {
+			boost::python::list ret;
+			for(vector::iterator it=clusters.begin(); it!=clusters.end(); ++it) ret.append(*it);
+			return ret;}
+	
+		YADE_CLASS_BASE_DOC_ATTRS_INIT_CTOR_PY(DryingEngine,UnsaturatedEngine,"Extended TwoPhaseFlowEngine for application to convective drying.",
+// 		((shared_ptr , cluster,new PhaseCluster,,"The list of clusters"))
+	,,,
+		.def("getClusters",::pyClusters/*,(boost::python::arg("folder")="./VTK")*/,"Save pressure field in vtk format. Specify a folder name for output.")
+		)
+		DECLARE_LOGGER;
+};
+
+DryingEngine::~DryingEngine(){};
+
+REGISTER_SERIALIZABLE(DryingEngine);
+YADE_PLUGIN((DryingEngine));
+
+
+
 #endif //TWOPHASEFLOW
 #endif //FLOW_ENGINE

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 3969: fixed another little bug in utils.UnstructuredGrid


revno: 3969
committer: Jan Stránský 
timestamp: Thu 2016-11-10 22:10:00 +0100
message:
  fixed another little bug in utils.UnstructuredGrid
modified:
  py/utils.py


--
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 'py/utils.py'
--- py/utils.py	2016-11-09 10:52:00 +
+++ py/utils.py	2016-11-10 21:10:00 +
@@ -1011,7 +1011,7 @@
 cc = inscribedCircleCenter(*vs)
 for v in vs: v -= cc
 e.state.pos = cc
-e.shape.setVertices(vs)
+e.shape.setVertices(*vs)
 			elif isinstance(e.shape,Tetra):
 e.shape.v = [self.vertices[j] for j in c]
 			else:

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 3968: added pack.inHalfSpace and pack.inConvexPolygon + example script


revno: 3968
committer: Jan Stránský 
timestamp: Thu 2016-11-10 15:38:54 +0100
message:
  added pack.inHalfSpace and pack.inConvexPolygon + example script
added:
  examples/test/pack-inConvexPolyhedron.py
modified:
  py/pack/pack.py


--
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
=== added file 'examples/test/pack-inConvexPolyhedron.py'
--- examples/test/pack-inConvexPolyhedron.py	1970-01-01 00:00:00 +
+++ examples/test/pack-inConvexPolyhedron.py	2016-11-10 14:38:54 +
@@ -0,0 +1,62 @@
+from yade import pack
+import random
+random.seed(1)
+
+# a cube
+p1 = Vector3(-9,-2,-2)
+p2 = p1 + (1,1,1)
+pred1 = pack.inConvexPolyhedron((
+	(p1, (+1, 0, 0)),
+	(p1, ( 0,+1, 0)),
+	(p1, ( 0, 0,+1)),
+	(p2, (-1, 0, 0)),
+	(p2, ( 0,-1, 0)),
+	(p2, ( 0, 0,-1)),
+))
+
+# a tetrahedron
+p1 = Vector3(-7,-2,-2)
+p2 = p1 + (1,1,1)
+pred2 = pack.inConvexPolyhedron((
+	(p1, (+1, 0, 0)),
+	(p1, ( 0,+1, 0)),
+	(p1, ( 0, 0,+1)),
+	(p2, (-1,-1,-1)),
+))
+
+# random polyhedron
+center = Vector3(-2,-2,-2)
+dMin = 1
+dMax = 1.2
+n = 20
+planes = []
+for i in xrange(n):
+	d = random.random()*(dMax-dMin) + dMin # distance of plane from center, random number in range (dMin,dMax)
+	# http://mathworld.wolfram.com/HyperspherePointPicking.html
+	normal = Vector3([random.gauss(0,10) for _ in xrange(3)]) # random normal vector
+	normal.normalize()
+	planes.append((center-d*normal,normal))
+pred3 = pack.inConvexPolyhedron(planes)
+
+try: # should be ValueError, since the 3 planes does not form closed polyhedron and finding its bounds should fail
+	pred4 = pack.inConvexPolyhedron((
+		((0,0,0), (+1, 0, 0)),
+		((0,0,0), ( 0,+1, 0)),
+		((0,0,0), ( 0, 0,+1)),
+	))
+except ValueError:
+	print 'ValueError successfully detected'
+else:
+	raise RuntimeError, "ValueError should have been detected..."
+
+r = .05
+for p in (pred1,pred2,pred3):
+	O.bodies.append(pack.regularHexa(p,r,0,color=randomColor()))
+
+
+try:
+	from yade import qt
+	v = qt.View()
+	v.axes = True
+except:
+	pass

=== modified file 'py/pack/pack.py'
--- py/pack/pack.py	2015-12-09 00:13:58 +
+++ py/pack/pack.py	2016-11-10 14:38:54 +
@@ -174,6 +174,78 @@
   inf=float('inf'); return Vector3(inf,inf,inf)
 def __call__(self,pt,pad): return True
 
+  class inHalfSpace(Predicate):
+"""Predicate returning True  any points, with infinite bounding box."""
+def __init__(self, _center=Vector3().Zero, _dir=Vector3(1,0,0)):
+  self._center = Vector3(_center)
+  self._dir = Vector3(_dir)
+  assert self._dir.norm() > 0., "Direction has to be nonzero vector"
+  self._dir.normalize()
+  self._d = -self._dir.dot(self._center)
+def aabb(self):
+  d,c = self._dir, self._center
+  inf=float('inf')
+  min = Vector3(-inf,-inf,-inf)
+  max = Vector3(+inf,+inf,+inf)
+  for i in xrange(3):
+j = (i+1)%3
+k = (i+2)%3
+if d[i]==0 and d[j]==0:
+  if d[k] > 0: min[k] = c[k]
+  else: max[k] = c[k]
+  return min,max
+def center(self):
+  return self._center
+def dim(self):
+  inf=float('inf')
+  return Vector3(inf,inf,inf)
+def __call__(self,pt,pad):
+  v = self._dir.dot(pt) + self._d
+  return v > pad
+
+  class inConvexPolyhedron(Predicate):
+def __init__(self,planes):
+  self._inHalfSpaces = [inHalfSpace(c,d) for c,d in planes]
+  self._min, self._max = self._computeAabb()
+def _computeAabb(self):
+  try:
+import scipy.optimize
+  except ImportError:
+raise ImportError, "scipy (package python-scipy) needed for pack.inConvexPolyhedron"
+  min,max = Vector3.Zero, Vector3.Zero
+  A,b = [],[]
+  for h in self._inHalfSpaces:
+A.append(tuple(-h._dir))
+b.append(h._d)
+  inf = float('inf')
+  for i in xrange(3):
+c = Vector3.Zero
+#
+c[i] = 1
+opt = scipy.optimize.linprog(c,A_ub=A,b_ub=b,bounds=(-inf,inf))
+errmsg = "Something wrong in pack.inConvexPolyhedron defining planes.\nThe scipy.optimize.linprog output:\n{}\n"
+if not opt.success:
+  raise ValueError, errmsg.format(opt)
+min[i] = opt.x[i]
+#
+c[i] = -1
+opt = scipy.optimize.linprog(c,A_ub=A,b_ub=b,bounds=(-inf,inf))
+if not opt.success:
+  raise ValueError, errmsg.format(opt)
+max[i] = opt.x[i]
+  return min,max
+def aabb(self):
+  return Vector3(self._min), Vector3(self._max)
+def center(self):
+  return .5*(self._min + self._max)
+def dim(self):
+  return self._max - self._min
+def __call__(self,pt,pad):
+  for p in self._inHalfSpaces:
+if not p(pt,pad):
+  return False
+  return True
+
 #
 ## surface 

[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 3967: UnstructuredGrid: fiexd little bug in manual setting of facet position from vertices


revno: 3967
committer: Jan Stránský 
timestamp: Wed 2016-11-09 11:52:00 +0100
message:
  UnstructuredGrid: fiexd little bug in manual setting of facet position from 
vertices
modified:
  py/utils.py


--
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 'py/utils.py'
--- py/utils.py	2016-09-01 23:20:15 +
+++ py/utils.py	2016-11-09 10:52:00 +
@@ -1008,7 +1008,7 @@
 			if isinstance(e.shape,Facet):
 #e.shape.vertices = [self.vertices[j] for j in c]
 vs = [Vector3(self.vertices[j]) for j in c]
-cc = sum(vs,Vector3.Zero)/3.
+cc = inscribedCircleCenter(*vs)
 for v in vs: v -= cc
 e.state.pos = cc
 e.shape.setVertices(vs)

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 3966: User's manual, added how to visualize force chain in Paraview


revno: 3966
committer: Jan Stránský 
timestamp: Tue 2016-11-08 17:18:55 +0100
message:
  User's manual, added how to visualize force chain in Paraview
modified:
  doc/sphinx/user.rst


--
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/user.rst'
--- doc/sphinx/user.rst	2016-09-20 23:49:38 +
+++ doc/sphinx/user.rst	2016-11-08 16:18:55 +
@@ -1518,6 +1518,17 @@
 * "Point Sprite -> Scale By -> radii"
 * "Edit Radius Transfer Function -> Proportional -> Multiplier = 1.0 -> Close"
 
+Rendering interactions as force chain
+"""
+
+Data saved by ``VTKRecorder`` (the steps below generates cones rahter than tubes) or ``export.VTKExporter(...).exportInteractions(what=[('forceN','i.phys.normalForce().norm()')])`` (the steps below generates per interaction tubes with constant radius):
+
+* Load interactions VTP or VTK files
+* Filters -> Cell Data To Point Data
+* Filters -> Tube
+* Set color by "forceN"
+* Set "Vary Radius" to "By Scalar"
+* Set "Radius" and "Radius Factor" such that the result looks OK (in 3D postprocessing tutorial script, Radius=0.0005 and Radius Factor=100 looks reasonably)
 
 Facet transparency
 """

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 3965: Matrix_computeUnitaryPositive, changed computeThinX to computeFullX flags


revno: 3965
committer: Jan Stránský 
timestamp: Tue 2016-11-08 17:18:55 +0100
message:
  Matrix_computeUnitaryPositive, changed computeThinX to computeFullX flags
  
  should solve question #403514
modified:
  lib/base/Math.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 'lib/base/Math.hpp'
--- lib/base/Math.hpp	2015-11-09 20:26:06 +
+++ lib/base/Math.hpp	2016-11-08 16:18:55 +
@@ -177,7 +177,8 @@
 template
 void Matrix_computeUnitaryPositive(const MatrixT& in, MatrixT* unitary, MatrixT* positive){
 	assert(unitary); assert(positive);
-	Eigen::JacobiSVD svd(in, Eigen::ComputeThinU | Eigen::ComputeThinV);
+	//Eigen::JacobiSVD svd(in, Eigen::ComputeThinU | Eigen::ComputeThinV);
+	Eigen::JacobiSVD svd(in, Eigen::ComputeFullU | Eigen::ComputeFullV);
 	MatrixT mU, mV, mS;
 	mU = svd.matrixU();
 		mV = svd.matrixV();

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 3964: Provide a proper functioning with IPython5.


revno: 3964
author: Anton Gladky 
committer: Anton Gladky 
timestamp: Wed 2016-11-02 23:08:33 +0100
message:
  Provide a proper functioning with IPython5.
added:
  doc/sphinx/ipython_directive500.py
modified:
  doc/sphinx/book/confBook.py
  doc/sphinx/book/confManual.py
  doc/sphinx/book/confReference.py
  doc/sphinx/book/confTheory.py
  doc/sphinx/conf.py


--
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/book/confBook.py'
--- doc/sphinx/book/confBook.py	2016-02-10 17:07:12 +
+++ doc/sphinx/book/confBook.py	2016-11-02 22:08:33 +
@@ -364,10 +364,12 @@
 	else:
 		if 12<=yade.runtime.ipython_version<13:
 			import ipython_directive012 as id
-elif 13<=yade.runtime.ipython_version<200:
+		elif 13<=yade.runtime.ipython_version<200:
 			import ipython_directive013 as id
-else:
+		elif 200<=yade.runtime.ipython_version<500:
 			import ipython_directive200 as id
+		else:
+			import ipython_directive500 as id
 
 	#The next four lines are for compatibility with IPython 0.13.1
 	ipython_rgxin =re.compile(r'(?:In |Yade )\[(\d+)\]:\s?(.*)\s*')
@@ -414,10 +416,12 @@
 else:
 	if 12<=yade.runtime.ipython_version<13:
 		extensions.append('ipython_directive012')
-elif 13<=yade.runtime.ipython_version<200:
+	elif 13<=yade.runtime.ipython_version<200:
 		extensions.append('ipython_directive013')
-else:
+	elif 200<=yade.runtime.ipython_version<500:
 		extensions.append('ipython_directive200')
+	else:
+		extensions.append('ipython_directive500')
 
 # the sidebar extension
 if False:

=== modified file 'doc/sphinx/book/confManual.py'
--- doc/sphinx/book/confManual.py	2015-12-04 06:19:11 +
+++ doc/sphinx/book/confManual.py	2016-11-02 22:08:33 +
@@ -357,10 +357,12 @@
 	else:
 		if 12<=yade.runtime.ipython_version<13:
 			import ipython_directive012 as id
-elif 13<=yade.runtime.ipython_version<200:
+		elif 13<=yade.runtime.ipython_version<200:
 			import ipython_directive013 as id
-else:
+		elif 200<=yade.runtime.ipython_version<500:
 			import ipython_directive200 as id
+		else:
+			import ipython_directive500 as id
 
 	#The next four lines are for compatibility with IPython 0.13.1
 	ipython_rgxin =re.compile(r'(?:In |Yade )\[(\d+)\]:\s?(.*)\s*')
@@ -407,10 +409,12 @@
 else:
 	if 12<=yade.runtime.ipython_version<13:
 		extensions.append('ipython_directive012')
-elif 13<=yade.runtime.ipython_version<200:
+	elif 13<=yade.runtime.ipython_version<200:
 		extensions.append('ipython_directive013')
-else:
+	elif 200<=yade.runtime.ipython_version<500:
 		extensions.append('ipython_directive200')
+	else:
+		extensions.append('ipython_directive500')
 
 # the sidebar extension
 if False:

=== modified file 'doc/sphinx/book/confReference.py'
--- doc/sphinx/book/confReference.py	2015-12-04 06:19:11 +
+++ doc/sphinx/book/confReference.py	2016-11-02 22:08:33 +
@@ -357,10 +357,12 @@
 	else:
 		if 12<=yade.runtime.ipython_version<13:
 			import ipython_directive012 as id
-elif 13<=yade.runtime.ipython_version<200:
+		elif 13<=yade.runtime.ipython_version<200:
 			import ipython_directive013 as id
-else:
+		elif 200<=yade.runtime.ipython_version<500:
 			import ipython_directive200 as id
+		else:
+			import ipython_directive500 as id
 
 	#The next four lines are for compatibility with IPython 0.13.1
 	ipython_rgxin =re.compile(r'(?:In |Yade )\[(\d+)\]:\s?(.*)\s*')
@@ -407,10 +409,12 @@
 else:
 	if 12<=yade.runtime.ipython_version<13:
 		extensions.append('ipython_directive012')
-elif 13<=yade.runtime.ipython_version<200:
+	elif 13<=yade.runtime.ipython_version<200:
 		extensions.append('ipython_directive013')
-else:
+	elif 200<=yade.runtime.ipython_version<500:
 		extensions.append('ipython_directive200')
+	else:
+		extensions.append('ipython_directive500')
 
 # the sidebar extension
 if False:

=== modified file 'doc/sphinx/book/confTheory.py'
--- doc/sphinx/book/confTheory.py	2015-12-04 06:19:11 +
+++ doc/sphinx/book/confTheory.py	2016-11-02 22:08:33 +
@@ -357,10 +357,12 @@
 	else:
 		if 12<=yade.runtime.ipython_version<13:
 			import ipython_directive012 as id
-elif 13<=yade.runtime.ipython_version<200:
+		elif 13<=yade.runtime.ipython_version<200:
 			import ipython_directive013 as id
-else:
+		elif 200<=yade.runtime.ipython_version<500:
 			import ipython_directive200 as id
+		else:
+			import ipython_directive500 as id
 
 	#The next four lines are for compatibility with IPython 0.13.1
 	ipython_rgxin =re.compile(r'(?:In |Yade )\[(\d+)\]:\s?(.*)\s*')
@@ -407,10 +409,12 @@
 else:
 	if 12<=yade.runtime.ipython_version<13:
 		

[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 3961: Law2_ScGeom_CapillaryPhys_Capillarity: cache getClassIndex() for use in a loop


revno: 3961
committer: bchareyre 
timestamp: Wed 2016-11-02 16:14:59 +0100
message:
  Law2_ScGeom_CapillaryPhys_Capillarity: cache getClassIndex() for use in a loop
modified:
  pkg/dem/Law2_ScGeom_CapillaryPhys_Capillarity.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 'pkg/dem/Law2_ScGeom_CapillaryPhys_Capillarity.cpp'
--- pkg/dem/Law2_ScGeom_CapillaryPhys_Capillarity.cpp	2016-10-26 16:59:05 +
+++ pkg/dem/Law2_ScGeom_CapillaryPhys_Capillarity.cpp	2016-11-02 15:14:59 +
@@ -63,6 +63,7 @@
 	if (!scene) cerr << "scene not defined!";
 	if (!capillary) postLoad(*this);//when the script does not define arguments, postLoad is never called
 	shared_ptr& bodies = scene->bodies;
+	int sphereIndex = Sphere::getClassIndexStatic();
 	
 	//check for contact model once (assuming that contact model does not change)
 	if (!hertzInitialized){//NOTE: We are assuming that only one type is used in one simulation here
@@ -99,12 +100,10 @@
 			/// test of interacting bodies geometries since capillarity will be computed between spheres only
 			int geometryIndex1 = (*bodies)[id1]->shape->getClassIndex();
 			int geometryIndex2 = (*bodies)[id2]->shape->getClassIndex();
-			if ( (geometryIndex1 != geometryIndex2) || (geometryIndex1!=Sphere::getClassIndexStatic()) ) { // such interactions won't have a meniscus
-if(currentContactGeometry->penetrationDepth < 0) // thus we will ask for the interaction to be erased in this distant case, as we do w. sphere-sphere interactions below:
-	scene->interactions->requestErase(interaction);
+			if ( !(geometryIndex1 == sphereIndex && geometryIndex2 == sphereIndex) ) { // such interactions won't have a meniscus
+ // thus we will ask for the interaction to be erased in this distant case, as we do w. sphere-sphere interactions below:
+if(currentContactGeometry->penetrationDepth < 0) scene->interactions->requestErase(interaction);
 continue;}
-
-
 			/// Interacting Grains:
 			// If you want to define a ratio between YADE sphere size and real sphere size
 			Real alpha=1;
@@ -115,7 +114,6 @@
 
 			/// intergranular distance
 			Real D = - alpha * currentContactGeometry->penetrationDepth;
-
 			if ( D<0 || createDistantMeniscii) { //||(scene->iter < 1) ) // a simplified way to define meniscii everywhere
 D=max(0.,D); // defines fCap when spheres interpenetrate. D<0 leads to wrong interpolation as D<0 has no solution in the interpolation : this is not physically interpretable!! even if, interpenetration << grain radius.
 if (!hertzOn) {

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 3963: FlowEngine: enable the definition of continuum scale permeability independent of particle sizes


revno: 3963
committer: bchareyre 
timestamp: Wed 2016-11-02 16:14:59 +0100
message:
  FlowEngine: enable the definition of continuum scale permeability independent 
of particle sizes
modified:
  lib/triangulation/FlowBoundingSphere.ipp
  lib/triangulation/PeriodicFlow.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 'lib/triangulation/FlowBoundingSphere.ipp'
--- lib/triangulation/FlowBoundingSphere.ipp	2016-10-25 22:18:50 +
+++ lib/triangulation/FlowBoundingSphere.ipp	2016-11-02 15:14:59 +
@@ -61,7 +61,7 @@
 	fluidBulkModulus = 0;
 	tessBasedForce = true;
 	for (int i=0;i<6;i++) boundsIds[i] = 0;
-	minPermLength=-1;
+	minPermLength=1e-6;// multiplier applied on throat radius to define a minimal throat length (escaping coincident points)
 	slipBoundary = false;//no-slip/symmetry conditions on lateral boundaries
 	tolerance = 1e-07;
 	relax = 1.9;
@@ -530,14 +530,12 @@
 Sphere& v0 = W[0]->point();
 Sphere& v1 = W[1]->point();
 Sphere& v2 = W[2]->point();
-
 cell->info().facetSphereCrossSections[j]=CVector(
    W[0]->info().isFictious ? 0 : 0.5*v0.weight()*acos((v1-v0)*(v2-v0)/sqrt((v1-v0).squared_length()*(v2-v0).squared_length())),
    W[1]->info().isFictious ? 0 : 0.5*v1.weight()*acos((v0-v1)*(v2-v1)/sqrt((v1-v0).squared_length()*(v2-v1).squared_length())),
    W[2]->info().isFictious ? 0 : 0.5*v2.weight()*acos((v0-v2)*(v1-v2)/sqrt((v1-v2).squared_length()*(v2-v0).squared_length(;
 //FIXME: it should be possible to skip completely blocked cells, currently the problem is it segfault for undefined areas
 // if (cell->info().blocked) continue;//We don't need permeability for blocked cells, it will be set to zero anyway
-
 pass+=1;
 CVector l = p1 - p2;
 distance = sqrt(l.squared_length());
@@ -550,7 +548,7 @@
 }
 Real fluidArea=0;
 if (distance!=0) {
-	if (minPermLength>0 && distanceCorrection) distance=max(minPermLength,distance);
+	if (minPermLength>0 && distanceCorrection) distance=max(minPermLength*radius,distance);
 	const CVector& Surfk = cell->info().facetSurfaces[j];
 	Real area = sqrt(Surfk.squared_length());
 	const CVector& crossSections = cell->info().facetSphereCrossSections[j];
@@ -561,16 +559,16 @@
 	//take absolute value, since in rare cases the surface can be negative (overlaping spheres)
 	fluidArea=std::abs(area-crossSections[0]-crossSections[1]-crossSections[2]+S0);
 	cell->info().facetFluidSurfacesRatio[j]=fluidArea/area;
-	k=(fluidArea * pow(radius,2)) / (8*viscosity*distance);
-	 meanDistance += distance;
-	 meanRadius += radius;
-	 meanK +=  k*kFactor;
-
-if (k<0 && debugOut) {surfneg+=1;
-cout<<"__ k<0 __"<info().id()<<" "<info().id()<<" "<info().id()<<" "<0) cell->info().kNorm()[j]= kFactor*(fluidArea * pow(radius,2)) / (8*viscosity*distance);
+	else cell->info().kNorm()[j]= -kFactor * area / distance;		
+	meanDistance += distance;
+	meanRadius += radius;
+	meanK +=  (cell->info().kNorm())[j];
+	
+	if (!neighbourCell->info().isGhost) (neighbourCell->info().kNorm())[Tri.mirror_index(cell, j)]= (cell->info().kNorm())[j];
+	if (k<0 && debugOut) {surfneg+=1; cout<<"__ k<0 __"<info().id()<<" "<info().id()<<" "<info().id()<<" "<info().kNorm())[j]= k*kFactor;
 if (!neighbourCell->info().isGhost) (neighbourCell->info().kNorm())[Tri.mirror_index(cell, j)]= (cell->info().kNorm())[j];
 			}
 		}

=== modified file 'lib/triangulation/PeriodicFlow.hpp'
--- lib/triangulation/PeriodicFlow.hpp	2016-04-12 04:37:00 +
+++ lib/triangulation/PeriodicFlow.hpp	2016-11-02 15:14:59 +
@@ -221,7 +221,7 @@
 	Real fluidArea=0;
 	int test=0;
 	if (distance!=0) {
-		if (minPermLength>0 && distanceCorrection) distance=max(minPermLength,distance);
+		if (minPermLength>0 && distanceCorrection) distance=max(minPermLength*radius,distance);
 		const CVector& Surfk = cell->info().facetSurfaces[j];
 		Real area = sqrt(Surfk.squared_length());
 		const CVector& crossSections = cell->info().facetSphereCrossSections[j];
@@ -232,17 

[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 3962: fix wrong access to a Network::boundary by index


revno: 3962
committer: bchareyre 
timestamp: Wed 2016-11-02 16:14:59 +0100
message:
  fix wrong access to a Network::boundary by index
modified:
  lib/triangulation/Network.ipp


--
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 'lib/triangulation/Network.ipp'
--- lib/triangulation/Network.ipp	2016-10-24 11:17:04 +
+++ lib/triangulation/Network.ipp	2016-11-02 15:14:59 +
@@ -108,7 +108,7 @@
 {
 double A [3], B[3];
 
-Boundary  =  boundaries [SV1->info().id()];
+Boundary  =  boundary(SV1->info().id());
 	
 for (int m=0;m<3;m++) {A[m]= (SV2->point())[m];}
 for (int m=0;m<3;m++) {B[m]= (SV3->point())[m];}

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 3959: Add cell label for phase cluster. NW-res label 0, W-res label 1, disconnected w-clusters start fr...


revno: 3959
committer: Chao Yuan 
timestamp: Wed 2016-11-02 11:40:55 +0100
message:
  Add cell label for phase cluster. NW-res label 0, W-res label 1, disconnected 
w-clusters start from 2. label can be saved in savePhaseVtk.
modified:
  pkg/pfv/TwoPhaseFlowEngine.cpp
  pkg/pfv/TwoPhaseFlowEngine.hpp
  pkg/pfv/UnsaturatedEngine.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 'pkg/pfv/TwoPhaseFlowEngine.cpp'
--- pkg/pfv/TwoPhaseFlowEngine.cpp	2015-09-24 07:25:27 +
+++ pkg/pfv/TwoPhaseFlowEngine.cpp	2016-11-02 10:40:55 +
@@ -39,6 +39,7 @@
 		computePoreBodyVolume();//save capillary volume of all cells, for fast calculating saturation
 		computeSolidLine();//save cell->info().solidLine[j][y]
 		initializeReservoirs();//initial pressure, reservoir flags and local pore saturation
+		if(isCellLabelActivated) updateReservoirLabel();
 		solver->noCache = true;
 }
 
@@ -410,6 +411,13 @@
 		if (isDrawable){vtkfile.write_data(cell->info().saturation);}
 	}
 	vtkfile.end_data();
+
+	vtkfile.begin_data("Label",CELL_DATA,SCALARS,FLOAT);
+	for (FiniteCellsIterator cell = Tri.finite_cells_begin(); cell != Tri.finite_cells_end(); ++cell) {
+		bool isDrawable = cell->info().isReal() && cell->vertex(0)->info().isReal() && cell->vertex(1)->info().isReal() && cell->vertex(2)->info().isReal()  && cell->vertex(3)->info().isReal();
+		if (isDrawable){vtkfile.write_data(cell->info().label);}
+	}
+	vtkfile.end_data();
 }
 void TwoPhaseFlowEngine::computePoreThroatRadiusTrickyMethod1()
 {
@@ -654,5 +662,56 @@
   cell->info().p() = Pg - Pc; */
 }
 
+void TwoPhaseFlowEngine:: updateReservoirLabel()
+{
+RTriangulation& tri = solver->T[solver->currentTes].Triangulation();
+FiniteCellsIterator cellEnd = tri.finite_cells_end();
+for ( FiniteCellsIterator cell = tri.finite_cells_begin(); cell != cellEnd; cell++ ) {
+  if (cell->info().isNWRes) cell->info().label=0;
+  else if (cell->info().isWRes) cell->info().label=1;
+  else if (cell->info().label>1) continue;
+  else cell->info().label=-1;
+}
+}
+
+void TwoPhaseFlowEngine:: updateCellLabel()
+{
+int currentLabel = getMaxCellLabel();
+updateReservoirLabel();
+RTriangulation& tri = solver->T[solver->currentTes].Triangulation();
+FiniteCellsIterator cellEnd = tri.finite_cells_end();
+for ( FiniteCellsIterator cell = tri.finite_cells_begin(); cell != cellEnd; cell++ ) {
+if (cell->info().label==-1) {
+updateSingleCellLabelRecursion(cell,currentLabel+1);
+currentLabel++;
+}
+}
+}
+
+int TwoPhaseFlowEngine:: getMaxCellLabel()
+{
+int maxLabel=-1;
+RTriangulation& tri = solver->T[solver->currentTes].Triangulation();
+FiniteCellsIterator cellEnd = tri.finite_cells_end();
+for ( FiniteCellsIterator cell = tri.finite_cells_begin(); cell != cellEnd; cell++ ) {
+if (cell->info().label>maxLabel) maxLabel=cell->info().label;
+}
+return maxLabel;
+}
+
+void TwoPhaseFlowEngine:: updateSingleCellLabelRecursion(CellHandle cell, int label)
+{
+cell->info().label=label;
+for (int facet = 0; facet < 4; facet ++) {
+CellHandle nCell = cell->neighbor(facet);
+if (solver->T[solver->currentTes].Triangulation().is_infinite(nCell)) continue;
+// if (nCell->info().Pcondition) continue;
+// if ( (nCell->info().isFictious) && (!isInvadeBoundary) ) continue;
+//TODO:the following condition may relax to relate to nCell->info().hasInterface
+if ( (nCell->info().saturation==cell->info().saturation) && (nCell->info().label!=cell->info().label) )
+updateSingleCellLabelRecursion(nCell,label);
+}
+}
+
 #endif //TwoPhaseFLOW
  

=== modified file 'pkg/pfv/TwoPhaseFlowEngine.hpp'
--- pkg/pfv/TwoPhaseFlowEngine.hpp	2016-10-24 11:41:05 +
+++ pkg/pfv/TwoPhaseFlowEngine.hpp	2016-11-02 10:40:55 +
@@ -34,6 +34,7 @@
 	int windowsID;//a temp cell info for experiment comparison(used by chao)
 	double solidLine [4][4];//the length of intersecting line between sphere and facet. [i][j] is for facet "i" and sphere (facetVertices)"[i][j]". Last component [i][3] for 1/sumLines in the facet "i" (used by chao).
 	
+	int label;//for marking disconnected clusters. initally all set to -1; first update -> connect to NW-res: 0; connect to W-res: 1; then label disconnected W-clusters by 2,3,4...
 	TwoPhaseCellInfo (void)
 	{
 		isWRes = true; isNWRes = false; isTrapW = false; isTrapNW = false;
@@ -45,6 +46,7 @@
 		poreBodyVolume = 0;
 		windowsID = 0;
 		for (int k=0; k<4;k++) for (int l=0; l<4;l++) solidLine[k][l]=0;
+		label=-1;
 	}
 	
 };
@@ -91,7 +93,11 @@
 	void computePoreThroatRadiusMethod3();
 	void savePoreNetwork();
 	
-	
+	void 

[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 3960: fix comment on label.


revno: 3960
committer: Chao Yuan 
timestamp: Wed 2016-11-02 11:47:10 +0100
message:
  fix comment on label.
modified:
  pkg/pfv/TwoPhaseFlowEngine.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/pfv/TwoPhaseFlowEngine.hpp'
--- pkg/pfv/TwoPhaseFlowEngine.hpp	2016-11-02 10:40:55 +
+++ pkg/pfv/TwoPhaseFlowEngine.hpp	2016-11-02 10:47:10 +
@@ -34,7 +34,7 @@
 	int windowsID;//a temp cell info for experiment comparison(used by chao)
 	double solidLine [4][4];//the length of intersecting line between sphere and facet. [i][j] is for facet "i" and sphere (facetVertices)"[i][j]". Last component [i][3] for 1/sumLines in the facet "i" (used by chao).
 	
-	int label;//for marking disconnected clusters. initally all set to -1; first update -> connect to NW-res: 0; connect to W-res: 1; then label disconnected W-clusters by 2,3,4...
+	int label;//for marking disconnected clusters. NW-res: 0; W-res: 1; W-clusters by 2,3,4...
 	TwoPhaseCellInfo (void)
 	{
 		isWRes = true; isNWRes = false; isTrapW = false; isTrapNW = false;

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 3958: Doc: small updates in PartialEngine and KinematicEngines


revno: 3958
committer: jduriez 
timestamp: Mon 2016-10-31 11:59:22 -0600
message:
  Doc: small updates in PartialEngine and KinematicEngines
modified:
  core/PartialEngine.hpp
  pkg/common/KinematicEngines.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 'core/PartialEngine.hpp'
--- core/PartialEngine.hpp	2015-05-22 05:46:49 +
+++ core/PartialEngine.hpp	2016-10-31 17:59:22 +
@@ -14,8 +14,8 @@
 class PartialEngine: public Engine{
 	public:
 		virtual ~PartialEngine() {};
-	YADE_CLASS_BASE_DOC_ATTRS(PartialEngine,Engine,"Engine affecting only particular bodies in the simulation, defined by *ids*.",
-		((std::vector,ids,,,":yref:`Ids` of bodies affected by this PartialEngine."))
+	YADE_CLASS_BASE_DOC_ATTRS(PartialEngine,Engine,"Engine affecting only particular bodies in the simulation, defined by :yref:`ids attribute`.",
+		((std::vector,ids,,,":yref:`Ids` list of bodies affected by this PartialEngine."))
 	);
 };
 REGISTER_SERIALIZABLE(PartialEngine);

=== modified file 'pkg/common/KinematicEngines.hpp'
--- pkg/common/KinematicEngines.hpp	2014-10-15 06:44:01 +
+++ pkg/common/KinematicEngines.hpp	2016-10-31 17:59:22 +
@@ -33,9 +33,9 @@
 struct TranslationEngine: public KinematicEngine{
 	virtual void apply(const vector& ids);
 	void postLoad(TranslationEngine&){ translationAxis.normalize(); }
-	YADE_CLASS_BASE_DOC_ATTRS(TranslationEngine,KinematicEngine,"This engine is the base class for different engines, which require any kind of motion.",
-		((Real,velocity,,,"Velocity [m/s]"))
-		((Vector3r,translationAxis,,Attr::triggerPostLoad,"Direction [Vector3]"))
+	YADE_CLASS_BASE_DOC_ATTRS(TranslationEngine,KinematicEngine,"Engine applying translation motion (by setting linear velocity) to subscribed bodies.",
+		((Real,velocity,,,"Scalar value of the imposed velocity [m/s]. Imposed vector velocity is :yref:`velocity` * :yref:`axis`"))
+		((Vector3r,translationAxis,,Attr::triggerPostLoad,"Direction of imposed translation [Vector3]"))
 	);
 };
 REGISTER_SERIALIZABLE(TranslationEngine);

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 3957: Capillary law2: restricting test shape. Plus minor change in capillaryLaplaceYoung/README text file


revno: 3957
committer: jduriez 
timestamp: Wed 2016-10-26 10:59:05 -0600
message:
  Capillary law2: restricting test shape. Plus minor change in 
capillaryLaplaceYoung/README text file
modified:
  examples/capillaryLaplaceYoung/README.txt
  pkg/dem/Law2_ScGeom_CapillaryPhys_Capillarity.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 'examples/capillaryLaplaceYoung/README.txt'
--- examples/capillaryLaplaceYoung/README.txt	2016-09-21 20:32:36 +
+++ examples/capillaryLaplaceYoung/README.txt	2016-10-26 16:59:05 +
@@ -6,7 +6,7 @@
 
 Two examples of simulations using Law2_ScGeom_CapillaryPhys_Capillarity are herein provided:
 
-- CapillaryPhys-example.py illustrates the mutual attraction due to capillary interaction in a simple packing
+- CapillaryPhys-example.py is a (simple) packing-scale simulation considering capillary interaction and gravity
 - capillaryBridge.py defines and let evolve a capillary bridge between two particles only
 
 
@@ -21,7 +21,7 @@
 - solveLiqBridge.m solves the Laplace-Young equation for one given bridge, defined in terms of the input attributes of the solveLiqBridge function (see therein). The solveLiqBridge function is usually called by other files (see below) during capillary files generation, however it can also be executed on its own in order to study (e.g. plot) capillary bridge profile.
 
 Code comments include references to:
- * Duriez2016: J. Duriez and R. Wan, Contact angle mechanical influence for wet granular soils, currently under Review in Acta Geotechnica
+ * Duriez2016: J. Duriez and R. Wan, Contact angle mechanical influence for wet granular soils, Acta Geotechnica, 2016, doi:10.1007/s11440-016-0500-6
  * Lian1993: G. Lian and C. Thornton and M. J. Adams, A Theoretical Study of the Liquid Bridge Forces between Two Rigid Spherical Bodies, Journal of Colloid and Interface Science, 161(1), 1993
  * Scholtes2008 (french): L. Scholtes, Modelisation Micro-Mecanique des Milieux Granulaires Partiellement Satures, PhD Thesis from Institut polytechnique de Grenoble, 2008
  * Soulie2005 (french): F. Soulie, Cohesion par capillarite et comportement mecanique de milieux granulaires, PhD Thesis from Universite Montpellier II, 2005

=== modified file 'pkg/dem/Law2_ScGeom_CapillaryPhys_Capillarity.cpp'
--- pkg/dem/Law2_ScGeom_CapillaryPhys_Capillarity.cpp	2016-10-25 17:53:35 +
+++ pkg/dem/Law2_ScGeom_CapillaryPhys_Capillarity.cpp	2016-10-26 16:59:05 +
@@ -15,6 +15,7 @@
 #include 
 #include 
 #include 
+#include 
 
 YADE_PLUGIN((Law2_ScGeom_CapillaryPhys_Capillarity));
 
@@ -95,11 +96,11 @@
 			/// definition of interacting objects (not necessarily in contact)
 			ScGeom* currentContactGeometry = static_cast(interaction->geom.get());
 			
-			/// interaction geometry search (this test is to compute capillarity only between spheres (probably a better way to do that)
-			int geometryIndex1 = (*bodies)[id1]->shape->getClassIndex(); // !!!
+			/// test of interacting bodies geometries since capillarity will be computed between spheres only
+			int geometryIndex1 = (*bodies)[id1]->shape->getClassIndex();
 			int geometryIndex2 = (*bodies)[id2]->shape->getClassIndex();
-			if (!(geometryIndex1 == geometryIndex2)) { // such interactions won't have a meniscus
-if(currentContactGeometry->penetrationDepth < 0) // thus we will ask for the interaction to be erased, as we do w. sphere-sphere interactions below:
+			if ( (geometryIndex1 != geometryIndex2) || (geometryIndex1!=Sphere::getClassIndexStatic()) ) { // such interactions won't have a meniscus
+if(currentContactGeometry->penetrationDepth < 0) // thus we will ask for the interaction to be erased in this distant case, as we do w. sphere-sphere interactions below:
 	scene->interactions->requestErase(interaction);
 continue;}
 

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 3956: push a file missing in commit e91ff135b7


revno: 3956
committer: Bruno Chareyre 
timestamp: Wed 2016-10-26 00:18:50 +0200
message:
  push a file missing in commit e91ff135b7
modified:
  lib/triangulation/FlowBoundingSphere.ipp


--
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 'lib/triangulation/FlowBoundingSphere.ipp'
--- lib/triangulation/FlowBoundingSphere.ipp	2016-04-12 04:37:00 +
+++ lib/triangulation/FlowBoundingSphere.ipp	2016-10-25 22:18:50 +
@@ -747,7 +747,7 @@
 	RTriangulation& Tri = T[currentTes].Triangulation();
 if (Tri.is_infinite(cell->neighbor(j))) return 0;
 	double Vpore = this->volumePoreVoronoiFraction(cell, j);
-	double Ssolid = this->surfaceSolidPore(cell, j, slipBoundary, /*reuse the same facet data*/ true);
+	double Ssolid = this->surfaceSolidThroat(cell, j, slipBoundary, /*reuse the same facet data*/ true);
 
 	//handle symmetry (tested ok)
 	if (slipBoundary && facetNFictious>0) {

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 3955: Capillary law2: erasing when necessary sphere-non sphere interactions (bug LP: #1628273) + minor ...


revno: 3955
committer: jduriez 
timestamp: Tue 2016-10-25 11:53:35 -0600
message:
  Capillary law2: erasing when necessary sphere-non sphere interactions (bug 
LP: #1628273) + minor changes
modified:
  pkg/dem/Law2_ScGeom_CapillaryPhys_Capillarity.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 'pkg/dem/Law2_ScGeom_CapillaryPhys_Capillarity.cpp'
--- pkg/dem/Law2_ScGeom_CapillaryPhys_Capillarity.cpp	2016-09-21 16:20:15 +
+++ pkg/dem/Law2_ScGeom_CapillaryPhys_Capillarity.cpp	2016-10-25 17:53:35 +
@@ -92,16 +92,17 @@
 			unsigned int id1 = interaction->getId1();
 			unsigned int id2 = interaction->getId2();
 
+			/// definition of interacting objects (not necessarily in contact)
+			ScGeom* currentContactGeometry = static_cast(interaction->geom.get());
+			
 			/// interaction geometry search (this test is to compute capillarity only between spheres (probably a better way to do that)
 			int geometryIndex1 = (*bodies)[id1]->shape->getClassIndex(); // !!!
 			int geometryIndex2 = (*bodies)[id2]->shape->getClassIndex();
-			if (!(geometryIndex1 == geometryIndex2)) continue;
-
-			/// definition of interacting objects (not necessarily in contact)
-			ScGeom* currentContactGeometry = static_cast(interaction->geom.get());
-
-			/// Capillary components definition:
-			Real liquidTension = surfaceTension;
+			if (!(geometryIndex1 == geometryIndex2)) { // such interactions won't have a meniscus
+if(currentContactGeometry->penetrationDepth < 0) // thus we will ask for the interaction to be erased, as we do w. sphere-sphere interactions below:
+	scene->interactions->requestErase(interaction);
+continue;}
+
 
 			/// Interacting Grains:
 			// If you want to define a ratio between YADE sphere size and real sphere size
@@ -128,8 +129,8 @@
 
 			/// Suction (Capillary pressure):
 			Real Pinterpol = 0;
-			if (!hertzOn) Pinterpol = cundallContactPhysics->isBroken ? 0 : capillaryPressure*(R2/liquidTension);
-			else Pinterpol = mindlinContactPhysics->isBroken ? 0 : capillaryPressure*(R2/liquidTension);
+			if (!hertzOn) Pinterpol = cundallContactPhysics->isBroken ? 0 : capillaryPressure*(R2/surfaceTension);
+			else Pinterpol = mindlinContactPhysics->isBroken ? 0 : capillaryPressure*(R2/surfaceTension);
 			if (!hertzOn) cundallContactPhysics->capillaryPressure = capillaryPressure;
 			else mindlinContactPhysics->capillaryPressure = capillaryPressure;
 
@@ -149,7 +150,7 @@
 }
 /// capillary adhesion force
 Real Finterpol = solution.F;
-Vector3r fCap = - Finterpol*(2*Mathr::PI*(R2/alpha)*liquidTension)*currentContactGeometry->normal;
+Vector3r fCap = - Finterpol*(2*Mathr::PI*(R2/alpha)*surfaceTension)*currentContactGeometry->normal;
 if (!hertzOn) cundallContactPhysics->fCap = fCap;
 else mindlinContactPhysics->fCap = fCap;
 /// meniscus volume

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 3953: Introduce Network::surfaceSolidThroatInPore() for partial solid surfaces per half-throat


revno: 3953
committer: Bruno Chareyre 
timestamp: Mon 2016-10-24 13:17:04 +0200
message:
  Introduce Network::surfaceSolidThroatInPore() for partial solid surfaces per 
half-throat
  
  - Introduce Network::surfaceSolidThroatInPore() for partial solid
  surfaces per half-throat
  - consistent triangulation of clumps vs. clump members depending on
  Flow::convertClumps
  - consistent use of mask for selective triangulation of bodies
  - conditional summation of forces to skip boundaries when introduced as
  additional bodies (grep maxBodyId)
  - make consistent use of idOffset for those cases
  - introduce wall normals
modified:
  lib/triangulation/FlowBoundingSphere.hpp
  lib/triangulation/Network.hpp
  lib/triangulation/Network.ipp
  pkg/pfv/FlowEngine.hpp.in
  pkg/pfv/FlowEngine.ipp.in


--
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 'lib/triangulation/FlowBoundingSphere.hpp'
--- lib/triangulation/FlowBoundingSphere.hpp	2014-10-29 16:49:20 +
+++ lib/triangulation/FlowBoundingSphere.hpp	2016-10-24 11:17:04 +
@@ -30,7 +30,7 @@
 		//painfull, but we need that for templates inheritance...
 		using _N::T; using _N::xMin; using _N::xMax; using _N::yMin; using _N::yMax; using _N::zMin; using _N::zMax; using _N::Rmoy; using _N::sectionArea; using _N::Height; using _N::vTotal; using _N::currentTes; using _N::debugOut; using _N::nOfSpheres; using _N::xMinId; using _N::xMaxId; using _N::yMinId; using _N::yMaxId; using _N::zMinId; using _N::zMaxId; using _N::boundsIds; using _N::cornerMin; using _N::cornerMax;  using _N::VSolidTot; using _N::Vtotalissimo; using _N::vPoral; using _N::sSolidTot; using _N::vPoralPorosity; using _N::vTotalPorosity; using _N::boundaries; using _N::idOffset; using _N::vtkInfiniteVertices; using _N::vtkInfiniteCells; using _N::num_particles; using _N::boundingCells; using _N::facetVertices; using _N::facetNFictious;
 		//same for functions
-		using _N::defineFictiousCells; using _N::addBoundingPlanes; using _N::boundary; using _N::tesselation;
+		using _N::defineFictiousCells; using _N::addBoundingPlanes; using _N::boundary; using _N::tesselation; using _N::surfaceSolidThroatInPore;
 
 		virtual ~FlowBoundingSphere();
  		FlowBoundingSphere();

=== modified file 'lib/triangulation/Network.hpp'
--- lib/triangulation/Network.hpp	2014-06-06 15:27:15 +
+++ lib/triangulation/Network.hpp	2016-10-24 11:17:04 +
@@ -78,7 +78,8 @@
 		double volumeDoubleFictiousPore(VertexHandle SV1, VertexHandle SV2, VertexHandle SV3, Point PV1);
 		double volumeSingleFictiousPore(VertexHandle SV1, VertexHandle SV2, VertexHandle SV3, Point PV1);
 		double volumePoreVoronoiFraction ( CellHandle& cell, int& j, bool reuseFacetData=false);
-		double surfaceSolidPore( CellHandle cell, int j, bool slipBoundary, bool reuseFacetData=false);
+		double surfaceSolidThroat( CellHandle cell, int j, bool slipBoundary, bool reuseFacetData=false);
+		double surfaceSolidThroatInPore( CellHandle cell, int j, bool slipBoundary, bool reuseFacetData=false);// returns the solid area in the throat, keeping only that part of the throat in cell
 		double sphericalTriangleArea ( Sphere STA1, Sphere STA2, Sphere STA3, Point PTA1 );
 		
 		CVector surfaceDoubleFictiousFacet(VertexHandle fSV1, VertexHandle fSV2, VertexHandle SV3);

=== modified file 'lib/triangulation/Network.ipp'
--- lib/triangulation/Network.ipp	2015-03-26 09:17:44 +
+++ lib/triangulation/Network.ipp	2016-10-24 11:17:04 +
@@ -251,7 +251,7 @@
 }
 
 template
-double Network::surfaceSolidPore(CellHandle cell, int j, bool slipBoundary, bool reuseFacetData)
+double Network::surfaceSolidThroat(CellHandle cell, int j, bool slipBoundary, bool reuseFacetData)
 {
   if (!reuseFacetData)  facetNFictious=detectFacetFictiousVertices(cell,j);
   Point& p1 = cell->info();
@@ -358,6 +358,70 @@
 }
 
 template
+double Network::surfaceSolidThroatInPore(CellHandle cell, int j, bool slipBoundary, bool reuseFacetData)
+{
+  if (!reuseFacetData)  facetNFictious=detectFacetFictiousVertices(cell,j);
+  Point& p1 = cell->info();
+  Point& p2 = cell->neighbor(j)->info();
+  double Ssolid1= 0, Ssolid2= 0, Ssolid3= 0;
+  Sphere v [3];
+  VertexHandle W [3];
+
+  for (int kk=0; kk<3; kk++) {
+	  W[kk] = cell->vertex(facetVertices[j][kk]);
+	  v[kk] = cell->vertex(facetVertices[j][kk])->point();}
+
+  switch (facetNFictious) {
+case (0) : {
+		VertexHandle& SV1 = W[0];
+VertexHandle& SV2 = W[1];
+VertexHandle& SV3 = W[2];
+
+		Ssolid1 = fastSphericalTriangleArea(SV1->point(), SV2->point(), p1, SV3->point());
+Ssolid2 = fastSphericalTriangleArea(SV2->point(),SV1->point(),p1, SV3->point());
+Ssolid3 = 

[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 3954: make the recursion conditional for invasion in multiphase flow


revno: 3954
committer: Bruno Chareyre 
timestamp: Mon 2016-10-24 13:41:05 +0200
message:
  make the recursion conditional for invasion in multiphase flow
modified:
  pkg/pfv/TwoPhaseFlowEngine.hpp
  pkg/pfv/UnsaturatedEngine.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 'pkg/pfv/TwoPhaseFlowEngine.hpp'
--- pkg/pfv/TwoPhaseFlowEngine.hpp	2015-09-24 07:25:27 +
+++ pkg/pfv/TwoPhaseFlowEngine.hpp	2016-10-24 11:41:05 +
@@ -127,6 +127,7 @@
 
 	YADE_CLASS_BASE_DOC_ATTRS_INIT_CTOR_PY(TwoPhaseFlowEngine,TwoPhaseFlowEngineT,"documentation here",
 	((double,surfaceTension,0.0728,,"Water Surface Tension in contact with air at 20 Degrees Celsius is: 0.0728(N/m)"))
+	((bool,recursiveInvasion,true,,"If true the invasion stops only when no entry pc is less than current capillary pressure, implying simultaneous invasion of many pores. Else only one pore invasion per invasion step."))
 	((bool,initialWetting,true,,"Initial wetting saturated (=true) or non-wetting saturated (=false)"))
 	((bool, isPhaseTrapped,true,,"If True, both phases can be entrapped by the other, which would correspond to snap-off. If false, both phases are always connected to their reservoirs, thus no snap-off."))
 	((bool, isInvadeBoundary, true,,"Invasion side boundary condition. If True, pores of side boundary can be invaded; if False, the pore throats connecting side boundary are closed, those pores are excluded in saturation calculation."))	

=== modified file 'pkg/pfv/UnsaturatedEngine.cpp'
--- pkg/pfv/UnsaturatedEngine.cpp	2015-06-30 14:20:30 +
+++ pkg/pfv/UnsaturatedEngine.cpp	2016-10-24 11:41:05 +
@@ -211,7 +211,7 @@
 	nCell->info().saturation=localSaturation;
 	nCell->info().hasInterface=false;
 	if(solver->debugOut) {cerr<<"drainage"<info().p()>nPcThroat) && (localPressure-nCell->info().p()info().hasInterface==false) && (nCell->info().hasInterface==false) ) {
@@ -227,7 +227,7 @@
 	nCell->info().p() = localPressure;
 	nCell->info().saturation=localSaturation;
 	if(solver->debugOut) {cerr<<"imbibition"<info().p()-localPressureinfo().p()-localPressure>nPcThroat) /*&& (cell->info().hasInterface==false) && (nCell->info().hasInterface==false)*/ ) {

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 3952: making all Law2::go virtual


revno: 3952
committer: Jan Stransky 
timestamp: Fri 2016-10-21 15:50:25 +0200
message:
  making all Law2::go virtual
modified:
  pkg/dem/BubbleMat.hpp
  pkg/dem/ConcretePM.hpp
  pkg/dem/MortarMat.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/BubbleMat.hpp'
--- pkg/dem/BubbleMat.hpp	2014-10-15 06:44:01 +
+++ pkg/dem/BubbleMat.hpp	2016-10-21 13:50:25 +
@@ -74,7 +74,7 @@
 	  Real c1; //Coeff used for many contacts
   
 	public:
-	bool go(shared_ptr& _geom, shared_ptr& _phys, Interaction* interaction);
+	virtual bool go(shared_ptr& _geom, shared_ptr& _phys, Interaction* interaction);
 	FUNCTOR2D(GenericSpheresContact,BubblePhys);
 	YADE_CLASS_BASE_DOC_ATTRS_CTOR_PY(Law2_ScGeom_BubblePhys_Bubble,LawFunctor,"Constitutive law for Bubble model.",
 		((Real,pctMaxForce,0.1,,"Chan[2011] states the contact law is valid only for small interferences; therefore an exponential force-displacement curve models the contact stiffness outside that regime (large penetration). This artificial stiffening ensures that bubbles will not pass through eachother or completely overlap during the simulation. The maximum force is Fmax = (2*pi*surfaceTension*rAvg). pctMaxForce is the percentage of the maximum force dictates the separation threshold, Dmax, for each contact. Penetrations less than Dmax calculate the reaction force from the derived contact law, while penetrations equal to or greater than Dmax calculate the reaction force from the artificial exponential curve."))

=== modified file 'pkg/dem/ConcretePM.hpp'
--- pkg/dem/ConcretePM.hpp	2016-06-01 06:46:05 +
+++ pkg/dem/ConcretePM.hpp	2016-10-21 13:50:25 +
@@ -259,7 +259,7 @@
 
 class Law2_ScGeom_CpmPhys_Cpm: public LawFunctor{
 	public:
-	bool go(shared_ptr& _geom, shared_ptr& _phys, Interaction* I);
+	virtual bool go(shared_ptr& _geom, shared_ptr& _phys, Interaction* I);
 	Real elasticEnergy();
 
 	Real yieldSigmaTMagnitude(Real sigmaN, Real omega, Real undamagedCohesion, Real tanFrictionAngle) {

=== modified file 'pkg/dem/MortarMat.hpp'
--- pkg/dem/MortarMat.hpp	2016-04-19 01:32:36 +
+++ pkg/dem/MortarMat.hpp	2016-10-21 13:50:25 +
@@ -83,7 +83,7 @@
 
 class Law2_ScGeom_MortarPhys_Lourenco: public LawFunctor{
 	public:
-		bool go(shared_ptr& iGeom, shared_ptr& iPhys, Interaction* interaction);
+		virtual bool go(shared_ptr& iGeom, shared_ptr& iPhys, Interaction* interaction);
 		FUNCTOR2D(GenericSpheresContact,MortarPhys);
 		YADE_CLASS_BASE_DOC(Law2_ScGeom_MortarPhys_Lourenco,LawFunctor,"Material law for mortar layer according to [Lourenco1994]_. The contact behaves elastic until brittle failure when reaching strength envelope. The envelope has three parts.\n\nTensile with condition $\\sigma_N-f_t$.\n\nShear part with Mohr-Coulomb condition $|\\sigma_T|+\\sigma_N\\tan\\varphi-c$.\n\nCompressive part with condition $\\sigma_N^2+A^2\\sigma_T^2-f_c^2$\n\nThe main idea is to begin simulation with this model and when the contact is broken, to use standard non-cohesive Law2_PolyhedraGeom_PolyhedraPhys_Volumetric."
 		);

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 3951: Master thesis Morales2012a


revno: 3951
author: Bruno Chareyre 
committer: GitHub 
timestamp: Fri 2016-10-21 13:54:30 +0200
message:
  Master thesis Morales2012a
modified:
  doc/yade-theses.bib


--
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/yade-theses.bib'
--- doc/yade-theses.bib	2016-05-26 16:28:56 +
+++ doc/yade-theses.bib	2016-10-21 11:54:30 +
@@ -160,3 +160,11 @@
 	year = {2015},
 url = {https://yade-dem.org/publi/PhD_MAURIN_VF.pdf}
 }
+
+@mastersthesis{Morales2012a,
+	title={Cave Back Estimation Through Discrete Element Method, Based on Production Information},
+	author={D. Morales},
+	year={2012},
+	school={Universidad de Chile},
+	url={https://dl.dropboxusercontent.com/u/7663386/0_tesis.pdf}
+}

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 3950: minor editing of installation page


revno: 3950
author: Bruno Chareyre 
committer: GitHub 
timestamp: Thu 2016-10-20 14:41:32 +0200
message:
  minor editing of installation page
modified:
  doc/sphinx/installation.rst


--
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/installation.rst'
--- doc/sphinx/installation.rst	2016-10-20 12:34:19 +
+++ doc/sphinx/installation.rst	2016-10-20 12:41:32 +
@@ -289,19 +289,23 @@
 feature will be disabled.
 
 Speed-up compilation
-
-When spliting the compilation on many cores (``make -jN``), ``N`` is limited by the available cores and memory. It is possible to use more cores if remote computers are available, ditributing the compilation with `ditscc `_  (see distcc documentation for configuring slaves and master):
+^
+
+When spliting the compilation on many cores (``make -jN``), ``N`` is limited by the available cores and memory. It is possible to use more cores if remote computers are available, ditributing the compilation with `ditscc `_  (see distcc documentation for configuring slaves and master)::
+
 	export CC=distcc gcc
 	export CXX=distcc g++
 	cmake [options as usual]
 	make -jN
 
-In addition, and independently of distcc, caching previous compilations with `ccache `_ can speed up re-compilation:
+In addition, and independently of distcc, caching previous compilations with `ccache `_ can speed up re-compilation::
+
 	export CC=ccache gcc
 	export CXX=ccache g++
 	cmake [options as usual]
 	
-The two tools can be combined very simply, adding to the above exports 
+The two tools can be combined very simply, adding to the above exports::
+
 	export CCACHE_PREFIX="distcc"
 
 Yubuntu

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 3949: a note on using distcc and ccache


revno: 3949
author: Bruno Chareyre 
committer: GitHub 
timestamp: Thu 2016-10-20 14:34:19 +0200
message:
  a note on using distcc and ccache
modified:
  doc/sphinx/installation.rst


--
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/installation.rst'
--- doc/sphinx/installation.rst	2016-07-04 17:53:54 +
+++ doc/sphinx/installation.rst	2016-10-20 12:34:19 +
@@ -253,7 +253,7 @@
 If you are using a multi-core systems you can use the parameter ``-j`` to speed-up the compilation
 and split the compilation onto many cores. For example, on 4-core machines
 it would be reasonable to set the parameter ``-j4``. Note, Yade requires
-approximately 2GB RAM per core for compilation, otherwise the swap-file will be used
+approximately 3GB RAM per core for compilation, otherwise the swap-file will be used
 and compilation time dramatically increases.
 
 The installation is performed with the following command::
@@ -288,6 +288,21 @@
 Clang does not support OpenMP-parallelizing for the moment, that is why the 
 feature will be disabled.
 
+Speed-up compilation
+
+When spliting the compilation on many cores (``make -jN``), ``N`` is limited by the available cores and memory. It is possible to use more cores if remote computers are available, ditributing the compilation with `ditscc `_  (see distcc documentation for configuring slaves and master):
+	export CC=distcc gcc
+	export CXX=distcc g++
+	cmake [options as usual]
+	make -jN
+
+In addition, and independently of distcc, caching previous compilations with `ccache `_ can speed up re-compilation:
+	export CC=ccache gcc
+	export CXX=ccache g++
+	cmake [options as usual]
+	
+The two tools can be combined very simply, adding to the above exports 
+	export CCACHE_PREFIX="distcc"
 
 Yubuntu
 

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] 1 revision removed

1 revision was removed from the branch.

--
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

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 3949: example files for Potential Blocks


revno: 3949
committer: booncw 
timestamp: Thu 2016-10-20 02:09:12 +0800
message:
  example files for Potential Blocks
added:
  examples/PotentialBlocks/Tunnel/
  examples/PotentialBlocks/Tunnel/Cavern.py
  examples/PotentialBlocks/Tunnel/TunnelPB.py
  examples/PotentialBlocks/Tunnel/joints/
  examples/PotentialBlocks/Tunnel/joints/circleCavern.csv
  examples/PotentialBlocks/Tunnel/joints/circleOriginal.csv
  examples/PotentialBlocks/Tunnel/joints/old/
  examples/PotentialBlocks/Tunnel/joints/old/reducedG2/
  examples/PotentialBlocks/Tunnel/joints/old/reducedG2/G3joints155_75_25.csv
  examples/PotentialBlocks/Tunnel/joints/old/reducedG2/G3joints155_75_25.ods
  examples/PotentialBlocks/Tunnel/joints/old/reducedG2/statistics/
  
examples/PotentialBlocks/Tunnel/joints/old/reducedG2/statistics/G3joints155_75_25A.csv
  
examples/PotentialBlocks/Tunnel/joints/old/reducedG2/statistics/G3joints155_75_25A.ods
  
examples/PotentialBlocks/Tunnel/joints/old/reducedG2/statistics/G3joints155_75_25B.csv
  
examples/PotentialBlocks/Tunnel/joints/old/reducedG2/statistics/G3joints155_75_25B.ods
  
examples/PotentialBlocks/Tunnel/joints/old/reducedG2/statistics/G3joints155_75_25test.csv
  examples/PotentialBlocks/Vaiont/
  examples/PotentialBlocks/Vaiont/2D/
  examples/PotentialBlocks/Vaiont/2D/jointsSec2spacing/
  examples/PotentialBlocks/Vaiont/2D/jointsSec2spacing/boundariesMatch.csv
  
examples/PotentialBlocks/Vaiont/2D/jointsSec2spacing/jointProbabilisticMatch40.csv
  examples/PotentialBlocks/Vaiont/2D/section2/
  examples/PotentialBlocks/Vaiont/2D/section2/BlkGen
  examples/PotentialBlocks/Vaiont/2D/section2/BlockGenFindExtreme.txt
  examples/PotentialBlocks/Vaiont/2D/section2/Vaiont2D.py
  examples/PotentialBlocks/Vaiont/2D/section2/investigateDamping.txt
  examples/PotentialBlocks/Vaiont/3D/
  examples/PotentialBlocks/Vaiont/3D/Vaiont3D.py
  examples/PotentialBlocks/Vaiont/3D/joints/
  examples/PotentialBlocks/Vaiont/3D/joints/boundaries.csv
  examples/PotentialBlocks/Vaiont/3D/joints/jointPersistent.csv
  examples/PotentialBlocks/Vaiont/3D/joints/sliceBoundaries.csv
  examples/PotentialBlocks/Vaiont/3D/joints/slopeFace.csv
  examples/PotentialBlocks/Vaiont/3D/joints/withoutCleft/
  
examples/PotentialBlocks/Vaiont/3D/joints/withoutCleft/jointProbabilistic40basic80.csv
  
examples/PotentialBlocks/Vaiont/3D/joints/withoutCleft/jointProbabilistic40basic80Fast.csv
  
examples/PotentialBlocks/Vaiont/3D/joints/withoutCleft/jointProbabilistic40basic80Hori.csv
  pkg/dem/Buoyancy.cpp
  pkg/dem/Buoyancy.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
___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 3947: fixed a minor compilation issue in ConcretePM


revno: 3947
committer: Jan Stransky 
timestamp: Tue 2016-10-18 11:11:52 +0200
message:
  fixed a minor compilation issue in ConcretePM
modified:
  pkg/dem/ConcretePM.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 'pkg/dem/ConcretePM.cpp'
--- pkg/dem/ConcretePM.cpp	2016-09-15 14:50:47 +
+++ pkg/dem/ConcretePM.cpp	2016-10-18 09:11:52 +
@@ -355,7 +355,6 @@
 
 
 	#ifdef CPM_MATERIAL_MODEL
-		Vector3r& epsTPl(phys->epsTPl);
 		const Real& dt = scene->dt;
 		const Real& dmgTau(phys->dmgTau);
 		const Real& plTau(phys->plTau);

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 3948: Fixed call of _utils.interactionAnglesHistogram with default arduments


revno: 3948
committer: Jan Stransky 
timestamp: Tue 2016-10-18 15:46:31 +0200
message:
  Fixed call of _utils.interactionAnglesHistogram with default arduments
  
  question #403014
modified:
  py/_utils.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 'py/_utils.cpp'
--- py/_utils.cpp	2016-07-01 20:21:10 +
+++ py/_utils.cpp	2016-10-18 13:46:31 +
@@ -468,7 +468,7 @@
 	py::def("approxSectionArea",approxSectionArea,"Compute area of convex hull when when taking (swept) spheres crossing the plane at coord, perpendicular to axis.");
 	py::def("coordsAndDisplacements",coordsAndDisplacements,(py::arg("axis"),py::arg("Aabb")=py::tuple()),"Return tuple of 2 same-length lists for coordinates and displacements (coordinate minus reference coordinate) along given axis (1st arg); if the Aabb=((x_min,y_min,z_min),(x_max,y_max,z_max)) box is given, only bodies within this box will be considered.");
 	py::def("setRefSe3",setRefSe3,"Set reference :yref:`positions` and :yref:`orientations` of all :yref:`bodies` equal to their current :yref:`positions` and :yref:`orientations`.");
-	py::def("interactionAnglesHistogram",interactionAnglesHistogram,(py::arg("axis"),py::arg("mask"),py::arg("bins"),py::arg("aabb"),py::arg("sphSph"),py::arg("minProjLen")));
+	py::def("interactionAnglesHistogram",interactionAnglesHistogram,(py::arg("axis"),py::arg("mask")=0,py::arg("bins")=20,py::arg("aabb")=py::tuple(),py::arg("sphSph")=0,py::arg("minProjLen")=1e-6));
 	py::def("bodyNumInteractionsHistogram",bodyNumInteractionsHistogram,(py::arg("aabb")));
 	py::def("inscribedCircleCenter",inscribedCircleCenter,(py::arg("v1"),py::arg("v2"),py::arg("v3")),"Return center of inscribed circle for triangle given by its vertices *v1*, *v2*, *v3*.");
 	py::def("unbalancedForce",__unbalancedForce,(py::args("useMaxForce")=false),"Compute the ratio of mean (or maximum, if *useMaxForce*) summary force on bodies and mean force magnitude on interactions. For perfectly static equilibrium, summary force on all bodies is zero (since forces from interactions cancel out and induce no acceleration of particles); this ratio will tend to zero as simulation stabilizes, though zero is never reached because of finite precision computation. Sufficiently small value can be e.g. 1e-2 or smaller, depending on how much equilibrium it should be.");

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 3946: Changed L3Geom to ScGeom in tutorial example scripts


revno: 3946
committer: Jan Stransky 
timestamp: Tue 2016-10-18 11:04:27 +0200
message:
  Changed L3Geom to ScGeom in tutorial example scripts
modified:
  doc/sphinx/tutorial/01-bouncing-sphere.py
  doc/sphinx/tutorial/02-gravity-deposition.py
  doc/sphinx/tutorial/03-oedometric-test.py
  doc/sphinx/tutorial/04-periodic-simple-shear.py
  doc/sphinx/tutorial/05-3d-postprocessing.py


--
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/tutorial/01-bouncing-sphere.py'
--- doc/sphinx/tutorial/01-bouncing-sphere.py	2015-06-16 15:31:20 +
+++ doc/sphinx/tutorial/01-bouncing-sphere.py	2016-10-18 09:04:27 +
@@ -19,9 +19,9 @@
 	ForceResetter(),
 	InsertionSortCollider([Bo1_Sphere_Aabb()]),
 	InteractionLoop(
-		[Ig2_Sphere_Sphere_L3Geom()],# collision geometry 
+		[Ig2_Sphere_Sphere_ScGeom()],# collision geometry
 		[Ip2_FrictMat_FrictMat_FrictPhys()], # collision "physics"
-		[Law2_L3Geom_FrictPhys_ElPerfPl()]   # contact law -- apply forces
+		[Law2_ScGeom_FrictPhys_CundallStrack()]   # contact law -- apply forces
 	),
 	# Apply gravity force to particles. damping: numerical dissipation of energy.
 	NewtonIntegrator(gravity=(0,0,-9.81),damping=0.1)

=== modified file 'doc/sphinx/tutorial/02-gravity-deposition.py'
--- doc/sphinx/tutorial/02-gravity-deposition.py	2015-06-16 15:31:20 +
+++ doc/sphinx/tutorial/02-gravity-deposition.py	2016-10-18 09:04:27 +
@@ -21,9 +21,9 @@
 	InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb()]),
 	InteractionLoop(
 		# handle sphere+sphere and facet+sphere collisions
-		[Ig2_Sphere_Sphere_L3Geom(),Ig2_Facet_Sphere_L3Geom()],
+		[Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom()],
 		[Ip2_FrictMat_FrictMat_FrictPhys()],
-		[Law2_L3Geom_FrictPhys_ElPerfPl()]
+		[Law2_ScGeom_FrictPhys_CundallStrack()]
 	),
 	NewtonIntegrator(gravity=(0,0,-9.81),damping=0.4),
 	# call the checkUnbalanced function (defined below) every 2 seconds

=== modified file 'doc/sphinx/tutorial/03-oedometric-test.py'
--- doc/sphinx/tutorial/03-oedometric-test.py	2015-06-16 15:31:20 +
+++ doc/sphinx/tutorial/03-oedometric-test.py	2016-10-18 09:04:27 +
@@ -28,9 +28,9 @@
 	InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb(),Bo1_Wall_Aabb()]),
 	InteractionLoop(
 		# the loading plate is a wall, we need to handle sphere+sphere, sphere+facet, sphere+wall
-		[Ig2_Sphere_Sphere_L3Geom(),Ig2_Facet_Sphere_L3Geom(),Ig2_Wall_Sphere_L3Geom()],
+		[Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom(),Ig2_Wall_Sphere_ScGeom()],
 		[Ip2_FrictMat_FrictMat_FrictPhys()],
-		[Law2_L3Geom_FrictPhys_ElPerfPl()]
+		[Law2_ScGeom_FrictPhys_CundallStrack()]
 	),
 	NewtonIntegrator(gravity=(0,0,-9.81),damping=0.5),
 	# the label creates an automatic variable referring to this engine

=== modified file 'doc/sphinx/tutorial/04-periodic-simple-shear.py'
--- doc/sphinx/tutorial/04-periodic-simple-shear.py	2015-06-16 15:31:20 +
+++ doc/sphinx/tutorial/04-periodic-simple-shear.py	2016-10-18 09:04:27 +
@@ -41,9 +41,9 @@
 	ForceResetter(),
 	InsertionSortCollider([Bo1_Sphere_Aabb()]),
 	InteractionLoop(
-		[Ig2_Sphere_Sphere_L3Geom()],
+		[Ig2_Sphere_Sphere_ScGeom()],
 		[Ip2_FrictMat_FrictMat_FrictPhys()],
-		[Law2_L3Geom_FrictPhys_ElPerfPl()]
+		[Law2_ScGeom_FrictPhys_CundallStrack()]
 	),
 	NewtonIntegrator(damping=.4),
 	# run checkStress function (defined below) every second

=== modified file 'doc/sphinx/tutorial/05-3d-postprocessing.py'
--- doc/sphinx/tutorial/05-3d-postprocessing.py	2015-06-16 15:31:20 +
+++ doc/sphinx/tutorial/05-3d-postprocessing.py	2016-10-18 09:04:27 +
@@ -16,9 +16,9 @@
 	ForceResetter(),
 	InsertionSortCollider([Bo1_Sphere_Aabb()]),
 	InteractionLoop(
-		[Ig2_Sphere_Sphere_L3Geom()],
+		[Ig2_Sphere_Sphere_ScGeom()],
 		[Ip2_FrictMat_FrictMat_FrictPhys()],
-		[Law2_L3Geom_FrictPhys_ElPerfPl()]
+		[Law2_ScGeom_FrictPhys_CundallStrack()]
 	),
 	NewtonIntegrator(damping=.4),
 	# save data for Paraview

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


[Yade-dev] [Branch ~yade-pkg/yade/git-trunk] Rev 3945: Added PolyhedraSplitter example


revno: 3945
committer: Jan Stransky 
timestamp: Mon 2016-10-17 13:03:50 +0200
message:
  Added PolyhedraSplitter example
added:
  examples/polyhedra/splitter.py


--
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
=== added file 'examples/polyhedra/splitter.py'
--- examples/polyhedra/splitter.py	1970-01-01 00:00:00 +
+++ examples/polyhedra/splitter.py	2016-10-17 11:03:50 +
@@ -0,0 +1,54 @@
+from yade import polyhedra_utils
+
+gravel1 = PolyhedraMat()
+gravel1.IsSplitable = True
+gravel1.strength = 1e0
+gravel2 = PolyhedraMat()
+gravel2.IsSplitable = True
+gravel2.strength = 2e0
+gravel3 = PolyhedraMat()
+gravel3.IsSplitable = True
+gravel3.strength = 4e0
+
+steel = PolyhedraMat()
+steel.young = 1e10
+
+d = .05
+p1 = polyhedra_utils.polyhedra(gravel1, size=(d,d,d), seed=1)
+p2 = polyhedra_utils.polyhedra(gravel2, size=(d,d,d), seed=1)
+p3 = polyhedra_utils.polyhedra(gravel3, size=(d,d,d), seed=1)
+p2.state.pos = (2*d,0,0)
+p3.state.pos = (4*d,0,0)
+p2.state.ori = p3.state.ori = p1.state.ori
+
+d = .035
+w1 = utils.wall(+d, axis=1, sense=-1, material=steel)
+w2 = utils.wall(-d, axis=1, sense=+1, material=steel)
+v = 5e-1
+w1.state.vel = (0,-v,0)
+w2.state.vel = (0,+v,0)
+O.bodies.append((p1,p2,p3,w1,w2))
+
+O.engines=[
+   ForceResetter(),
+   InsertionSortCollider([Bo1_Polyhedra_Aabb(),Bo1_Wall_Aabb()]),
+   InteractionLoop(
+  [Ig2_Wall_Polyhedra_PolyhedraGeom(), Ig2_Polyhedra_Polyhedra_PolyhedraGeom()], 
+  [Ip2_PolyhedraMat_PolyhedraMat_PolyhedraPhys()],
+  [Law2_PolyhedraGeom_PolyhedraPhys_Volumetric()]
+   ),
+   NewtonIntegrator(),
+	PolyhedraSplitter(iterPeriod=100),
+]
+
+O.dt=1e-6
+
+try:
+	from yade import qt
+	qt.Controller()
+	v = qt.View()
+	v.ortho = True
+except:
+	pass
+
+O.run(3)

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


  1   2   3   4   5   6   7   8   9   10   >