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::abs
andstd::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::Float128
is specialized but should be constructed from string instead of fromdouble
-
Dune::GMPField
does 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
ctype
everywhere and provide replacement fornumeric_limits<ctype>::epsilon
if not available. - Prefer
using std::abs; using std::pow
over 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 indouble
format. -
GMPField
is not fixed, butFloat128
is tested instead. - The
GaussJacobi_n_0
test is disabled in case LAPACK is not found.
Closes #24 (closed)
Edited by Simon Praetorius