KeyError: "Unknown energy name 'kineticParticle'

Asked by Yor1

Hello yade users !

I implement some equations in the "NewtonIntegrator.cpp" script to calculate the dissipated energy by damping and the kinetic energy. The label chosen for the kinetic energy is 'kineticParticle' and for the energy dissipated by damping is 'nonviscDampParticle'.

In fact, i simulate the triaxial compression test to calculate the different energy components but i obtain this error message:
KeyError: "Unknown energy name 'kineticParticle'." and "Unknown energy name 'nonviscDampParticle'."
I don't understand why the code don't recognize these energy label knowing that the code is compiled with the new energetic equation.
you find in these links "NewtonIntegrator.cpp", "NewtonIntegrator.hpp" and the triaxial compression test script.
NewtonIntegrator.cpp https://filex.univ-lorraine.fr/get?k=gJTd8XcTqX7aCgyVxJN line 55 and line 90
NewtonIntegrator.hpp https://filex.univ-lorraine.fr/get?k=RkWOFG2bi1gkbV9RXFh
triaxial compression test https://filex.univ-lorraine.fr/get?k=ul6w12Hvz8wkZCE03Tl
the sample https://filex.univ-lorraine.fr/get?k=xTbw7ocfTIuDoaIScZJ

Best regards.
Jabrane

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Yor1
Solved:
Last query:
Last reply:
Revision history for this message
Jan Stránský (honzik) said :
#1

Hi Jabrane,
what version of Yade and operating system do you use? I was not able to
compile your files..
thanks
Jan

Revision history for this message
Yor1 (jabrane-hamdi) said :
#2

Hi Jan

I'm using this version of Yade: yade-2017-01-04.git-8801250
and this operating system: Ubuntu 16.04 LTS

Best regards
Jabrane

Revision history for this message
Jan Stránský (honzik) said :
#3

Hi Jabrane,
the problem is still there, I am not able to compile your NewtonIntegrator
files, even using the same version of Yade you mentioned.
Concerning the very first compilation error (NewtonIntegrator.cpp:143:92:
error: ‘isnan’ was not declared in this scope), in the files you provided,
you have isnan function, but it was changed to std::isnan already in
April.. So there must be something wrong on your side (version, files,
compilation..).
Please check the version information, sent and used files and that you
actually use the files you sent and let us know
cheers
Jan

Revision history for this message
Jérôme Duriez (jduriez) said :
#4

Hi,

Just to be sure: I guess you're aware these measurements are already coded in YADE e.g. through EnergyTracker, see https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.EnergyTracker and example script simple-scene/simple-scene-energy-tracking.py

Revision history for this message
Yor1 (jabrane-hamdi) said :
#5

Hi Jan and Jérôme,

I integrate my equation in the new version of "NewtonIntegrator.cpp" (with std::isnan).
I compile the code and i haven't problem in compiling.
But i have a new problem, when i execute yade i obtain this error message :
Error in `/usr/bin/python': malloc(): memory corruption: 0x0000000001a6f410

NewtonIntegrator.hpp with the new version (std::isnan) https://filex.univ-lorraine.fr/get?k=oE63DWqmO2BsfNrAcgP
NewtonIntegrator.cpp with the new version (std::isnan) https://filex.univ-lorraine.fr/get?k=Kw1m7oQUrtjzHUGLNhF

Best regards.
Jabrane.

Revision history for this message
Anton Gladky (gladky-anton) said :
#6

Hi,

you should be sure, you are not mixing Qt4 and Qt5 libs. Please
show your CmakeCache.txt, which is in a root of your build-dir.

Regards

Anton

2017-01-16 19:57 GMT+01:00 Yor1 <email address hidden>:
> I integrate my equation in the new version of "NewtonIntegrator.cpp" (with std::isnan).
> I compile the code and i haven't problem in compiling.
> But i have a new problem, when i execute yade i obtain this error message :
> Error in `/usr/bin/python': malloc(): memory corruption: 0x0000000001a6f410

Revision history for this message
Yor1 (jabrane-hamdi) said :
#7

Hi Anton,

Tahnk you for your reaction.
In the link below you can download my CmakeCache.txt used in the of Yade which i'm using
https://filex.univ-lorraine.fr/get?k=E7YGHlnMKoaTqoS8LaH

Best regards.
Jabrane.

Revision history for this message
Jan Stránský (honzik) said :
#8

Hi Jabrane,
I have tried your new files and had no problems with then (compiling as
well as running the example)
cheers
Jan

Revision history for this message
Yor1 (jabrane-hamdi) said :
#9

Hi Jan,

I identified the problem of YADE compiling. In fact, i change some source code of yade-2017-01-04.git-8801250 with source code of yade-2015-04-08.git-f3818b4.
With the changement done in April (isnan ---> sted::isnan), i insert the lines in the code source of yade-2017-01-04.git-8801250 from the code source (which i developed) in yade-2015-04-08.git-f3818b4 and the problem is resolved.

Best regards.
Jabrane.

Revision history for this message
Bruno Chareyre (bruno-chareyre) said :
#10

If I understand the above correctly you are copy/pasting lines selectively from one version to another. Then you end-up with a version that only you have.
Good for you if it works this time, but in the long run it will be impossible to manage.
If you are writing your own pieces of code I would suggest to keep using the latest version (i.e. including frequent updates) of the sources to avoid trouble.
Bruno