diff --git a/Tests/MathLib/TestGaussLegendreIntegration.cpp b/Tests/MathLib/TestGaussLegendreIntegration.cpp index d648130f5c60972dc6cb70439fb2a17fb6ae730c..c6b4f49e2653a83af8d715c248856abdf3e49a51 100644 --- a/Tests/MathLib/TestGaussLegendreIntegration.cpp +++ b/Tests/MathLib/TestGaussLegendreIntegration.cpp @@ -564,6 +564,12 @@ OGS_DONT_TEST_THIS_IF_PETSC(MathLib, MeshLib::IO::VtuInterface::readVTUFile( TestInfoLib::TestInfo::data_path + "/MathLib/unit_cube_tet.vtu")); + // quadrature must be exact up to the given polynomial degrees + // for integration order n = 1, 2, 3 it is 2*n-1 = 1, 3, 5 + // for integration order 4 it is 5, i.e. the same as for 3rd integration + // order + const std::vector<unsigned> maximum_polynomial_degrees{0, 1, 3, 5, 5}; + for (unsigned integration_order : {1, 2, 3, 4}) { DBUG("\n==== integration order: {:d}.\n", integration_order); @@ -571,8 +577,7 @@ OGS_DONT_TEST_THIS_IF_PETSC(MathLib, integration_order); for (unsigned polynomial_order = 0; - // Gauss-Legendre integration is exact up to this order! - polynomial_order < 2 * integration_order; + polynomial_order <= maximum_polynomial_degrees[integration_order]; ++polynomial_order) { DBUG(" == polynomial order: {:d}.", polynomial_order);