← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-dev/yade/trunk] Rev 2844: Minor changes

 

------------------------------------------------------------
revno: 2844
committer: jduriez <jduriez@c1solimara-l>
branch nick: yade
timestamp: Thu 2011-04-28 16:20:15 +0200
message:
  Minor changes
  - typos in programmer doc
  - removal of useless backward compability in system.py
  - removal or english translations of comments in the three c++ files
modified:
  doc/sphinx/prog.rst
  doc/yade-articles.bib
  pkg/dem/Ip2_2xNormalInelasticMat_NormalInelasticityPhys.cpp
  pkg/dem/KinemSimpleShearBox.cpp
  pkg/dem/KinemSimpleShearBox.hpp
  py/system.py


--
lp:yade
https://code.launchpad.net/~yade-dev/yade/trunk

Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to https://code.launchpad.net/~yade-dev/yade/trunk/+edit-subscription
=== modified file 'doc/sphinx/prog.rst'
--- doc/sphinx/prog.rst	2011-04-27 17:21:19 +0000
+++ doc/sphinx/prog.rst	2011-04-28 14:20:15 +0000
@@ -401,7 +401,7 @@
 
 will be rendered as
 
-	According to [Allen1989]_, the intergration scheme …
+	According to [Allen1989]_, the integration scheme …
 
 Separate class/function documentation
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -1574,8 +1574,8 @@
 
 This scenario leads to special design, which allows fast parallel write access:
 
-* each thread has its own storage (zeroed upon request), and only write to its own storage; this avoids concurrency issues. Each thread identifies itself by the omp_get_thread_num() function provided by the OpenMP runtime.
-* before reading absolute values, the container must be synchronized, i.e. values from all threads are summed up and stored separately. This is a relatively slow operation and we provide ForceContainer::syncCount that you might check to find cummulative number of synchronizations and compare it agains number of steps. Ideally, ForceContainer is only synchronized once at each step.
+* each thread has its own storage (zeroed upon request), and only writes to its own storage; this avoids concurrency issues. Each thread identifies itself by the omp_get_thread_num() function provided by the OpenMP runtime.
+* before reading absolute values, the container must be synchronized, i.e. values from all threads are summed up and stored separately. This is a relatively slow operation and we provide ForceContainer::syncCount that you might check to find cummulative number of synchronizations and compare it against number of steps. Ideally, ForceContainer is only synchronized once at each step.
 * the container is resized whenever an element outside the current range is read/written to (the read returns zero in that case); this avoids the necessity of tracking number of bodies, but also is potential danger (such as ``scene->forces.getForce(1000000000)``, which will probably exhaust your RAM). Unlike c++, Python does check given id against number of bodies.
 
 
@@ -1645,9 +1645,9 @@
 	.. note::
 		If there is no functor suitable to handle given combination of :yref:`shapes<Shape>`, the interaction will be left in potential state, without raising any error.
 
-#. For real interactions (already existing or jsut created in last step), :yref:`InteractionLoop` (via :yref:`IPhysDispatcher`) calls appropriate :yref:`IPhysFunctor` based on :yref:`Material` combination of both bodies. The functor *must* update (or create, if it doesn't exist yet) associated :yref:`IPhys` instance. It is an error if no suitable functor is found, and an exception will be thrown.
+#. For real interactions (already existing or just created in last step), :yref:`InteractionLoop` (via :yref:`IPhysDispatcher`) calls appropriate :yref:`IPhysFunctor` based on :yref:`Material` combination of both bodies. The functor *must* update (or create, if it doesn't exist yet) associated :yref:`IPhys` instance. It is an error if no suitable functor is found, and an exception will be thrown.
 
-#. For real interactions, :yref:`InteractionLoop` (via :yref:`LawDispatcher`) calls appropriate :yref:`LawFunctor` based on combintation of :yref:`IGeom` and :yref:`IPhys` of the interaction. Again, it is an error if no functor capable of handling it is found.
+#. For real interactions, :yref:`InteractionLoop` (via :yref:`LawDispatcher`) calls appropriate :yref:`LawFunctor` based on combination of :yref:`IGeom` and :yref:`IPhys` of the interaction. Again, it is an error if no functor capable of handling it is found.
 
 #. :yref:`LawDispatcher` can decide that an interaction should be removed (such as if bodies get too far apart for non-cohesive laws; or in case of complete damage for damage models). This is done by calling
 
