dougshidong / PHiLiP

Parallel High-Order Library for PDEs through hp-adaptive Discontinuous Galerkin methods
Other
45 stars 37 forks source link

Use metaprogramming for template instantiation #71

Open dougshidong opened 3 years ago

dougshidong commented 3 years ago

Many .cpp files have their class or function instantiated for many types. This becomes tedious and error prone. The use of Boost's metaprogramming library can become useful to remedy this issue:

https://www.boost.org/doc/libs/1_31_0/libs/mpl/doc/paper/html/usage.html#sequences

Another way is to do something similar to deal.II in their *.inst.in files such as

https://github.com/dougshidong/dealii/blob/master/source/grid/grid_generator.inst.in