From: Menno Fraters Date: Tue, 3 Mar 2020 04:32:33 +0000 (-0800) Subject: Fix tester: remove constant expression. X-Git-Tag: v9.2.0-rc1~453^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=05fc2e34df8623e146527005f86f48868ba927ac;p=dealii.git Fix tester: remove constant expression. --- diff --git a/include/deal.II/base/tensor.h b/include/deal.II/base/tensor.h index dd4727d2f2..05bae7e4ca 100644 --- a/include/deal.II/base/tensor.h +++ b/include/deal.II/base/tensor.h @@ -2631,7 +2631,7 @@ cofactor(const Tensor<2, dim, Number> &t) * @relatesalso Tensor */ template -constexpr Tensor<2, dim, Number> +Tensor<2, dim, Number> project_onto_orthogonal_tensors(const Tensor<2, dim, Number> &tensor, const double tolerance) { diff --git a/tests/ad_common_tests/tensor_functions_01.h b/tests/ad_common_tests/tensor_functions_01.h index d0813fa81a..e00e044980 100644 --- a/tests/ad_common_tests/tensor_functions_01.h +++ b/tests/ad_common_tests/tensor_functions_01.h @@ -55,16 +55,14 @@ test_tensor() const Tensor<2, dim, ADNumberType> C5 = A * a; const Tensor<2, dim, ADNumberType> C6 = A / a; - const ADNumberType det_A = determinant(A); - const ADNumberType tr_A = trace(A); - const Tensor<2, dim, ADNumberType> A_inv = invert(A); - const Tensor<2, dim, ADNumberType> A_T = transpose(A); - const Tensor<2, dim, ADNumberType> A_adj = adjugate(A); - const Tensor<2, dim, ADNumberType> A_cof = cofactor(A); - const Tensor<2, dim, ADNumberType> A_orth = - project_onto_orthogonal_tensors(A); - const ADNumberType A_l1_norm = l1_norm(A, 1e-8); - const ADNumberType A_linf_norm = linfty_norm(A); + const ADNumberType det_A = determinant(A); + const ADNumberType tr_A = trace(A); + const Tensor<2, dim, ADNumberType> A_inv = invert(A); + const Tensor<2, dim, ADNumberType> A_T = transpose(A); + const Tensor<2, dim, ADNumberType> A_adj = adjugate(A); + const Tensor<2, dim, ADNumberType> A_cof = cofactor(A); + const ADNumberType A_l1_norm = l1_norm(A); + const ADNumberType A_linf_norm = linfty_norm(A); const ADNumberType A_ddot_B = double_contract<0, 0, 1, 1>(A, B); const Tensor<2, dim, ADNumberType> A_dot_B = contract<1, 0>(A, B); diff --git a/tests/tensors/constexpr_tensor.cc b/tests/tensors/constexpr_tensor.cc index 53c08dfb5b..de75112e03 100644 --- a/tests/tensors/constexpr_tensor.cc +++ b/tests/tensors/constexpr_tensor.cc @@ -181,7 +181,7 @@ main() DEAL_II_CONSTEXPR const auto dummy_8 = cofactor(a); deallog << "Deteriminant before orthogonalization: " << determinant(a) << std::endl; - const auto dummy_9 = project_onto_orthogonal_tensors(a, 1e-8); + const auto dummy_9 = project_onto_orthogonal_tensors(a, 0); deallog << "Deteriminant after orthogonalization: " << determinant(dummy_9) << std::endl; Assert(determinant(dummy_9) - 1. < 1e-8, ExcInternalError());