← Back to team overview

yade-dev team mailing list archive

Re: Why _utils.hpp and Shop.hpp ? Shop::getPorosity vs Shop__getPorosity

 





In **my opinion**:
1) Shop functions should be C++ only, not returning or accepting boost::python stuff. The python stuff (like converting std::vector to python tuple/list or modifying input/output like [1]) is (should be) the reason for py/_utils existence. 2) In the same way, there should not be non-python function in py/_utils (should be moved to Shop).
Not 1) nor 2) is the case now..

Agreed.
The idea of not calling Omega::instance().getScene() all the time is sound since it has a cpu cost. Arguably this cost is negligible compared to effectively calculating porosity but it is not always the case in all functions, it is thus a good rule of thumb to pass it as argument in c++ algorithms.
Bruno





References