avoid templates - e.g. in integration wrapper MemberFunctionIntegrator.h
|Status:||Rejected||Start date:||21 Mar 2013|
To accelerate compilation, review use of class-valued templates.
Prefer static functions (file scope) over unnecessary class structures.
Example: try to simplify MemberFunctionIntegrator.h
#2 Updated by herck over 7 years ago
Just a remark on the use of templates in the case of MemberFunctionIntegrator:
The idea is that in an OO program, the functions one wants to integrate are generally member functions of a class.
Either one must wrap these into global functions (à la Boost), which would compromise execution time (since these would be called quite often during a single integration), either one must parametrize the integrator by the class whose function one wants to integrate. We chose the last option.
Another remark is that compilation time is less critical than execution time and on modern computer systems there is not so much need in optimizing a single shot compilation step (compared to multiple executions of the code).
Personally, I also prefer the syntax of class templated integrator to a member function wrapper.
#3 Updated by pospelov over 7 years ago
Another remark, is that apart of technicalities, Integrator redesign is not the most urgent task. It does his job, for the moment it is enough. In the future, we probably will do much more integration and it will be more clear, which kind of redesign is required.