← Back to team overview

yade-users team mailing list archive

Re: [Question #702096]: Learning of ig2_ Sphere_ Sphere_ ScGeom.cpp

 

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

    Status: Open => Answered

Jan Stránský proposed the following answer:
> What do these the functions of go() and goReverse() do?

go is the "main" function of (not only) the Ig2 functor.
In this case:
- if the interaction is new (see below), creates new IGeom and assign it to the interaction
- some setting of the IGeom (e.g. precomputeRotations)
- returns true / false

goReverse is called with reversed order.
(It seems there is a bug and that cm1 and cm2 should also be reversed?)

> bool isNew = !c->geom;
> what does this sentence mean?

"c" is Interaction instance.
c->geom is its IGeom instance.
If there is no IGeom (!c->geom), it is new interaction, remembering it as isNew bool variable.

Cheers
Jan

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