WIP: Redesign of quadrature rules
Redesign of the implementation of quadrature rules in Dune. Basically: generate c++ files from tabulated values, stored in a clearly defined .csv file. See issue "Redesign of quadrature rules" #9 for some details.
Main changes:
- The file
quadraturerules.hhis cleaned up, i.e.- internal definitions of specific quadrature rules removed (e.g. prism quadrature rule)
- several old rules are removed, e.g.
gauss.cc,gauss_imp.hh,gausslobatto.cc,gausslobatto_imp.hh,jacobi_1_0.cc,jacobi_1_0_imp.hh,jacobi_2_0.cc,jacobi_2_0_imp.hh,simplexquadrature.hh - a directory
utilityis added, that provides generators for several rules:- the
*.macfiles are moved to utility - a script
make_rules.pyis added that generates rules from a set of .csv files - a script
make_all_rules.pycallsmake_rules.pyfor all geometry types - the
rules.templ.hhfile is similar to the oldsimplexquadrature.hhbut with placeholders for dim, maxorder and geomtry-type and an internal script that writes points and weights given as input
- the
- A directory
utility/rulesis added that contains for all geometry types a set of quadrature rules in .csv files. - Using the
make_rules.pyscript with the templaterules.templ.hhand the defined rules in the folderrulessome implementations for quadrature rules are generated and stored in the folderquadraturerules:-
cube2dquadrature.inc.hh,cube3dquadrature.inc.hh,gausslobattoquadrature.inc.hh,gaussquadrature.inc.hh,jacobi1quadrature.inc.hh,jacobi2quadrature.inc.hh,prismquadrature.inc.hh,pyramidquadrature.inc.hh,simplex2dquadrature.inc.hh,simplex3dquadrature.inc.hh - These files are included in the main
quadraturerules.hh
-
- To provide multi-precision rules all rules are given as string representation of the values
- A conversion function is provided in
common/cast.hhwith a specialization for quadprecision inquadmath.hh - All standard floating-point types are cast from string using std methods, like
std::strtod( string )for double. All unknown types are assumed to have a string constructor. (This implementation may be changed in favour ofstd::stringstream)
- A conversion function is provided in
Thus, the user-interface is not changed, only the way the concrete quadrature rules are defined.