Hi, let me first explain how I was getting to the question, and after asking 
the question

I was trying to change a little get the behaviour of python getStress function, 
so that it takes into account the "real" (according to aabbExtrema() ) volume 
in non periodic case, rather than considering arbitrarily 1. This might avoid 
silly lost minutes....
So, as I did for porosity in Shop01.cpp, I wanted to change some code about 
getStress() in Shop02.cpp, using aabbExtrema() from _utils.cpp. Basically, I 
need then to include _utils.cpp both in Shop01.cpp or Shop02.cpp

* the most logical would maybe to include _utils.cpp from Shop.hpp, but 
_utils.cpp itself includes Shop.hpp...
* So, I included _utils.cpp both from Shop01.cpp and Shop02.cpp. This leads to 
"multiple definition" compilation errors, even if I add an inclusion guard 
(currently not existing) in _utils.cpp. Apparently, this should not be a 
surprize, and there might be solutions to this problem [1]

But before I really understand this, here is my main question :
- where does the need of an _utils.cpp file come from ? Apparently there is, at 
the end of the file, lines that allow to define python functions corresponding 
to c++ functions (e.g. from Shop). Would it be possible to define this 
elsewhere ?

Furthermore, this _utils.cpp is quite annoying for hyperlinks in sphinx doc. 
See e.g. the link towards utils.PWaveTimeStep in 
[2]<https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.GlobalStiffnessTimeStepper.defaultDt>
 that is broken and that I do not know how to fix because PWaveTimeStep() is 
defined in _utils.cpp and not in utils.py

Hoping that you will find some interesting point in this question, or at least 
a solution to the initial problem, happy Thanksgiving !

Jerome


[1] 
http://stackoverflow.com/questions/14909997/why-arent-my-include-guards-preventing-recursive-inclusion-and-multiple-symbol
[2] 
https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.GlobalStiffnessTimeStepper.defaultDt
_______________________________________________
Mailing list: https://launchpad.net/~yade-dev
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp

Reply via email to