From 26485af9f788d320523e6bbd67aad31fff597d17 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Thu, 2 Jun 2005 04:29:26 +0000 Subject: [PATCH] New tests. git-svn-id: https://svn.dealii.org/trunk@10813 0785d39b-7218-0410-832d-ea1e28bc413d --- tests/base/symmetric_tensor_17.cc | 81 +++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 tests/base/symmetric_tensor_17.cc diff --git a/tests/base/symmetric_tensor_17.cc b/tests/base/symmetric_tensor_17.cc new file mode 100644 index 0000000000..f68704f59a --- /dev/null +++ b/tests/base/symmetric_tensor_17.cc @@ -0,0 +1,81 @@ +//---------------------------- symmetric_tensor_17.cc --------------------------- +// $Id$ +// Version: $Name$ +// +// Copyright (C) 2005 by the deal.II authors +// +// This file is subject to QPL and may not be distributed +// without copyright and license information. Please refer +// to the file deal.II/doc/license.html for the text and +// further information on this license. +// +//---------------------------- symmetric_tensor_17.cc --------------------------- + +// compute the tensor C*unit_symmetric_tensor -- I needed this tensor for an +// application, so thought I'd make a test out of it + +#include "../tests.h" +#include +#include +#include +#include +#include + + +template +void test () +{ + deallog << "dim=" << dim << std::endl; + + SymmetricTensor<4,dim> t; + for (unsigned int i=0; i t_times_1 = t * unit_symmetric_tensor(); + + deallog << "t*1=" << std::endl; + for (unsigned int i=0; i()).norm() + < 1e-14*t_times_1.norm(), + ExcInternalError()); +} + + + + +int main () +{ + std::ofstream logfile("symmetric_tensor_17.output"); + logfile.precision(3); + deallog.attach(logfile); + deallog.depth_console(0); + deallog.threshold_double(1.e-10); + + test<1> (); + test<2> (); + test<3> (); + + deallog << "OK" << std::endl; +} -- 2.39.5