yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #02242
[Branch ~yade-dev/yade/trunk] Rev 1794: - fix wrong usage of "neverErase" in TTWater
------------------------------------------------------------
revno: 1794
committer: Bruno Chareyre <bchareyre@r1arduina>
branch nick: trunk
timestamp: Wed 2009-11-18 15:01:42 +0100
message:
- fix wrong usage of "neverErase" in TTWater
- synchronise versions of ECLaw
modified:
pkg/dem/Engine/StandAloneEngine/ElasticContactLaw.cpp
pkg/dem/Engine/StandAloneEngine/ElasticContactLaw.hpp
pkg/dem/PreProcessor/TriaxialTestWater.cpp
--
lp:yade
https://code.launchpad.net/~yade-dev/yade/trunk
Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to https://code.launchpad.net/~yade-dev/yade/trunk/+edit-subscription.
=== modified file 'pkg/dem/Engine/StandAloneEngine/ElasticContactLaw.cpp'
--- pkg/dem/Engine/StandAloneEngine/ElasticContactLaw.cpp 2009-11-15 15:32:01 +0000
+++ pkg/dem/Engine/StandAloneEngine/ElasticContactLaw.cpp 2009-11-18 14:01:42 +0000
@@ -22,10 +22,10 @@
{
sdecGroupMask=1;
momentRotationLaw = true;
+ neverErase = false;
#ifdef SCG_SHEAR
useShear=false;
#endif
- neverErase = false;
}
@@ -60,8 +60,7 @@
if( !(Body::byId(id1,ncb)->getGroupMask() & Body::byId(id2,ncb)->getGroupMask() & sdecGroupMask) ) return;
SpheresContactGeometry* currentContactGeometry= static_cast<SpheresContactGeometry*>(ig.get());
ElasticContactInteraction* currentContactPhysics = static_cast<ElasticContactInteraction*>(ip.get());
-
- // delete interaction where spheres don't touch (or are "far enough" with respect to interactionDeletionFactor)
+
if(currentContactGeometry->penetrationDepth <0)
{
if (neverErase) {
@@ -69,9 +68,7 @@
currentContactPhysics->normalForce = Vector3r::ZERO;}
else ncb->interactions->requestErase(id1,id2);
return;
- }
-
-
+ }
BodyMacroParameters* de1 = YADE_CAST<BodyMacroParameters*>(Body::byId(id1,ncb)->physicalParameters.get());
BodyMacroParameters* de2 = YADE_CAST<BodyMacroParameters*>(Body::byId(id2,ncb)->physicalParameters.get());
=== modified file 'pkg/dem/Engine/StandAloneEngine/ElasticContactLaw.hpp'
--- pkg/dem/Engine/StandAloneEngine/ElasticContactLaw.hpp 2009-11-15 15:32:01 +0000
+++ pkg/dem/Engine/StandAloneEngine/ElasticContactLaw.hpp 2009-11-18 14:01:42 +0000
@@ -23,11 +23,12 @@
virtual void go(shared_ptr<InteractionGeometry>& _geom, shared_ptr<InteractionPhysics>& _phys, Interaction* I, MetaBody* rootBody);
int sdecGroupMask;
bool momentRotationLaw;
- bool neverErase;
-
+ bool neverErase;
+
#ifdef SCG_SHEAR
bool useShear;
#endif
+
ef2_Spheres_Elastic_ElasticLaw(): sdecGroupMask(1), momentRotationLaw(true), neverErase(false)
#ifdef SCG_SHEAR
, useShear(false)
@@ -66,13 +67,11 @@
public :
int sdecGroupMask;
bool momentRotationLaw;
+ ///Turn this true if another constitutive law is taking care of removing interactions :
+ bool neverErase;
#ifdef SCG_SHEAR
bool useShear;
#endif
-
- /*! Turn this true if another law is taking care of removing interaction.
- */
- bool neverErase;
ElasticContactLaw();
void action(MetaBody*);
=== modified file 'pkg/dem/PreProcessor/TriaxialTestWater.cpp'
--- pkg/dem/PreProcessor/TriaxialTestWater.cpp 2009-11-18 13:34:36 +0000
+++ pkg/dem/PreProcessor/TriaxialTestWater.cpp 2009-11-18 14:01:42 +0000
@@ -487,6 +487,7 @@
shared_ptr<ElasticContactLaw> elasticContactLaw(new ElasticContactLaw);
elasticContactLaw->sdecGroupMask = 2;
elasticContactLaw->neverErase = true;
+
// capillary
shared_ptr<CapillaryCohesiveLaw> capillaryCohesiveLaw(new CapillaryCohesiveLaw);