From c9908b13a0f238c1cedd8042fcdd10ad112edb71 Mon Sep 17 00:00:00 2001 From: Menno Fraters Date: Fri, 28 Feb 2020 15:50:57 -0800 Subject: [PATCH] expand testing --- tests/tensors/constexpr_tensor.cc | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/tensors/constexpr_tensor.cc b/tests/tensors/constexpr_tensor.cc index 11b026535f..53c08dfb5b 100644 --- a/tests/tensors/constexpr_tensor.cc +++ b/tests/tensors/constexpr_tensor.cc @@ -186,6 +186,19 @@ main() << std::endl; Assert(determinant(dummy_9) - 1. < 1e-8, ExcInternalError()); + // check wheter the output is the same as the input. For example, it could + // have been transposed. + Vector unrolled_a(9); + a.unroll(unrolled_a); + Vector unrolled_dummy_9(9); + dummy_9.unroll(unrolled_dummy_9); + for (size_t i = 0; i < unrolled_a.size(); i++) + { + Assert(std::fabs(unrolled_a[i] - unrolled_dummy_9[i]) < 1e-8, + ExcInternalError()); + } + + constexpr double non_orthogonal_init[3][3] = {{1., 2., 3.}, {1., 1.5, 2.}, -- 2.39.5