From: Martin Kronbichler Date: Sun, 12 Mar 2017 18:59:38 +0000 (+0100) Subject: Test that norms on tensors of VectorizedArray work X-Git-Tag: v8.5.0-rc1~43^2~2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=05fdbbf6c198babe132f2bc1fc2e410602f8c96e;p=dealii.git Test that norms on tensors of VectorizedArray work --- diff --git a/tests/base/vectorization_08.cc b/tests/base/vectorization_08.cc new file mode 100644 index 0000000000..71d5099d41 --- /dev/null +++ b/tests/base/vectorization_08.cc @@ -0,0 +1,38 @@ +// --------------------------------------------------------------------- +// +// Copyright (C) 2017 by the deal.II authors +// +// This file is part of the deal.II library. +// +// The deal.II library is free software; you can use it, redistribute +// it, and/or modify it under the terms of the GNU Lesser General +// Public License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// The full text of the license can be found in the file LICENSE at +// the top level of the deal.II distribution. +// +// --------------------------------------------------------------------- + +// check that operations on tensors of vectorized arrays are properly +// supported + +#include "../tests.h" + +#include +#include +#include +#include + +int main() +{ + initlog(); + + Tensor<1,2,VectorizedArray > t; + deallog << "Tensor norm: " << t.norm()[0] << std::endl; + Point<3,VectorizedArray > p; + deallog << "Point norm: " << p.norm()[0] << std::endl; + SymmetricTensor<2,3,VectorizedArray > st2; + SymmetricTensor<4,2,VectorizedArray > st4; + deallog << "Symmetric tensor norm: " << st2.norm()[0] + << " " << st4.norm()[0] << std::endl; +} diff --git a/tests/base/vectorization_08.output b/tests/base/vectorization_08.output new file mode 100644 index 0000000000..f85ab0ceae --- /dev/null +++ b/tests/base/vectorization_08.output @@ -0,0 +1,4 @@ + +DEAL::Tensor norm: 0.00000 +DEAL::Point norm: 0 +DEAL::Symmetric tensor norm: 0.00000 0.00000