← Back to team overview

yade-dev team mailing list archive

Re: CohesiveFrictionalContactLaw "box"

 

Janek Kozicki a écrit :
> Bruno,
>
> I'm trying to add moment rotation into CohesiveFrictionalContactLaw,
> it will use that flag "momentRotationLaw" (which is true by default -
> so it will modify all existing simulations!)
>
> And I've seen this line in CohesiveFrictionalContactLaw.cpp:83
>
> if (detectBrokenBodies &&
> (*bodies)[(*ii)->getId1()]->interactingGeometry->getClassName() !=
> "box"  &&
> (*bodies)[(*ii)->getId2()]->interactingGeometry->getClassName() !=
> "box") 
>
> there are two things wrong with it:
>
> 1. interactingGeometry->getClassName() returns "InteractingBox" not "box"
> 2. comparing strings is not fast.
>
>   
Ok thank you. This is just experimental code actually, in order to 
change color of bodies which have at least one broken interaction. But 
let you correct this if you feel like doing it (based on classIndex 
probably?).

One technical question : when one write "if (c1 && c2 && c3)", are tests 
c2 and c3 still evaluated when c1 is  "false"?

Bruno







-- 
 
_______________
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 43
________________

_______________________________________________
yade-dev mailing list
yade-dev@xxxxxxxxxxxxxxxx
https://lists.berlios.de/mailman/listinfo/yade-dev



Follow ups

References