← Back to team overview

yade-users team mailing list archive

Re: Successive slightly different simulations

 


Save the script as something.py and run with yade-trunk something.py.
Hello everybody. I made at last my first attempt today : I have defined my script "script.py" (attached), put it in the same folder as my executable "yade-trunk" where is already located the .xml that the script will use. Finally I typed ./yade-trunk script.py but there was no difference compared to typing only ".yade-trunk"... In the first case also the GUI appears and nothing else happens... Here are the outputs of the console :

jerome@c1solimara-l:~/YADE/bin$ ./yade-trunk script.py
Constructing ClassFactory  (if multiple times - check '-rdynamic' flag!).
Constructing SerializableSingleton (if multiple times - check '-rdynamic' flag!). INFO core/Omega.cpp:33 Omega: Constructing Omega (if multiple times - check '-rdynamic' flag!). INFO core/yade.cpp:225 main: Loading configuration file: /home/jerome/.yade-trunk/preferences.xml
INFO  core/yade.cpp:227 main: Loading plugins...
FATAL core/Omega.cpp:251 scanPlugins: Undefined symbol `typeinfo for GlobalStiffness' (/home/jerome/YADE/lib/yade-trunk/extra/libBrefcom.so: undefined symbol: _ZTI15GlobalStiffness). WARN core/Omega.cpp:266 scanPlugins: Couldn't load everything, some stuff may work incorrectly.
WARNING: cannot open file used for capillary law, in TriaxalTestWater
INFO  core/yade.cpp:227 main: Plugins loaded.
INFO gui/qt3/YadeQtMainWindow.cpp:48 YadeQtMainWindow: Loading configuration file: /home/jerome/.yade-trunk/QtGUIPreferences.xml.


(And :

jerome@c1solimara-l:~/YADE/bin$ ./yade-trunk
Constructing ClassFactory  (if multiple times - check '-rdynamic' flag!).
Constructing SerializableSingleton (if multiple times - check '-rdynamic' flag!). INFO core/Omega.cpp:33 Omega: Constructing Omega (if multiple times - check '-rdynamic' flag!). INFO core/yade.cpp:225 main: Loading configuration file: /home/jerome/.yade-trunk/preferences.xml
INFO  core/yade.cpp:227 main: Loading plugins...
FATAL core/Omega.cpp:251 scanPlugins: Undefined symbol `typeinfo for GlobalStiffness' (/home/jerome/YADE/lib/yade-trunk/extra/libBrefcom.so: undefined symbol: _ZTI15GlobalStiffness). WARN core/Omega.cpp:266 scanPlugins: Couldn't load everything, some stuff may work incorrectly.
WARNING: cannot open file used for capillary law, in TriaxalTestWater
INFO  core/yade.cpp:227 main: Plugins loaded.
INFO gui/qt3/YadeQtMainWindow.cpp:48 YadeQtMainWindow: Loading configuration file: /home/jerome/.yade-trunk/QtGUIPreferences.xml.

)


Does someone see why I can't launch my python script ? Thanks

Jerome
o=Omega()

# loop over different loading modes
for mode in ['DNC','DTC']:
    # load the original state
    o.load('Test.xml')
    # get the engine you want to modify
    je=o.labeledEngine('DirecResearchEngine')
    # change engine parameters depending on the loading mode
    if mode=='DNC':
       je['theta']=0
       je['nbre_iter']=1000
    elif mode=='DTC':
       je['theta']=90
       je['nbre_iter']=1000
    # run 1000 iterations and wait (True) until they are done
    # you could use different criterion of when to stop, but this one is the simplest since it is known beforehand
    o.run(1000,True);
_______________________________________________
Yade-users mailing list
Yade-users@xxxxxxxxxxxxxxxx
https://lists.berlios.de/mailman/listinfo/yade-users

Follow ups

References