← Back to team overview

yade-dev team mailing list archive

Re: contact logic (again)

 



This is surprising for me, and may be due to successive changes that I didn't notice.

I can confirm this :

commit r1312 (Chareyre) :

Modified: trunk/pkg/common/Engine/StandAloneEngine/PersistentSAPCollider.cpp

+ if ((*I)->isReal) (*I)->isNew=false; // + else (*I)->isNew=true;




svn blame :

1456    eudoxos               if (I->isReal) I->isNew=false;
1456 eudoxos // OTOH if is is now real anymore, it falls back to the potential state 1456 eudoxos if(!haveDistantTransient && !I->isReal) I->isNew=true;


Eudoxos perhaps just formatted the code, I don't know. My commit archives miss the commits of this period.
For sure, the !haveDistantTransient should not be in the condition.

I paste below the log of commit 1312, wich is on topic (could help clarifying the history of changes and avoid the same mistakes again).

Bruno

New Revision: 1312

Modified:
  trunk/pkg/common/Engine/MetaEngine/InteractionGeometryMetaEngine.cpp
  trunk/pkg/common/Engine/StandAloneEngine/PersistentSAPCollider.cpp
Log:
This reverts a previous change in IGMetaEngine from Janek (interactions were set "new" when not real - problem was that non-distant interactions are ALWAYS "not real" when starting IG dispatching - so they were set new and reseted at each timestep, which disabled friction). What was supposed to be done in IGMetaengine is now replaced by something almost equivalent in the SAPcollider (the difference is that if an interaction is not real before being reseted by the collider, it really means that it is not-overlaping and not-physicaly-interacting).

To summarize current behaviour :

1- if (!haveDistantTransient), isReal=false at the begining of each iteration, and isReal=(collision detected?) after geometry dispatching.

2- if (haveDistantTransient), isReal=false until a collision is detected or a physical link is created. Once isReal=true, it will not be resetted by the collider, and neither will geometry dispatching affect it, it can be set to false only by the constitutive law.

Note : We can't mix, e.g. ElasticContactLaw and CohesiveFrictionalContactLaw currently, since one needs (!haveDistantTransient) and the other needs (haveDistantTransient). Perhaps define one "isDistant" flag for each interaction rather than one global flag in the collider? Then the collider would reset isReal only for not-distant interactions.

Note (2) : The meaning of (isDistant) is close to "isPersistent" while (!isDistant) means "transient". There is no point keeping the old persistentInteractions now, except for compatibility with old users code (like Wen Jie).







--

_______________
Chareyre Bruno
Maitre de conference

Grenoble INP
Laboratoire 3SR - bureau E145
BP 53 - 38041, Grenoble cedex 9 - France
Tél : 33 4 56 52 86 21
Fax : 33 4 76 82 70 43
________________




References