@@ -1748,13 +1748,13 @@
 #. Call ``Engine::action()``
 #. If :yref:`O.timingEnabled<Omega.timingEnabled>`, increment :yref:`Engine::execTime` by the difference from the last time reading (either after the previous engine was run, or immediately before the loop started, if this engine comes first). Increment :yref:`Engine::execCount` by 1.
 
-After engines are processed, :yref:`virtual time<Omega.time>` is incremented by :yref:`timestep<Omega.dt>` and :yref:`iteraction number<Omega.iter>` is incremented by 1.
+After engines are processed, :yref:`virtual time<Omega.time>` is incremented by :yref:`timestep<Omega.dt>` and :yref:`iteration number<Omega.iter>` is incremented by 1.
 
 
 Background execution
 ^^^^^^^^^^^^^^^^^^^^^
 
-The engine loop is (normally) executed in background thread (handled by :ysrc:`SimulationFlow<core/SimulationFlow.hpp>` class), leaving forground thread free to manage user interaction or running python script. The background thread is managed by :yref:`O.run()<Omega.run>` and :yref:`O.pause()<Omega.pause>` commands. Foreground thread can be blocked until the loop finishes using :yref:`O.wait()<Omega.wait>`.
+The engine loop is (normally) executed in background thread (handled by :ysrc:`SimulationFlow<core/SimulationFlow.hpp>` class), leaving foreground thread free to manage user interaction or running python script. The background thread is managed by :yref:`O.run()<Omega.run>` and :yref:`O.pause()<Omega.pause>` commands. Foreground thread can be blocked until the loop finishes using :yref:`O.wait()<Omega.wait>`.
 
 Single iteration can be run without spawning additional thread using :yref:`O.step()<Omega.step>`.
 

=== modified file 'doc/yade-articles.bib'
--- doc/yade-articles.bib	2011-04-18 18:09:42 +0000
+++ doc/yade-articles.bib	2011-04-28 14:20:15 +0000
@@ -272,13 +272,15 @@
 	year = {2010 (submitted)}
 }
 
