From 6ce72c826ed38f4c52e38a6bfb2dc6b74b06f2bd Mon Sep 17 00:00:00 2001 From: Niklas Wik Date: Mon, 6 Jun 2022 13:33:47 +0200 Subject: [PATCH] Fix compiler warning --- include/deal.II/matrix_free/evaluation_kernels.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/deal.II/matrix_free/evaluation_kernels.h b/include/deal.II/matrix_free/evaluation_kernels.h index ff05bbc5a0..dc276f9e45 100644 --- a/include/deal.II/matrix_free/evaluation_kernels.h +++ b/include/deal.II/matrix_free/evaluation_kernels.h @@ -3697,6 +3697,15 @@ namespace internal const unsigned int face_no, const MatrixFreeFunctions::ShapeInfo &shape_info) { + if (dim == 1) + { + // This should never happen since the FE_RaviartThomasNodal is not + // defined for dim = 1. It prevents compiler warnings of infinite + // recursion. + Assert(false, ExcInternalError()); + return; + } + bool increase_max_der = false; if ((flag & EvaluationFlags::hessians && max_derivative < 2) || (flag & EvaluationFlags::gradients && max_derivative < 1)) -- 2.39.5