From: bangerth Date: Thu, 9 Feb 2012 08:36:56 +0000 (+0000) Subject: New tests. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=68e315e983954e0dc7189570a03798f7d17d18b9;p=dealii-svn.git New tests. git-svn-id: https://svn.dealii.org/trunk@25019 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/tests/base/tensor_04.cc b/tests/base/tensor_04.cc new file mode 100644 index 0000000000..3b028f71aa --- /dev/null +++ b/tests/base/tensor_04.cc @@ -0,0 +1,43 @@ +//---------------------------- tensor_04.cc --------------------------- +// $Id$ +// Version: $Name$ +// +// Copyright (C) 2006, 2012 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. +// +//---------------------------- tensor_04.cc --------------------------- + +// check l1_norm(Tensor<2,dim>) + +#include "../tests.h" +#include +#include +#include +#include +#include + +int main () +{ + std::ofstream logfile("tensor_04/output"); + deallog << std::setprecision(3); + deallog.attach(logfile); + deallog.depth_console(0); + deallog.threshold_double(1.e-10); + + double a[3][3] = {{1, 2, 3}, {3, 4, 5}, {6, 7, 8}}; + + const unsigned int dim=3; + Tensor<2,dim> t(a); + + deallog << l1_norm(t) << std::endl; + t = 0; + deallog << l1_norm(t) << std::endl; + + Assert (t.norm() == 0, ExcInternalError()); + + deallog << "OK" << std::endl; +} diff --git a/tests/base/tensor_04/cmp/generic b/tests/base/tensor_04/cmp/generic new file mode 100644 index 0000000000..c040c23073 --- /dev/null +++ b/tests/base/tensor_04/cmp/generic @@ -0,0 +1,4 @@ + +DEAL::16.0 +DEAL::0 +DEAL::OK diff --git a/tests/base/tensor_05.cc b/tests/base/tensor_05.cc new file mode 100644 index 0000000000..41d7d6f355 --- /dev/null +++ b/tests/base/tensor_05.cc @@ -0,0 +1,43 @@ +//---------------------------- tensor_05.cc --------------------------- +// $Id$ +// Version: $Name$ +// +// Copyright (C) 2006, 2012 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. +// +//---------------------------- tensor_05.cc --------------------------- + +// check linfty_norm(Tensor<2,dim>) + +#include "../tests.h" +#include +#include +#include +#include +#include + +int main () +{ + std::ofstream logfile("tensor_05/output"); + deallog << std::setprecision(3); + deallog.attach(logfile); + deallog.depth_console(0); + deallog.threshold_double(1.e-10); + + double a[3][3] = {{1, 2, 3}, {3, 4, 5}, {6, 7, 8}}; + + const unsigned int dim=3; + Tensor<2,dim> t(a); + + deallog << linfty_norm(t) << std::endl; + t = 0; + deallog << linfty_norm(t) << std::endl; + + Assert (t.norm() == 0, ExcInternalError()); + + deallog << "OK" << std::endl; +} diff --git a/tests/base/tensor_05/cmp/generic b/tests/base/tensor_05/cmp/generic new file mode 100644 index 0000000000..c61eaaad68 --- /dev/null +++ b/tests/base/tensor_05/cmp/generic @@ -0,0 +1,4 @@ + +DEAL::21.0 +DEAL::0 +DEAL::OK