yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #00771
Re: How to judge whether a contact is a sphere-sphere contact or sphere-box contact or box-box contact
Sorry, I forgot an important part :
InteractionContainer::iterator ii = ncb->transientInteractions->begin();
InteractionContainer::iterator iiEnd = ncb->transientInteractions->end();
for( ; ii!=iiEnd ; ++ii ) {
__________WAS MISSING_____________________________
const shared_ptr<Interaction>& interaction = *ii;
unsigned int id1 = interaction->getId1();
unsigned int id2 = interaction->getId2();
__________________________________________________
int geometryIndex1 = (*bodies)[id1]->geometricalModel->getClassIndex(); // !!!
int geometryIndex2 = (*bodies)[id2]->geometricalModel->getClassIndex();
if (!(geometryIndex1 == geometryIndex2)) continue;
else { bla; }
}
Bruno Chareyre a écrit :
> Hi Feng (or Chen?)
>
> I think you can use something similar to this (from CapillaryLaw.cpp) :
>
> for( ; ii!=iiEnd ; ++ii ) {
> int geometryIndex1 =
> (*bodies)[id1]->geometricalModel->getClassIndex(); // !!!
> int geometryIndex2 =
> (*bodies)[id2]->geometricalModel->getClassIndex();
>
> if (!(geometryIndex1 == geometryIndex2))
> continue;
> }
>
> In your case perhaps you need to define a int geometryIndex3 =
> Sphere()->getClassIndex(), then check if (index1==index3 &&
> index2=index3); the result will be exactly the same as long as there is
> no box-box interactions.
>
> Bruno
>
>
>
>
> Chen, Feng a écrit :
>
>> Hi, all:
>>
>> While traversing the contact list (ncb->vilatileInteractions), for
>> each real contact, how to judge whether a contact is a sphere-sphere
>> or sphere-box or box-box contact? Thanks a lot!
>>
>> Feng Chen
>> Graduate Student
>> Department of Civil and Environmental Engineering
>> 223 Perkins Hall
>> University of Tennessee, Knoxville, 37996
>> http://fchen3.googlepages.com/home
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Yade-users mailing list
>> Yade-users@xxxxxxxxxxxxxxxx
>> https://lists.berlios.de/mailman/listinfo/yade-users
>>
>>
>
>
>
--
_______________
Chareyre Bruno
Maitre de conference
Institut National Polytechnique de Grenoble
Laboratoire 3S (Soils Solids Structures) - bureau E145
BP 53 - 38041, Grenoble cedex 9 - France
Tél : 33 4 56 52 86 21
Fax : 33 4 76 82 70 00
________________
_______________________________________________
Yade-users mailing list
Yade-users@xxxxxxxxxxxxxxxx
https://lists.berlios.de/mailman/listinfo/yade-users
References
-
"Primary view" window empty
From: Jerome Duriez, 2007-12-13
-
Re: "Primary view" window empty
From: Chen, Feng, 2007-12-13
-
Re: "Primary view" window empty
From: Jerome Duriez, 2007-12-14
-
Re: "Primary view" window empty
From: milauer <eudoxos@xxxxxxxx>, 2007-12-14
-
How to add a box but not included in the contact list?
From: Chen, Feng, 2007-12-17
-
Re: How to add a box but not included in the contact list?
From: Janek Kozicki, 2007-12-17
-
How to judge whether a contact is a sphere-sphere contact or sphere-box contact or box-box contact
From: Chen, Feng, 2007-12-29
-
Re: How to judge whether a contact is a sphere-sphere contact or sphere-box contact or box-box contact
From: Bruno Chareyre, 2008-01-08