C++ template metaprogramming in mathematical physics problems
Abstract:
The application of C++ template metaprogramming for the simplification of writing down of algorithms and moving a part of calculations (first of all integral constants) to the compile stage is considered. Theoretically, this allows speeding up the execution of programs and can be highly actual for numerical solving of mathematical physics problems. Template metaprogramming allows automate some complicated calculations, such as brackets opening in compound expressions and calculus of symbolic derivatives of formulas. This helps get rid of hard to catch errors, appearing when such calculations are done manually because of the inattention.