-@article{Duriez2010,
+@article{Duriez2011,
 	author = {J. Duriez and F.Darve and F.-V.Donze},
 	title = {A discrete modeling-based constitutive relation for infilled rock joints},
-	year = {2010},
+	year = {2011},
 	journal = {International Journal of Rock Mechanics & Mining Sciences},
-	doi = {10.1016/j.ijrmms.2010.09.008},
-	note = {in press}
+	volume = {48},
+	number = {3},
+	pages = {458--468},
+	doi = {10.1016/j.ijrmms.2010.09.008}
 }
 
 @article{Dang2010,

=== modified file 'pkg/dem/Ip2_2xNormalInelasticMat_NormalInelasticityPhys.cpp'
--- pkg/dem/Ip2_2xNormalInelasticMat_NormalInelasticityPhys.cpp	2011-01-24 14:45:35 +0000
+++ pkg/dem/Ip2_2xNormalInelasticMat_NormalInelasticityPhys.cpp	2011-04-28 14:20:15 +0000
@@ -14,14 +14,7 @@
 #include<yade/core/Scene.hpp>
 
 
-//
-//
-//
-/// Big WHAT THE ....? this code below is duplicated THREE times due to some weird IFs !
-/// need to FIXME that.
-/// but from all my testing it works currently. / janek
-//
-//
+
 
 void Ip2_2xNormalInelasticMat_NormalInelasticityPhys::go(	  const shared_ptr<Material>& b1 // NormalInelasticMat
 					, const shared_ptr<Material>& b2 // NormalInelasticMat
@@ -44,8 +37,8 @@
 			Real Eb 	= sdec2->young;
 			Real Va 	= sdec1->poisson;
 			Real Vb 	= sdec2->poisson;
-			Real Ra 	= geom->radius1; // FIXME - multiply by factor of sphere interaction distance (so sphere interacts at bigger range that its geometrical size)
-			Real Rb 	= geom->radius2; // FIXME - as above
+			Real Ra 	= geom->radius1; 
+			Real Rb 	= geom->radius2;
 			Real fa 	= sdec1->frictionAngle;
 			Real fb 	= sdec2->frictionAngle;
 
@@ -60,8 +53,7 @@
 			contactPhysics->tangensOfFrictionAngle		= std::tan(std::min(fa,fb));
 			contactPhysics->forMaxMoment		= 1.0*(Ra+Rb)/2.0;	// 1.0 corresponding to ethaR which I don't know exactly where to define as a parameter...
 
-			// Lot of suppress here around (>) r2276. Normally not bad but ? See Ip2_CohFrictMat_CohFrictMat_CohFrictPhys.cpp to re-find the initial §...
-						
+			// Lot of suppress here around (>) r2276. Normally not bad but ? 
 			contactPhysics->knLower = Kn;
 			contactPhysics->kn = Kn;
 			contactPhysics->ks = Ks;

=== modified file 'pkg/dem/KinemSimpleShearBox.cpp'
--- pkg/dem/KinemSimpleShearBox.cpp	2010-11-07 11:46:20 +0000
+++ pkg/dem/KinemSimpleShearBox.cpp	2011-04-28 14:20:15 +0000
@@ -73,8 +73,8 @@
 	leftbox->state->vel = Vector3r(dX/(2.0 * dt),dY/(2.0 * dt),0);
 	rightbox->state->vel = Vector3r(dX/(2.0 * dt),dY/(2.0*dt),0);
 
-//	Then computation of the angle of the rotation to be done :
 	computeAlpha();
+//	Then computation of the angle of the rotation,dalpha, to be done :
 	if (alpha == Mathr::PI/2.0)	// Case of the very beginning
 	{
 		dalpha = - atan( dX / (Ysup_mod -Ylat_mod) );
@@ -87,7 +87,7 @@
 
 	Quaternionr qcorr(AngleAxisr(dalpha,Vector3r::UnitZ()));
 
-// On applique la rotation en changeant l'orientation des plaques, leurs vang et en affectant donc alpha
+// Rotation is applied : orientation and angular velocity of plates are modified.
 	leftbox->state->ori	= qcorr*leftbox->state->ori;
 	leftbox->state->angVel	= Vector3r(0,0,1)*dalpha/dt;
 
@@ -98,14 +98,14 @@
 
 void KinemSimpleShearBox::stopMovement()
 {
-	// annulation de la vitesse de la plaque du haut
+	// upper plate's speed is zeroed
 	topbox->state->vel		=  Vector3r(0,0,0);
 
-	// de la plaque gauche
+	// same for left box
 	leftbox->state->vel		=  Vector3r(0,0,0);
 	leftbox->state->angVel		=  Vector3r(0,0,0);
 
-	// de la plaque droite
+	// and for rightbox
 	rightbox->state->vel		=  Vector3r(0,0,0);
 	rightbox->state->angVel		=  Vector3r(0,0,0);
 }
@@ -194,10 +194,6 @@
 // 	cout << "Alors que f0 =  = "<< f0 << endl;
 // 	cout << "Car terme correctif = " << KnC * 1.0e9 * Scontact * (hCurrent-y0)<< endl;
 
-// Prise en compte de la difference de rigidite entre charge et decharge dans le cadre de Law2_ScGeom6D_NormalInelasticityPhys_NormalInelasticity : => INUTILE maintenant ?
-// 	if( fSup.y() > fDesired )	// cas ou l'on va monter la plaq <=> (normalemt) a une decharge
-// 		stiffness *= coeff_dech;
-
 	if( (stiffness==0) )
 	{
 		deltaH=0;

=== modified file 'pkg/dem/KinemSimpleShearBox.hpp'
--- pkg/dem/KinemSimpleShearBox.hpp	2011-01-21 08:14:28 +0000
+++ pkg/dem/KinemSimpleShearBox.hpp	2011-04-28 14:20:15 +0000
@@ -45,8 +45,8 @@
 	
 	YADE_CLASS_BASE_DOC_ATTRS_CTOR(KinemSimpleShearBox,BoundaryController,
 			 "This class is supposed to be a mother class for all Engines performing loadings on the simple shear box of :yref:`SimpleShear`. It is not intended to be used by itself, but its declaration and implentation will thus contain all what is useful for all these Engines. The script simpleShear.py illustrates the use of the various corresponding Engines.",
-			((Real,alpha,Mathr::PI/2.0,,"the angle from the lower box to the left box (trigo wise). Measured by this Engine, not to be changed by the user."))
-			((std::vector<Real>,temoin_save,,,"vector (same length as 'gamma_save' for ex), with 0 or 1 depending whether the save for the corresponding value of gamma has been done (1) or not (0). Not to be changed by the user."))
+			((Real,alpha,Mathr::PI/2.0,,"the angle from the lower box to the left box (trigo wise). Measured by this Engine. Has to be saved, but not to be changed by the user."))
+			((std::vector<Real>,temoin_save,,,"vector (same length as 'gamma_save' for ex), with 0 or 1 depending whether the save for the corresponding value of gamma has been done (1) or not (0). Has to be saved, but not to be changed by the user."))
 			((Body::id_t,id_topbox,3,,"the id of the upper wall"))
 			((Body::id_t,id_boxbas,1,,"the id of the lower wall"))
 			((Body::id_t,id_boxleft,0,,"the id of the left wall"))
@@ -55,9 +55,9 @@
 			((Body::id_t,id_boxback,4,,"the id of the wall at the back of the sample"))
 			((Real,max_vel,1.0,,"to limit the speed of the vertical displacements done to control $\\sigma$ (CNL or CNS cases) [$m/s$]"))
 			((Real,wallDamping,0.2,,"the vertical displacements done to to control $\\sigma$ (CNL or CNS cases) are in fact damped, through this wallDamping"))
-			((bool,firstRun,true,,"boolean set to false as soon as the engine has done its job one time : useful to know if initial height of, and normal force sustained by, the upper box are known or not (and thus if they have to be initialized). Not to be changed by the user."))
-			((Real,f0,0.0,,"the (vertical) force acting on the upper plate on the very first time step (determined by the Engine). Controls of the loadings in case of :yref:`KinemCNSEngine` or :yref:`KinemCNLEngine` will be done according to this initial value [$N$]. Not to be changed by the user.]"))
-			((Real,y0,0.0,,"the height of the upper plate at the very first time step : the engine finds its value [$m$]. Not to be changed by the user."))
+			((bool,firstRun,true,,"boolean set to false as soon as the engine has done its job one time : useful to know if initial height of, and normal force sustained by, the upper box are known or not (and thus if they have to be initialized). Has to be saved, but not to be changed by the user."))
+			((Real,f0,0.0,,"the (vertical) force acting on the upper plate on the very first time step (determined by the Engine). Controls of the loadings in case of :yref:`KinemCNSEngine` or :yref:`KinemCNLEngine` will be done according to this initial value [$N$]. Has to be saved, but not to be changed by the user."))
+			((Real,y0,0.0,,"the height of the upper plate at the very first time step : the engine finds its value [$m$]. Has to be saved, but not to be changed by the user."))
 			((bool,LOG,false,,"boolean controling the output of messages on the screen")) //FIXME : surely something better to use here
 			((string,Key,"",,"string to add at the names of the saved files")),
 /*			leftbox = Body::byId(id_boxleft,scene);

=== modified file 'py/system.py'
--- py/system.py	2010-12-31 14:35:21 +0000
+++ py/system.py	2011-04-28 14:20:15 +0000
@@ -38,13 +38,7 @@
 	'Law2_Dem3Dof_Elastic_Elastic':'Law2_Dem3Dof_FrictPhys_Basic', # Sun Jan 10 10:00:25 2010, vaclav@flux
 	'Law2_Dem3Dof_FrictPhys_Basic':'Law2_Dem3DofGeom_FrictPhys_Basic', # Sun Jan 10 10:01:27 2010, vaclav@flux
 	'Ip2_FrictMat_FrictMat_NormShearPhys':'Ip2_FrictMat_FrictMat_FrictPhys', # Sun Jan 10 10:07:40 2010, vaclav@flux
-	'ContactLaw1':'RockJointLaw', # Tue Feb  2 14:53:49 2010, jduriez@c1solimara-l
-	'ContactLaw1':'RockJointLaw', # Tue Feb  2 14:54:40 2010, jduriez@c1solimara-l
-	'ContactLaw1Interaction':'RockJointPhys', # Tue Feb  2 14:55:34 2010, jduriez@c1solimara-l
-	'CL1Relationships':'RockJointLawRelationships', # Tue Feb  2 14:58:02 2010, jduriez@c1solimara-l
 	'GLDrawCpmPhys':'Gl1_CpmPhys', # Sat Feb  6 14:46:08 2010, vaclav@flux
-	'RockJointLaw':'NormalInelasticityLaw', # Mon Feb  8 11:17:00 2010, jduriez@c1solimara-l
-	'RockJointPhys':'NormalInelasticityPhys', # Mon Feb  8 11:17:35 2010, jduriez@c1solimara-l
 	'RockJointLawRelationships':'Ip2_2xCohFrictMat_NormalInelasticityPhys', # Mon Feb  8 11:17:59 2010, jduriez@c1solimara-l
 	'TetraBang':'TTetraGeom', # Tue Feb  9 10:21:24 2010, vaclav@flux
 	'TetraMold':'Tetra', # Tue Feb  9 10:22:15 2010, vaclav@flux
@@ -52,12 +46,7 @@
 	'Tetra2TetraBang':'Ig2_Tetra_Tetra_TTetraGeom', # Tue Feb  9 10:23:19 2010, vaclav@flux
 	'TetraLaw':'TetraVolumetricLaw', # Tue Feb  9 10:24:10 2010, vaclav@flux
 	'DirecResearchEngine':'Disp2DPropLoadEngine', # Wed Mar 10 12:23:42 2010, jduriez@c1solimara-l
-	'CinemCNCEngine':'KinemCNLEngine', # Wed Mar 10 12:33:36 2010, jduriez@c1solimara-l
-	'CinemKNCEngine':'KinemCNSEngine', # Wed Mar 10 12:34:01 2010, jduriez@c1solimara-l
-	'CinemDNCEngine':'KinemCNDEngine', # Wed Mar 10 12:34:27 2010, jduriez@c1solimara-l
-	'CinemDTCEngine':'KinemCTDEngine', # Wed Mar 10 12:34:37 2010, jduriez@c1solimara-l
 	'Ip2_BMP_BMP_CSPhys':'Ip2_2xFrictMat_CSPhys', # Wed Mar 10 15:08:56 2010, eudoxos@frigo
-	'CinemDTCEngine':'KinemCTDEngine', # Tue Mar 16 13:54:21 2010, jduriez@c1solimara-l
 	'NormalInelasticityLaw':'Law2_ScGeom_NormalInelasticityPhys_NormalInelasticity', # Wed Mar 17 15:50:59 2010, jduriez@c1solimara-l
 	'CapillaryCohesiveLaw':'CapillaryLaw', # Tue Mar 30 14:11:36 2010, sch50p@fluent-ph
 	'SimpleElasticRelationshipsWater':'Ip2_Frictmat_FrictMat_CapillaryLawPhys', # Tue Mar 30 14:20:36 2010, sch50p@fluent-ph
@@ -70,7 +59,6 @@
 	'Ip2_SimleViscoelasticMat_SimpleViscoelasticMat_SimpleViscoelasticPhys':'Ip2_ViscElMat_ViscElMat_ViscElPhys', # Fri Apr  9 19:28:48 2010, vaclav@flux
 	'MomentEngine':'TorqueEngine', # Sun May  2 16:09:34 2010, vaclav@flux
 	'JumpChangeSe3':'StepDisplacer', # Sun May  2 16:14:21 2010, vaclav@flux
-	'ContactLaw1':'SomeBetterName', # Fri Jun  4 15:35:38 2010, jduriez@c1solimara-l
 	'Ip2_2xCohFrictMat_NormalInelasticityPhys':'Ip2_2xNormalInelasticMat_NormalInelasticityPhys', # Fri Jun  4 15:36:41 2010, jduriez@c1solimara-l
 	'Ip2_2xCohFrictMat_NormalInelasticityPhys':'Ip2_2xNormalInelasticMat_NormalInelasticityPhys', # Fri Jun  4 15:37:01 2010, jduriez@c1solimara-l
 	'Ip2_2xCohFrictMat_NormalInelasticityPhys':'Ip2_2xNormalInelasticMat_NormalInelasticityPhys', # Fri Jun  4 15:37:16 2010, jduriez@c1solimara-l