Improve the quadrature rule test
Summary
This MR fixes several shortcomings in the quadrature test. It changes all double to ctype in test-quadrature and use ADL for the lookup of abs and pow to allow other than standard floating point types to be used in quadrature rules. The test is extended to Float128 type.
Details
In the previous implementation of the test-quadrature.hh and in the quadrature rules were some problems:
- In several places explicit use of
double - qualified names for
std::absandstd::pow - Specialization for 1d rules to be constructed from string if
numeric_limits<ctype>::is_specialized. This is is probably to correct, since, e.g.,Dune::Float128is specialized but should be constructed from string instead of fromdouble -
Dune::GMPFielddoes not work in the current implementation (I have not found the reason why) - The test fails if LAPACK is not enabled
These problems are cleaned up:
- Use
ctypeeverywhere and provide replacement fornumeric_limits<ctype>::epsilonif not available. - Prefer
using std::abs; using std::powover qualified names - Specialization for 1d rules is done with
std::is_floating_point<ctype>::value. This should be correct, since in this specialization the numbers are constructed from floating-point numbers indoubleformat. -
GMPFieldis not fixed, butFloat128is tested instead. - The
GaussJacobi_n_0test is disabled in case LAPACK is not found.
Closes #24 (closed)
Edited by Simon Praetorius