yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #01033
Re: create a new engine (/common/engine/DeusMachina)
Hi,
thank you for your advises. It seems to be working. I just forgot to
declare it in the library dependency within the sconscript file
corrresponding to my newpreprocessor file. I'll have a look at the new
topic right now.
Thanks again,
Ben
Bruno Chareyre wrote:
> Agreed. First, check that your files are really compiled (you should see
> a newEngine.so in install dirs). If they are not, it is probably due to
> a missing declaration in SConscript files (those files define what needs
> to be compiled and the dependencies between classes).
> Just copy/paste/rename the GravityEngine section in dem/Sconscript (or
> common/SConscript, not sure).
>
> IIRC, the preprocessor will not appear in the interface if one of the
> plugin (the library corresponding to your new class) is not found. I
> think this will happen as soon as you declare the missing class in your
> code, it doesn't matter if you use it or not.
> Don't you get any compilation errors? warnings when you start Yade?
>
> If I understand correctly, you will need to play with distant
> interactions (without contact), which means you could be interested by
> the current discussion on this topic here :
> http://yade.wikia.com/wiki/Sanitizing_Contact_Logic.
>
> Bruno
>
>
>
> Jerome Duriez a écrit :
>
>> I think that's typically because you didn't modify the § concerning the
>> preprocessor file in the "Sconscript". You have also to modify it by
>> adding a line with the name of your new engine.
>>
>> Jerome
>>
>> Benjamin Fragneaud a écrit :
>>
>>
>>> Hi everybody,
>>> I'm trying to create an Engine that aplly Electrostatic force to a sphere.
>>> I´d like to allow displacement of bodies depending on the charge and
>>> the electrical potential.
>>> Perhaps I should precise that I´m quiet new to Yade and C++ programmation.
>>>
>>> To do so, I decided to inspire myself with an already written
>>> preprocesor: "funnel", which has been modified in order to generate a
>>> random cloud of spheres in a closed box.
>>> At this step every thing is working as I want to.
>>>
>>> * Creation of a new stand alone Engine:
>>> As well as I did before, I used an already written engine and modified
>>> it. But here is the problem.
>>> - I copy paste the GravityEngine.
>>> - rename it, rename the functions within and shrd_ptr,
>>> - I also rename the .hpp file
>>> - add it in the corresponding scons file
>>> It compiled well (no error) and was added to the libnewengine.so.
>>>
>>> In esance it should do exactly the same thing than the GravityEngine
>>> but with a different name.
>>>
>>> Nevertheless, when I try to use it within my new preprocessor, it
>>> doesn´t appear anymore in the preprocessor generator list (yade
>>> graphique interface).
>>>
>>> Moreover, If I just declare it in the list of classes used withtout
>>> using it (like declaring something that you don´t use), the
>>> preprocessor also don´t appear in the preprocessor list...
>>> Is anybody has any idea about what is wrong.
>>> Thanks for your help,
>>> Best,
>>> Ben
>>>
>>>
>>> _______________________________________________
>>> Yade-users mailing list
>>> Yade-users@xxxxxxxxxxxxxxxx
>>> https://lists.berlios.de/mailman/listinfo/yade-users
>>>
>>>
>>>
>>>
>> _______________________________________________
>> Yade-users mailing list
>> Yade-users@xxxxxxxxxxxxxxxx
>> https://lists.berlios.de/mailman/listinfo/yade-users
>>
>>
>>
>
>
>
_______________________________________________
Yade-users mailing list
Yade-users@xxxxxxxxxxxxxxxx
https://lists.berlios.de/mailman/listinfo/yade-users
References