From: Matthias Maier Date: Thu, 6 Apr 2017 21:36:09 +0000 (-0500) Subject: Tests: Remove tests for SchurMatrix class X-Git-Tag: v9.0.0-rc1~1722^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F4219%2Fhead;p=dealii.git Tests: Remove tests for SchurMatrix class --- diff --git a/tests/lac/schur_matrix_01.cc b/tests/lac/schur_matrix_01.cc deleted file mode 100644 index 68e3dd1903..0000000000 --- a/tests/lac/schur_matrix_01.cc +++ /dev/null @@ -1,131 +0,0 @@ -// --------------------------------------------------------------------- -// -// Copyright (C) 2014 - 2015 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 SchurMatrix::vmult - -#include "../tests.h" -#include -#include -#include -#include -#include -#include -#include - -template -void -checkVmult(BlockVector &dst, const BlockVector &src, - const MA_inverse &Ainv, const MB &B, const MDt &Dt, const MC &C) -{ - deallog << "vmult" << std::endl; - - GrowingVectorMemory < BlockVector > mem; - - SchurMatrix S(Ainv, B, Dt, C, mem); - - S.debug_level(1); - - S.vmult(dst, src); - - for (unsigned int i = 0; i < dst.size(); ++i) - deallog << dst(i) << '\t'; - deallog << std::endl; -} - -int -main() -{ - std::ofstream logfile("output"); - deallog << std::fixed; - deallog << std::setprecision(4); - deallog.attach(logfile); - deallog.threshold_double(1.e-10); - - std::vector < types::global_dof_index > ivector(1); - ivector[0] = 1; - - double array[] = - { 2 }; - std::list l(&array[0], &array[1]); - - BlockVector src(ivector, l.begin(), l.end()); - BlockVector dst(ivector); - - const double Adata1[] = - { 1 }; - - const double Adata2[] = - { 2 }; - - const double Adata3[] = - { 4 }; - - const double Adata4[] = - { 5 }; - - const double Ddata1[] = - { 3 }; - - const double Ddata2[] = - { 6 }; - - const double Bdata1[] = - { 7 }; - - const double Bdata2[] = - { 8 }; - - const double Cdata[] = - { 9 }; - - FullMatrix MA1(1, 1); - FullMatrix MA2(1, 1); - FullMatrix MA3(1, 1); - FullMatrix MA4(1, 1); - FullMatrix MB1(1, 1); - FullMatrix MB2(1, 1); - FullMatrix MC(1, 1); - FullMatrix MD1(1, 1); - FullMatrix MD2(1, 1); - - MA1.fill(Adata1); - MA2.fill(Adata2); - MA3.fill(Adata3); - MA4.fill(Adata4); - MB1.fill(Bdata1); - MB2.fill(Bdata2); - MC.fill(Cdata); - MD1.fill(Ddata1); - MD2.fill(Ddata2); - - BlockMatrixArray Ainv(2, 2); - BlockMatrixArray B(1, 2); - BlockMatrixArray C(1, 1); - BlockMatrixArray Dt(1, 2); - - Ainv.enter(MA1, 0, 0); - Ainv.enter(MA2, 0, 1); - Ainv.enter(MA3, 1, 0); - Ainv.enter(MA4, 1, 1); - B.enter(MB1, 0, 0); - B.enter(MB2, 0, 1); - C.enter(MC, 0, 0); - Dt.enter(MD1, 0, 0); - Dt.enter(MD2, 0, 1); - - checkVmult, BlockMatrixArray, - BlockMatrixArray, BlockMatrixArray >(dst, src, Ainv, B, - Dt, C); -} diff --git a/tests/lac/schur_matrix_01.output b/tests/lac/schur_matrix_01.output deleted file mode 100644 index 29a64a7145..0000000000 --- a/tests/lac/schur_matrix_01.output +++ /dev/null @@ -1,8 +0,0 @@ - -DEAL::vmult -DEAL:Schur::src:2.0000 -DEAL:Schur::C:18.0000 -DEAL:Schur::Dt:13.4164 -DEAL:Schur::Ainverse:89.1964 -DEAL:Schur::dst:900.0000 -DEAL::900.0000 diff --git a/tests/lac/schur_matrix_02.cc b/tests/lac/schur_matrix_02.cc deleted file mode 100644 index eb64b524f0..0000000000 --- a/tests/lac/schur_matrix_02.cc +++ /dev/null @@ -1,134 +0,0 @@ -// --------------------------------------------------------------------- -// -// Copyright (C) 2014 - 2015 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 SchurMatrix::residual - -#include "../tests.h" -#include -#include -#include -#include -#include -#include -#include - -template -void -checkResidual(BlockVector &dst, const BlockVector &src, - const BlockVector &rhs, const MA_inverse &Ainv, const MB &B, - const MDt &Dt, const MC &C) -{ - deallog << "residual" << std::endl; - - GrowingVectorMemory < BlockVector > mem; - - SchurMatrix S(Ainv, B, Dt, C, mem); - - double r = S.residual(dst, src, rhs); - - deallog << "Residual:" << r << std::endl; -} - -int -main() -{ - std::ofstream logfile("output"); - deallog << std::fixed; - deallog << std::setprecision(4); - deallog.attach(logfile); - deallog.threshold_double(1.e-10); - - std::vector < types::global_dof_index > ivector(1); - ivector[0] = 1; - - double src_array[] = - { 2 }; - std::list src_l(&src_array[0], &src_array[1]); - BlockVector src(ivector, src_l.begin(), src_l.end()); - - double rhs_array[] = - { 1000 }; - std::list rhs_l(&rhs_array[0], &rhs_array[1]); - BlockVector rhs(ivector, rhs_l.begin(), rhs_l.end()); - - BlockVector dst(ivector); - - const double Adata1[] = - { 1 }; - - const double Adata2[] = - { 2 }; - - const double Adata3[] = - { 4 }; - - const double Adata4[] = - { 5 }; - - const double Ddata1[] = - { 3 }; - - const double Ddata2[] = - { 6 }; - - const double Bdata1[] = - { 7 }; - - const double Bdata2[] = - { 8 }; - - const double Cdata[] = - { 9 }; - - FullMatrix MA1(1, 1); - FullMatrix MA2(1, 1); - FullMatrix MA3(1, 1); - FullMatrix MA4(1, 1); - FullMatrix MB1(1, 1); - FullMatrix MB2(1, 1); - FullMatrix MC(1, 1); - FullMatrix MD1(1, 1); - FullMatrix MD2(1, 1); - - MA1.fill(Adata1); - MA2.fill(Adata2); - MA3.fill(Adata3); - MA4.fill(Adata4); - MB1.fill(Bdata1); - MB2.fill(Bdata2); - MC.fill(Cdata); - MD1.fill(Ddata1); - MD2.fill(Ddata2); - - BlockMatrixArray Ainv(2, 2); - BlockMatrixArray B(1, 2); - BlockMatrixArray C(1, 1); - BlockMatrixArray Dt(1, 2); - - Ainv.enter(MA1, 0, 0); - Ainv.enter(MA2, 0, 1); - Ainv.enter(MA3, 1, 0); - Ainv.enter(MA4, 1, 1); - B.enter(MB1, 0, 0); - B.enter(MB2, 0, 1); - C.enter(MC, 0, 0); - Dt.enter(MD1, 0, 0); - Dt.enter(MD2, 0, 1); - - checkResidual, BlockMatrixArray, - BlockMatrixArray, BlockMatrixArray >(dst, src, rhs, Ainv, - B, Dt, C); - -} diff --git a/tests/lac/schur_matrix_02.output b/tests/lac/schur_matrix_02.output deleted file mode 100644 index de98ff8706..0000000000 --- a/tests/lac/schur_matrix_02.output +++ /dev/null @@ -1,3 +0,0 @@ - -DEAL::residual -DEAL::Residual:100.0000 diff --git a/tests/lac/schur_matrix_03.cc b/tests/lac/schur_matrix_03.cc deleted file mode 100644 index 12a458664d..0000000000 --- a/tests/lac/schur_matrix_03.cc +++ /dev/null @@ -1,136 +0,0 @@ -// --------------------------------------------------------------------- -// -// Copyright (C) 2014 - 2015 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 SchurMatrix::prepare_rhs - -#include "../tests.h" -#include -#include -#include -#include -#include -#include -#include - -template -void -checkPrepare_rhs(BlockVector &dst, const BlockVector &src, - const MA_inverse &Ainv, const MB &B, const MDt &Dt, const MC &C) -{ - deallog << "prepare_rhs" << std::endl; - - GrowingVectorMemory < BlockVector > mem; - - SchurMatrix S(Ainv, B, Dt, C, mem); - - S.debug_level(1); - - S.prepare_rhs(dst, src); - -} - -int -main() -{ - std::ofstream logfile("output"); - deallog << std::fixed; - deallog << std::setprecision(4); - deallog.attach(logfile); - deallog.threshold_double(1.e-10); - - std::vector < types::global_dof_index > ivector(2); - ivector[0] = 1; - ivector[1] = 1; - - double src_array[] = - { 9, 21 }; - std::list src_l(&src_array[0], &src_array[2]); - BlockVector src(ivector, src_l.begin(), src_l.end()); - - std::vector < types::global_dof_index > ivector2(1); - ivector2[0] = 1; - - double dst_array[] = - { 2 }; - std::list dst_l(&dst_array[0], &dst_array[1]); - BlockVector dst(ivector2, dst_l.begin(), dst_l.end()); - - const double Adata1[] = - { 1 }; - - const double Adata2[] = - { 2 }; - - const double Adata3[] = - { 4 }; - - const double Adata4[] = - { 5 }; - - const double Ddata1[] = - { 3 }; - - const double Ddata2[] = - { 6 }; - - const double Bdata1[] = - { 7 }; - - const double Bdata2[] = - { 8 }; - - const double Cdata[] = - { 9 }; - - FullMatrix MA1(1, 1); - FullMatrix MA2(1, 1); - FullMatrix MA3(1, 1); - FullMatrix MA4(1, 1); - FullMatrix MB1(1, 1); - FullMatrix MB2(1, 1); - FullMatrix MC(1, 1); - FullMatrix MD1(1, 1); - FullMatrix MD2(1, 1); - - MA1.fill(Adata1); - MA2.fill(Adata2); - MA3.fill(Adata3); - MA4.fill(Adata4); - MB1.fill(Bdata1); - MB2.fill(Bdata2); - MC.fill(Cdata); - MD1.fill(Ddata1); - MD2.fill(Ddata2); - - BlockMatrixArray Ainv(2, 2); - BlockMatrixArray B(1, 2); - BlockMatrixArray C(1, 1); - BlockMatrixArray Dt(1, 2); - - Ainv.enter(MA1, 0, 0); - Ainv.enter(MA2, 0, 1); - Ainv.enter(MA3, 1, 0); - Ainv.enter(MA4, 1, 1); - B.enter(MB1, 0, 0); - B.enter(MB2, 0, 1); - C.enter(MC, 0, 0); - Dt.enter(MD1, 0, 0); - Dt.enter(MD2, 0, 1); - - checkPrepare_rhs, BlockMatrixArray, - BlockMatrixArray, BlockMatrixArray >(dst, src, Ainv, B, - Dt, C); - -} diff --git a/tests/lac/schur_matrix_03.output b/tests/lac/schur_matrix_03.output deleted file mode 100644 index 900ff7aedf..0000000000 --- a/tests/lac/schur_matrix_03.output +++ /dev/null @@ -1,5 +0,0 @@ - -DEAL::prepare_rhs -DEAL:Schur-prepare::src:22.8473 -DEAL:Schur-prepare::Ainverse:149.9400 -DEAL:Schur-prepare::dst:1487.0000 diff --git a/tests/lac/schur_matrix_04.cc b/tests/lac/schur_matrix_04.cc deleted file mode 100644 index 1a8f9114a2..0000000000 --- a/tests/lac/schur_matrix_04.cc +++ /dev/null @@ -1,138 +0,0 @@ -// --------------------------------------------------------------------- -// -// Copyright (C) 2014 - 2015 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 SchurMatrix::postprocess - -#include "../tests.h" -#include -#include -#include -#include -#include -#include -#include - -template -void -checkPostprocess(BlockVector &dst, const BlockVector &src, - const BlockVector &rhs, const MA_inverse &Ainv, const MB &B, - const MDt &Dt, const MC &C) -{ - deallog << "postprocess" << std::endl; - - GrowingVectorMemory < BlockVector > mem; - - SchurMatrix S(Ainv, B, Dt, C, mem); - - S.debug_level(1); - - S.postprocess(dst, src, rhs); -} - -int -main() -{ - std::ofstream logfile("output"); - deallog << std::fixed; - deallog << std::setprecision(4); - deallog.attach(logfile); - deallog.threshold_double(1.e-10); - - std::vector < types::global_dof_index > ivector(2); - ivector[0] = 1; - ivector[1] = 1; - - double rhs_array[] = - { 9, 21 }; - std::list rhs_l(&rhs_array[0], &rhs_array[2]); - BlockVector rhs(ivector, rhs_l.begin(), rhs_l.end()); - - std::vector < types::global_dof_index > ivector2(1); - ivector2[0] = 1; - - double src_array[] = - { 2 }; - std::list src_l(&src_array[0], &src_array[1]); - BlockVector src(ivector2, src_l.begin(), src_l.end()); - - BlockVector dst(ivector); - - const double Adata1[] = - { 1 }; - - const double Adata2[] = - { 2 }; - - const double Adata3[] = - { 4 }; - - const double Adata4[] = - { 5 }; - - const double Ddata1[] = - { 3 }; - - const double Ddata2[] = - { 6 }; - - const double Bdata1[] = - { 7 }; - - const double Bdata2[] = - { 8 }; - - const double Cdata[] = - { 9 }; - - FullMatrix MA1(1, 1); - FullMatrix MA2(1, 1); - FullMatrix MA3(1, 1); - FullMatrix MA4(1, 1); - FullMatrix MB1(1, 1); - FullMatrix MB2(1, 1); - FullMatrix MC(1, 1); - FullMatrix MD1(1, 1); - FullMatrix MD2(1, 1); - - MA1.fill(Adata1); - MA2.fill(Adata2); - MA3.fill(Adata3); - MA4.fill(Adata4); - MB1.fill(Bdata1); - MB2.fill(Bdata2); - MC.fill(Cdata); - MD1.fill(Ddata1); - MD2.fill(Ddata2); - - BlockMatrixArray Ainv(2, 2); - BlockMatrixArray B(1, 2); - BlockMatrixArray C(1, 1); - BlockMatrixArray Dt(1, 2); - - Ainv.enter(MA1, 0, 0); - Ainv.enter(MA2, 0, 1); - Ainv.enter(MA3, 1, 0); - Ainv.enter(MA4, 1, 1); - B.enter(MB1, 0, 0); - B.enter(MB2, 0, 1); - C.enter(MC, 0, 0); - Dt.enter(MD1, 0, 0); - Dt.enter(MD2, 0, 1); - - checkPostprocess, BlockMatrixArray, - BlockMatrixArray, BlockMatrixArray >(dst, src, rhs, Ainv, - B, Dt, C); - -} diff --git a/tests/lac/schur_matrix_04.output b/tests/lac/schur_matrix_04.output deleted file mode 100644 index b662bd8594..0000000000 --- a/tests/lac/schur_matrix_04.output +++ /dev/null @@ -1,5 +0,0 @@ - -DEAL::postprocess -DEAL:Schur-post::src:2.0000 -DEAL:Schur-post::Dt:13.4164 -DEAL:Schur-post::dst:60.7454