From: Martin Kronbichler Date: Wed, 6 Sep 2023 14:09:27 +0000 (+0200) Subject: Use a simpler form to print an assertion X-Git-Tag: relicensing~525^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e4861bf60e681a2a2502f08abad7916b0891abf1;p=dealii.git Use a simpler form to print an assertion --- diff --git a/source/base/tensor_product_polynomials.cc b/source/base/tensor_product_polynomials.cc index 9f52511f2f..51eabd0f6d 100644 --- a/source/base/tensor_product_polynomials.cc +++ b/source/base/tensor_product_polynomials.cc @@ -101,8 +101,7 @@ TensorProductPolynomials<0, Polynomials::Polynomial>::compute_index( const unsigned int, std::array &) const { - constexpr int dim = 0; - AssertThrow(dim > 0, ExcNotImplemented()); + AssertThrow(false, ExcNotImplemented("This function does not work in 0-d!")); } @@ -130,8 +129,7 @@ void TensorProductPolynomials<0, Polynomials::Polynomial>::output_indices( std::ostream &) const { - constexpr int dim = 0; - AssertThrow(dim > 0, ExcNotImplemented()); + AssertThrow(false, ExcNotImplemented("This function does not work in 0-d!")); } @@ -156,8 +154,7 @@ void TensorProductPolynomials<0, Polynomials::Polynomial>::set_numbering( const std::vector &) { - constexpr int dim = 0; - AssertThrow(dim > 0, ExcNotImplemented()); + AssertThrow(false, ExcNotImplemented("This function does not work in 0-d!")); } @@ -188,8 +185,7 @@ TensorProductPolynomials<0, Polynomials::Polynomial>::compute_value( const unsigned int, const Point<0> &) const { - constexpr int dim = 0; - AssertThrow(dim > 0, ExcNotImplemented()); + AssertThrow(false, ExcNotImplemented("This function does not work in 0-d!")); return {}; } @@ -239,8 +235,7 @@ TensorProductPolynomials<0, Polynomials::Polynomial>::compute_grad( const unsigned int, const Point<0> &) const { - constexpr int dim = 0; - AssertThrow(dim > 0, ExcNotImplemented()); + AssertThrow(false, ExcNotImplemented("This function does not work in 0-d!")); return {}; } @@ -606,8 +601,7 @@ TensorProductPolynomials<0, Polynomials::Polynomial>::evaluate( std::vector> &, std::vector> &) const { - constexpr int dim = 0; - AssertThrow(dim > 0, ExcNotImplemented()); + AssertThrow(false, ExcNotImplemented("This function does not work in 0-d!")); } @@ -698,8 +692,7 @@ void AnisotropicPolynomials<0>::compute_index(const unsigned int, std::array &) const { - constexpr int dim = 0; - AssertThrow(dim > 0, ExcNotImplemented()); + AssertThrow(false, ExcNotImplemented("This function does not work in 0-d!")); } @@ -726,8 +719,7 @@ double AnisotropicPolynomials<0>::compute_value(const unsigned int, const Point<0> &) const { - constexpr int dim = 0; - AssertThrow(dim > 0, ExcNotImplemented()); + AssertThrow(false, ExcNotImplemented("This function does not work in 0-d!")); return {}; } @@ -768,8 +760,7 @@ Tensor<1, 0> AnisotropicPolynomials<0>::compute_grad(const unsigned int, const Point<0> &) const { - constexpr int dim = 0; - AssertThrow(dim > 0, ExcNotImplemented()); + AssertThrow(false, ExcNotImplemented("This function does not work in 0-d!")); return {}; } @@ -817,8 +808,7 @@ Tensor<2, 0> AnisotropicPolynomials<0>::compute_grad_grad(const unsigned int, const Point<0> &) const { - constexpr int dim = 0; - AssertThrow(dim > 0, ExcNotImplemented()); + AssertThrow(false, ExcNotImplemented("This function does not work in 0-d!")); return {}; } @@ -924,8 +914,7 @@ AnisotropicPolynomials<0>::evaluate(const Point<0> &, std::vector> &, std::vector> &) const { - constexpr int dim = 0; - AssertThrow(dim > 0, ExcNotImplemented()); + AssertThrow(false, ExcNotImplemented("This function does not work in 0-d!")); } @@ -948,8 +937,7 @@ unsigned int AnisotropicPolynomials<0>::get_n_tensor_pols( const std::vector>> &) { - constexpr int dim = 0; - AssertThrow(dim > 0, ExcNotImplemented()); + AssertThrow(false, ExcNotImplemented("This function does not work in 0-d!")); return {}; }