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

Jan Stránský proposed the following answer:
Thanks Jerome for pointing out the most important problem.

Law2::go have to be virtual with no extra arguments. In such way, the new
code should have give errors already during compilation. If the function is
not declared as virtual, some pieces of code operating on higher hierarchy
classes "don't see" it (i.e. what the error "probably go/goReverse was not
overridden with the same argument types" says)

All other parameters (t, d, q, omega, gamma, psi) should be stored in
corresponding IPhys (SynterPhys2), see e.g. how it is done
in Law2_ScGeom_ViscoFrictPhys_CundallStrack::go and creepedShear attribute
ar with stiffnesses.

cheers
Jan

[1]
https://github.com/yade/trunk/blob/master/pkg/dem/ElasticContactLaw.cpp#L102


2016-10-17 17:07 GMT+02:00 Jérôme Duriez <
question402...@answers.launchpad.net>:

> Question #402988 on Yade changed:
> https://answers.launchpad.net/yade/+question/402988
>
>     Status: Open => Answered
>
> Jérôme Duriez proposed the following answer:
> Hi,
>
> Helping to code a correct new interaction law is quite a hard task which
> is not eased by the lack of information about your new
> Ip2_SinterMat2_SinterMat2_SinterPhys2() (you did code it, I guess ?)
>
> As a small piece of help, did you try with a debug version of yade ?
> (let us know if you do not know what I'm speaking about)
>
> Using the sub-stepping tool of the GUI would also help to locate what
> part of the code throws the error.
>
> General stuff being said, why did you introduce so many new arguments in
> your Law2::go function ? I am unsure such thing is possible within Yade
> (ie within InteractionLoop)
>
> --
> You received this question notification because your team yade-users is
> an answer contact for Yade.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~yade-users
> Post to     : yade-users@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~yade-users
> More help   : https://help.launchpad.net/ListHelp
>

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

_______________________________________________
Mailing list: https://launchpad.net/~yade-users
Post to     : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp

Reply via email to