]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Another attempt to fix compile warning
authorMartin Kronbichler <martin.kronbichler@uni-a.de>
Fri, 1 Sep 2023 06:45:54 +0000 (08:45 +0200)
committerMartin Kronbichler <martin.kronbichler@uni-a.de>
Wed, 6 Sep 2023 14:03:39 +0000 (16:03 +0200)
source/base/tensor_product_polynomials.cc

index cf14a7de7f83f79aa098cc55f868b4f94db7e6f5..9f52511f2f4be8a1bfae6e77e5d4d246a56ad68e 100644 (file)
@@ -500,6 +500,7 @@ namespace internal
 } // namespace internal
 
 
+
 template <int dim, typename PolynomialType>
 void
 TensorProductPolynomials<dim, PolynomialType>::evaluate(
@@ -510,9 +511,6 @@ TensorProductPolynomials<dim, PolynomialType>::evaluate(
   std::vector<Tensor<3, dim>> &third_derivatives,
   std::vector<Tensor<4, dim>> &fourth_derivatives) const
 {
-  if constexpr (dim == 0)
-    return;
-
   Assert(dim <= 3, ExcNotImplemented());
   Assert(values.size() == this->n() || values.empty(),
          ExcDimensionMismatch2(values.size(), this->n(), 0));
@@ -598,6 +596,22 @@ TensorProductPolynomials<dim, PolynomialType>::evaluate(
 
 
 
+template <>
+void
+TensorProductPolynomials<0, Polynomials::Polynomial<double>>::evaluate(
+  const Point<0> &,
+  std::vector<double> &,
+  std::vector<Tensor<1, 0>> &,
+  std::vector<Tensor<2, 0>> &,
+  std::vector<Tensor<3, 0>> &,
+  std::vector<Tensor<4, 0>> &) const
+{
+  constexpr int dim = 0;
+  AssertThrow(dim > 0, ExcNotImplemented());
+}
+
+
+
 template <int dim, typename PolynomialType>
 std::unique_ptr<ScalarPolynomialsBase<dim>>
 TensorProductPolynomials<dim, PolynomialType>::clone() const

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.