← Back to team overview

yade-users team mailing list archive

Re: [Question #263477]: Contact law for a specific interaction

 

Question #263477 on Yade changed:
https://answers.launchpad.net/yade/+question/263477

    Status: Open => Answered

Chareyre proposed the following answer:
Hello Adel,
> is their a way in YADE to know which law is being applied by knowing the Ig2 and Ip2 of the interaction ?
Yes:
Yade [3]: il=O.engines[2] #the interaction loop in my example case
Yade [4]: il.lawDispatcher.dispFunctor?
...
Docstring:
dispFunctor( (LawDispatcher)arg1, (IGeom)arg2, (IPhys)arg3) -> LawFunctor :
    Return functor that would be dispatched for given argument(s); None
if no dispatch; ambiguous dispatch throws.

#let's see
Yade [5]: il.lawDispatcher.dispFunctor(ScGeom(),FrictPhys())
 ->  [5]: <Law2_ScGeom_FrictPhys_CundallStrack instance at 0x33d5a10>

Bruno

-- 
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.