From: bangerth Date: Fri, 5 Dec 2008 23:08:08 +0000 (+0000) Subject: Add new testcases from the branch that wouldn't let themselves be copied. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e63eacbcccaf357932480a70a075bafce1b8e3dc;p=dealii-svn.git Add new testcases from the branch that wouldn't let themselves be copied. git-svn-id: https://svn.dealii.org/trunk@17870 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/tests/bits/full_matrix_53.cc b/tests/bits/full_matrix_53.cc new file mode 100644 index 0000000000..11002edf6f --- /dev/null +++ b/tests/bits/full_matrix_53.cc @@ -0,0 +1,79 @@ +//---------------------------------------------------------------------- +// $Id: full_matrix_28.cc 15513 2007-11-18 05:44:22Z bangerth $ +// Version: $Name$ +// +// Copyright (C) 2007 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. +// +//---------------------------------------------------------------------- + + +// check FullMatrix::left_invert and FullMatrix::right_invert + + +#include "../tests.h" +#include "full_matrix_common.h" + + +std::string output_file_name = "full_matrix_53/output"; + +template +void +calculate(const FullMatrix A, + const FullMatrix B) +{ + + FullMatrix A_r_inv(A.n(),A.m()); + FullMatrix identity(A.m(),A.m()); + A_r_inv.right_invert(A); + deallog<<"A matrix"< B_l_inv(B.n(),B.m()); + FullMatrix identity2(B.n(),B.n()); + B_l_inv.left_invert(B); + deallog<<"B matrix"< +void +check () +{ + + FullMatrix A(1,2); + fill_matrix(A); + + FullMatrix B(2,1); + fill_matrix(B); + + calculate(A,B); + + FullMatrix A1(2,3); + fill_matrix(A1); + + FullMatrix B1(3,2); + fill_matrix(B1); + + calculate(A1,B1); + +} + diff --git a/tests/bits/full_matrix_53/cmp/generic b/tests/bits/full_matrix_53/cmp/generic new file mode 100644 index 0000000000..c31c01f6ce --- /dev/null +++ b/tests/bits/full_matrix_53/cmp/generic @@ -0,0 +1,97 @@ + +DEAL::A matrix +DEAL::1x2 matrix +DEAL::1.0 2.0 +DEAL::Right inverse +DEAL::2x1 matrix +DEAL::0.20 +DEAL::0.40 +DEAL::Identity = A*A_r_inv +DEAL::1x1 matrix +DEAL::1.0 +DEAL:: +DEAL::B matrix +DEAL::2x1 matrix +DEAL::1.0 +DEAL::2.0 +DEAL::Left inverse +DEAL::1x2 matrix +DEAL::0.20 0.40 +DEAL::Identity = B_l_inv*B +DEAL::1x1 matrix +DEAL::1.0 +DEAL::A matrix +DEAL::2x3 matrix +DEAL::1.0 2.0 3.0 +DEAL::4.0 5.0 6.0 +DEAL::Right inverse +DEAL::3x2 matrix +DEAL::-0.94 0.44 +DEAL::-0.11 0.11 +DEAL::0.72 -0.22 +DEAL::Identity = A*A_r_inv +DEAL::2x2 matrix +DEAL::1.0 0 +DEAL::0 1.0 +DEAL:: +DEAL::B matrix +DEAL::3x2 matrix +DEAL::1.0 2.0 +DEAL::3.0 4.0 +DEAL::5.0 6.0 +DEAL::Left inverse +DEAL::2x3 matrix +DEAL::-1.3 -0.33 0.67 +DEAL::1.1 0.33 -0.42 +DEAL::Identity = B_l_inv*B +DEAL::2x2 matrix +DEAL::1.0 0 +DEAL::0 1.0 +DEAL::A matrix +DEAL::1x2 matrix +DEAL::1.0 2.0 +DEAL::Right inverse +DEAL::2x1 matrix +DEAL::0.20 +DEAL::0.40 +DEAL::Identity = A*A_r_inv +DEAL::1x1 matrix +DEAL::1.0 +DEAL:: +DEAL::B matrix +DEAL::2x1 matrix +DEAL::1.0 +DEAL::2.0 +DEAL::Left inverse +DEAL::1x2 matrix +DEAL::0.20 0.40 +DEAL::Identity = B_l_inv*B +DEAL::1x1 matrix +DEAL::1.0 +DEAL::A matrix +DEAL::2x3 matrix +DEAL::1.0 2.0 3.0 +DEAL::4.0 5.0 6.0 +DEAL::Right inverse +DEAL::3x2 matrix +DEAL::-0.94 0.44 +DEAL::-0.11 0.11 +DEAL::0.72 -0.22 +DEAL::Identity = A*A_r_inv +DEAL::2x2 matrix +DEAL::1.0 -2.4e-07 +DEAL::-4.8e-07 1.0 +DEAL:: +DEAL::B matrix +DEAL::3x2 matrix +DEAL::1.0 2.0 +DEAL::3.0 4.0 +DEAL::5.0 6.0 +DEAL::Left inverse +DEAL::2x3 matrix +DEAL::-1.3 -0.33 0.67 +DEAL::1.1 0.33 -0.42 +DEAL::Identity = B_l_inv*B +DEAL::2x2 matrix +DEAL::1.0 7.6e-06 +DEAL::2.4e-07 1.0 diff --git a/tests/bits/full_matrix_53/cmp/x86_64-unknown-linux-gnu+gcc4.2 b/tests/bits/full_matrix_53/cmp/x86_64-unknown-linux-gnu+gcc4.2 new file mode 100644 index 0000000000..c549327d5b --- /dev/null +++ b/tests/bits/full_matrix_53/cmp/x86_64-unknown-linux-gnu+gcc4.2 @@ -0,0 +1,97 @@ + +DEAL::A matrix +DEAL::1x2 matrix +DEAL::1.0 2.0 +DEAL::Right inverse +DEAL::2x1 matrix +DEAL::0.20 +DEAL::0.40 +DEAL::Identity = A*A_r_inv +DEAL::1x1 matrix +DEAL::1.0 +DEAL:: +DEAL::B matrix +DEAL::2x1 matrix +DEAL::1.0 +DEAL::2.0 +DEAL::Left inverse +DEAL::1x2 matrix +DEAL::0.20 0.40 +DEAL::Identity = B_l_inv*B +DEAL::1x1 matrix +DEAL::1.0 +DEAL::A matrix +DEAL::2x3 matrix +DEAL::1.0 2.0 3.0 +DEAL::4.0 5.0 6.0 +DEAL::Right inverse +DEAL::3x2 matrix +DEAL::-0.94 0.44 +DEAL::-0.11 0.11 +DEAL::0.72 -0.22 +DEAL::Identity = A*A_r_inv +DEAL::2x2 matrix +DEAL::1.0 0 +DEAL::0 1.0 +DEAL:: +DEAL::B matrix +DEAL::3x2 matrix +DEAL::1.0 2.0 +DEAL::3.0 4.0 +DEAL::5.0 6.0 +DEAL::Left inverse +DEAL::2x3 matrix +DEAL::-1.3 -0.33 0.67 +DEAL::1.1 0.33 -0.42 +DEAL::Identity = B_l_inv*B +DEAL::2x2 matrix +DEAL::1.0 0 +DEAL::0 1.0 +DEAL::A matrix +DEAL::1x2 matrix +DEAL::1.0 2.0 +DEAL::Right inverse +DEAL::2x1 matrix +DEAL::0.20 +DEAL::0.40 +DEAL::Identity = A*A_r_inv +DEAL::1x1 matrix +DEAL::1.0 +DEAL:: +DEAL::B matrix +DEAL::2x1 matrix +DEAL::1.0 +DEAL::2.0 +DEAL::Left inverse +DEAL::1x2 matrix +DEAL::0.20 0.40 +DEAL::Identity = B_l_inv*B +DEAL::1x1 matrix +DEAL::1.0 +DEAL::A matrix +DEAL::2x3 matrix +DEAL::1.0 2.0 3.0 +DEAL::4.0 5.0 6.0 +DEAL::Right inverse +DEAL::3x2 matrix +DEAL::-0.94 0.44 +DEAL::-0.11 0.11 +DEAL::0.72 -0.22 +DEAL::Identity = A*A_r_inv +DEAL::2x2 matrix +DEAL::1.0 -1.2e-07 +DEAL::-9.5e-07 1.0 +DEAL:: +DEAL::B matrix +DEAL::3x2 matrix +DEAL::1.0 2.0 +DEAL::3.0 4.0 +DEAL::5.0 6.0 +DEAL::Left inverse +DEAL::2x3 matrix +DEAL::-1.3 -0.33 0.67 +DEAL::1.1 0.33 -0.42 +DEAL::Identity = B_l_inv*B +DEAL::2x2 matrix +DEAL::1.0 9.1e-06 +DEAL::-9.5e-07 1.0 diff --git a/tests/bits/full_matrix_54.cc b/tests/bits/full_matrix_54.cc new file mode 100644 index 0000000000..7e2175233f --- /dev/null +++ b/tests/bits/full_matrix_54.cc @@ -0,0 +1,38 @@ +//---------------------------------------------------------------------- +// $Id: full_matrix_28.cc 15513 2007-11-18 05:44:22Z bangerth $ +// Version: $Name$ +// +// Copyright (C) 2007 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. +// +//---------------------------------------------------------------------- + + +// another check FullMatrix::Tadd +// proper transposition of rectangular matrices is verified + + +#include "../tests.h" +#include "full_matrix_common.h" + + +std::string output_file_name = "full_matrix_54/output"; + + +template +void +check () +{ + FullMatrix A(8,9); + fill_matrix(A); + deallog<<"Given matrix"< A_t(A.n(),A.m()); + A_t.Tadd(A,1); + deallog<<"Transposed matrix"< +#include +#include +#include +#include + +#include +#include +#include +#include + + +std::ofstream logfile("iterators_3d/output"); + + +template +void test () +{ + deallog << dim << std::endl; + + Triangulation tria; + GridGenerator::hyper_cube (tria); + tria.refine_global (2); + + { + deallog << "Raw iterators" << std::endl; + deallog << tria.begin_raw() << std::endl; + if (dim > 1) + deallog << tria.begin_raw_face() << std::endl; + deallog << tria.last_raw() << std::endl; + if (dim > 1) + deallog << tria.last_raw_face() << std::endl; + if (dim > 1) + deallog << tria.end_raw_face() << std::endl; + } + { + deallog << "Iterators" << std::endl; + deallog << tria.begin() << std::endl; + if (dim > 1) + deallog << tria.begin_face() << std::endl; + deallog << tria.last() << std::endl; + if (dim > 1) + deallog << tria.last_face() << std::endl; + deallog << tria.end() << std::endl; + if (dim > 1) + deallog << tria.end_face() << std::endl; + } + { + deallog << "Active iterators" << std::endl; + deallog << tria.begin_active() << std::endl; + if (dim > 1) + deallog << tria.begin_active_face() << std::endl; + deallog << tria.last_active() << std::endl; + if (dim > 1) + deallog << tria.last_active_face() << std::endl; + if (dim > 1) + deallog << tria.end_active_face() << std::endl; + } + + for (unsigned int l=0; l (); + test<2> (); + test<3> (); +} + diff --git a/tests/deal.II/iterators_3d/cmp/generic b/tests/deal.II/iterators_3d/cmp/generic new file mode 100644 index 0000000000..2e11cd196f --- /dev/null +++ b/tests/deal.II/iterators_3d/cmp/generic @@ -0,0 +1,160 @@ + +DEAL::1 +DEAL::Raw iterators +DEAL::0.0 +DEAL::2.3 +DEAL::Iterators +DEAL::0.0 +DEAL::2.3 +DEAL::-1.-1 +DEAL::Active iterators +DEAL::2.0 +DEAL::2.3 +DEAL::Raw iterators +DEAL::0.0 +DEAL::0.0 +DEAL::1.0 +DEAL::Iterators +DEAL::0.0 +DEAL::0.0 +DEAL::1.0 +DEAL::Active iterators +DEAL::2.0 +DEAL::-1.-1 +DEAL::2.0 +DEAL::Raw iterators +DEAL::1.0 +DEAL::1.1 +DEAL::2.0 +DEAL::Iterators +DEAL::1.0 +DEAL::1.1 +DEAL::2.0 +DEAL::Active iterators +DEAL::2.0 +DEAL::-1.-1 +DEAL::2.0 +DEAL::Raw iterators +DEAL::2.0 +DEAL::2.3 +DEAL::-1.-1 +DEAL::Iterators +DEAL::2.0 +DEAL::2.3 +DEAL::-1.-1 +DEAL::Active iterators +DEAL::2.0 +DEAL::2.3 +DEAL::-1.-1 +DEAL::2 +DEAL::Raw iterators +DEAL::0.0 +DEAL::0 +DEAL::2.15 +DEAL::55 +DEAL::-1 +DEAL::Iterators +DEAL::0.0 +DEAL::0 +DEAL::2.15 +DEAL::55 +DEAL::-1.-1 +DEAL::-1 +DEAL::Active iterators +DEAL::2.0 +DEAL::16 +DEAL::2.15 +DEAL::55 +DEAL::-1 +DEAL::Raw iterators +DEAL::0.0 +DEAL::0.0 +DEAL::1.0 +DEAL::Iterators +DEAL::0.0 +DEAL::0.0 +DEAL::1.0 +DEAL::Active iterators +DEAL::2.0 +DEAL::-1.-1 +DEAL::2.0 +DEAL::Raw iterators +DEAL::1.0 +DEAL::1.3 +DEAL::2.0 +DEAL::Iterators +DEAL::1.0 +DEAL::1.3 +DEAL::2.0 +DEAL::Active iterators +DEAL::2.0 +DEAL::-1.-1 +DEAL::2.0 +DEAL::Raw iterators +DEAL::2.0 +DEAL::2.15 +DEAL::-1.-1 +DEAL::Iterators +DEAL::2.0 +DEAL::2.15 +DEAL::-1.-1 +DEAL::Active iterators +DEAL::2.0 +DEAL::2.15 +DEAL::-1.-1 +DEAL::3 +DEAL::Raw iterators +DEAL::0.0 +DEAL::0 +DEAL::2.63 +DEAL::281 +DEAL::-1 +DEAL::Iterators +DEAL::0.0 +DEAL::0 +DEAL::2.63 +DEAL::281 +DEAL::-1.-1 +DEAL::-1 +DEAL::Active iterators +DEAL::2.0 +DEAL::42 +DEAL::2.63 +DEAL::281 +DEAL::-1 +DEAL::Raw iterators +DEAL::0.0 +DEAL::0.0 +DEAL::1.0 +DEAL::Iterators +DEAL::0.0 +DEAL::0.0 +DEAL::1.0 +DEAL::Active iterators +DEAL::2.0 +DEAL::-1.-1 +DEAL::2.0 +DEAL::Raw iterators +DEAL::1.0 +DEAL::1.7 +DEAL::2.0 +DEAL::Iterators +DEAL::1.0 +DEAL::1.7 +DEAL::2.0 +DEAL::Active iterators +DEAL::2.0 +DEAL::-1.-1 +DEAL::2.0 +DEAL::Raw iterators +DEAL::2.0 +DEAL::2.63 +DEAL::-1.-1 +DEAL::Iterators +DEAL::2.0 +DEAL::2.63 +DEAL::-1.-1 +DEAL::Active iterators +DEAL::2.0 +DEAL::2.63 +DEAL::-1.-1