← Back to team overview

yade-users team mailing list archive

Re: How to judge whether a contact is a sphere-sphere contact or sphere-box contact or box-box contact

 

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



Follow ups

References