yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #02613
Re: ::go function
2010/3/21 Václav Šmilauer <eudoxos@xxxxxxxx>
> > a question on the function ::go used for instance in a contact law.
> > Where is actually this function declared? How does it work? For
> > instance, I would expect a loop over all the existing interactions..
> > (if IICR the action() function was doing a loop in that sense). In the
> > case of the ::go function where do I find such loop? Just to know..
> Those are called from dispatchers. Have a look at
> InteractionDispatchers::action, for instance. There is a loop traversing
> all interactions, calling appropriate functors for each (lines 114, 131,
> 149). The code is a little hairy, because of caching functor resolution
> etc, but I think you will get the idea. (Note that the exact
> implementation details will get a little different in the future)
>
> Thanks, at least I have got an idea.
> > About the contact law. Exactly at which point the interaction becomes
> > real? In the InteractionGeometryFunctor, right? Why do we need to
> > request a delete of the interaction at the level of the contact law?
> > Maybe this an old question, but at the moment I am not able to access
> > the mailing list archive.
> http://beta.arcig.cz/~eudoxos/yade/sphinx/prog.html#handling-interactions<http://beta.arcig.cz/%7Eeudoxos/yade/sphinx/prog.html#handling-interactions>
> (I know there are typos etc, but you will get the idea, I think)
>
> > Another general question on the code. For my understanding I am trying
> > to start from the main file and reconstruct how the whole simulation
> > works. Is in the main file where everything starts from, right? Is in
> > this file where we create all the objects, call the engines and so on?
> Well, no... the core/main/main.cpp is not used anymore (thanks for
> reminding me of removing it).
>
Good to know.
>
> Everything starts from core/main/main.py.in (yes, python; the .in suffix
> means that we do some replacing of ${variable} things in the file before
> copying it over to yade-* file, otherwise it is regular python script).
>
> This handles command-line options and import the yade parent module
> (which is really py/__init__.py.in). The one initializes the c++ part
> (using the yade.boot module, defined in core/main/pyboot.cpp), including
> loading plugins. Then, (back in py/__init__.py.in) we either run script
> from command line or load xml file or do noting etc.
>
> (good idea to describe this thing in the manual as well :-) )
>
> HTH, Vaclav
>
On the c++ side I would like to solve a doubt in my mind (being not so
strong in c++). I see that to start with the simulation we create an
instance of omega class. Omega class has a scene instance as attribute,
which in turn has other instance attributes like bound engines etc. Are all
these objects created at the same time as omega instance? Is Omega a
metaclass? How is it that we can create more than one scene?
Thanks Vaclav for your continuous help.
Chiara
>
>
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~yade-users<https://launchpad.net/%7Eyade-users>
> Post to : yade-users@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~yade-users<https://launchpad.net/%7Eyade-users>
> More help : https://help.launchpad.net/ListHelp
>
Follow ups
References