← Back to team overview

yade-dev team mailing list archive

Re: Mandatory engines

 

Hi Vaclav,

Thanks a lot for explanations. I will write the needed physicalAction (s) after. For the moment, I would simply like to test (with display) two new functors: - the one make interactingGeometry (BssSweptSphereLineSegment) from GeometricalModel (BshTube),
- the other make AABB from interactingGeometry.
To 'launch' these functor, I pushed back to the initializers. Nevertheless, it seems that initializations
are performed during the first step of calculation. Is it right?

Another questions:
do you think I can add to svn repository my pluggins even if they are not yet usable?
(I'm sure they will not interact with the rest)
Is there a rule about that?

Regards,
Vincent


* HERE IS THE STORY:

Say I want to implement a new geometry for bodies. I code pluggins
that I needed (GeometriclModel, InteractingGeometry,Functors,
GLDraw*,Preprocessor...) after discussing with Janeck

I wanted to make some check on the displaying of this new geometry so
I created a new PreProcessor that generates the wanted bodies. In a
first stage, the 'lists' rootBody->engines and rootBody->initializers
was copy&past from the TetrahedronsTest pre-processor. It worked fine
at generation but  crashed during the first step of simulation (!)

I decided to clear all engines and initializers...  it crashed during
generation!

* HERE ARE MY QUESTIONS:

Can we have empty 'lists' of engines and initializers without crash
(only to make some graphical checks)?
If it does not, what are the engines (and initializers) that MUST
absolutely be 'defined'?
Hi, There are no mandatory engines/initializers per se, but some engines
need PhysicalActions, that must be initialized with
PhysicalActionContainerInitializer. If you use the debug version and
have gdb installed, you will get backtrace after crash, which will tell
you (or us, if you can't make sense of it) what went wrong.

However, if you want just to create a simple simulation for testing, I
suggest that you use python for that -- see scripts/simple-scene.py for
an example. For testing display, you can only create the body, without
any engines, like this:

 b=Body()
b.shape=GeometricalModel('VincentGeomModel', {'attribute1':value1,'attribue2':value2}) b.mold=InteractingGeometry('VincentInteractingGeom', {'attr1':val1,'attr2',val2}) b.phys=PhysicalParameters('BodyMacroParameters',{'se3':[x,y,z, 1,0,0,0]})
 b.bound=BoundingVolume('AABB')
 o=Omega()
 o.bodies.append(b)

You can save that in somefile.py and run "yade-... somefile.py" or you
can type that to the python console. At this point, you should have your
body displayed in the 3d view.

Regards, Vaclav




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




Follow ups

References