]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Remove tests for ShiftedMatrix(|Generalized)
authorMatthias Maier <tamiko@43-1.org>
Thu, 6 Apr 2017 20:42:34 +0000 (15:42 -0500)
committerMatthias Maier <tamiko@43-1.org>
Fri, 7 Apr 2017 13:32:57 +0000 (08:32 -0500)
12 files changed:
tests/lac/shifted_matrix_01.cc [deleted file]
tests/lac/shifted_matrix_01.output [deleted file]
tests/lac/shifted_matrix_02.cc [deleted file]
tests/lac/shifted_matrix_02.output [deleted file]
tests/lac/shifted_matrix_03.cc [deleted file]
tests/lac/shifted_matrix_03.output [deleted file]
tests/lac/shifted_matrix_04.cc [deleted file]
tests/lac/shifted_matrix_04.output [deleted file]
tests/lac/shifted_matrix_05.cc [deleted file]
tests/lac/shifted_matrix_05.output [deleted file]
tests/lac/shifted_matrix_generalized_01.cc [deleted file]
tests/lac/shifted_matrix_generalized_01.output [deleted file]

diff --git a/tests/lac/shifted_matrix_01.cc b/tests/lac/shifted_matrix_01.cc
deleted file mode 100644 (file)
index 5b5d95e..0000000
+++ /dev/null
@@ -1,71 +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 ShiftedMatrix::checkConstructor
-
-#include "../tests.h"
-#include <deal.II/base/logstream.h>
-#include <deal.II/lac/shifted_matrix.h>
-#include <deal.II/lac/full_matrix.h>
-#include <deal.II/lac/vector.h>
-
-#include <fstream>
-#include <iomanip>
-#include <cmath>
-
-template<typename number>
-void
-checkConstructor(FullMatrix<number> &A, double sigma)
-{
-  deallog << "constructor" << std::endl;
-
-  ShiftedMatrix < FullMatrix<number> > S(A, sigma);
-
-  deallog << "Multiplying with all ones vector" << std::endl;
-  Vector<number> V(A.n());
-  for (unsigned int i = 0; i < V.size(); ++i)
-    V(i) = 1;
-
-  Vector<number> O(A.m());
-
-  S.vmult(O, V);
-
-  // Check the dimensions of the result matrix
-  Assert(A.m() == O.size(), ExcInternalError());
-  deallog << "Dimensions of result vector verified" << std::endl;
-
-  for (unsigned int i = 0; i < O.size(); ++i)
-    deallog << O(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);
-
-  const double Adata[] =
-  { 2, 3, 4, 5 };
-
-  FullMatrix<double> A(2, 2);
-
-  A.fill(Adata);
-
-  checkConstructor<double>(A, 2);
-}
diff --git a/tests/lac/shifted_matrix_01.output b/tests/lac/shifted_matrix_01.output
deleted file mode 100644 (file)
index b900772..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-
-DEAL::constructor
-DEAL::Multiplying with all ones vector
-DEAL::Dimensions of result vector verified
-DEAL::7.0000   11.0000 
diff --git a/tests/lac/shifted_matrix_02.cc b/tests/lac/shifted_matrix_02.cc
deleted file mode 100644 (file)
index c7e33e8..0000000
+++ /dev/null
@@ -1,69 +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 ShiftedMatrix::checkVmult
-
-#include "../tests.h"
-#include <deal.II/base/logstream.h>
-#include <deal.II/lac/shifted_matrix.h>
-#include <deal.II/lac/full_matrix.h>
-#include <deal.II/lac/vector.h>
-
-#include <fstream>
-#include <iomanip>
-#include <cmath>
-
-template<typename number>
-void
-checkVmult(FullMatrix<number> &A, double sigma, Vector<number> &V)
-{
-  deallog << "vmult" << std::endl;
-
-  ShiftedMatrix < FullMatrix<number> > S(A, sigma);
-  Vector<number> O(A.m());
-
-  S.vmult(O, V);
-
-  // Check the dimensions of the result matrix
-  Assert(A.m() == O.size(), ExcInternalError());
-  deallog << "Dimensions of result vector verified" << std::endl;
-
-  for (unsigned int i = 0; i < O.size(); ++i)
-    deallog << O(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);
-
-  const double Adata[] =
-  { 2, 3, 4, 5 };
-
-  FullMatrix<double> A(2, 2);
-
-  A.fill(Adata);
-
-  Vector<double> V(2);
-  V(0) = 1;
-  V(1) = 2;
-
-  checkVmult<double>(A, 2, V);
-}
diff --git a/tests/lac/shifted_matrix_02.output b/tests/lac/shifted_matrix_02.output
deleted file mode 100644 (file)
index 5c9d5fc..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-
-DEAL::vmult
-DEAL::Dimensions of result vector verified
-DEAL::10.0000  18.0000 
diff --git a/tests/lac/shifted_matrix_03.cc b/tests/lac/shifted_matrix_03.cc
deleted file mode 100644 (file)
index b139c47..0000000
+++ /dev/null
@@ -1,79 +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 ShiftedMatrix::checkResidual
-
-#include "../tests.h"
-#include <deal.II/base/logstream.h>
-#include <deal.II/lac/shifted_matrix.h>
-#include <deal.II/lac/full_matrix.h>
-#include <deal.II/lac/vector.h>
-
-#include <fstream>
-#include <iomanip>
-#include <cmath>
-
-template<typename number>
-void
-checkResidual(FullMatrix<number> &A, double sigma, Vector<number> &V,
-              Vector<number> &R)
-{
-  deallog << "residual" << std::endl;
-
-  ShiftedMatrix < FullMatrix<number> > S(A, sigma);
-  Vector<number> O(A.m());
-  double residual;
-
-  residual = S.residual(O, V, R);
-
-  // Check the dimensions of the result matrix
-  Assert(A.m() == O.size(), ExcInternalError());
-  deallog << "Dimensions of result vector verified" << std::endl;
-
-  deallog << "Residual vector" << std::endl;
-  for (unsigned int i = 0; i < O.size(); ++i)
-    deallog << O(i) << '\t';
-  deallog << std::endl;
-
-  deallog << "Residual value" << std::endl;
-  deallog << residual << std::endl;
-}
-
-int
-main()
-{
-  std::ofstream logfile("output");
-  deallog << std::fixed;
-  deallog << std::setprecision(4);
-  deallog.attach(logfile);
-  deallog.threshold_double(1.e-10);
-
-  const double Adata[] =
-  { 2, 3, 4, 5 };
-
-  FullMatrix<double> A(2, 2);
-
-  A.fill(Adata);
-
-  Vector<double> V(2);
-  V(0) = 1;
-  V(1) = 2;
-
-  Vector<double> R(2);
-  R(0) = 1;
-  R(1) = 1;
-
-  checkResidual<double>(A, 2, V, R);
-}
diff --git a/tests/lac/shifted_matrix_03.output b/tests/lac/shifted_matrix_03.output
deleted file mode 100644 (file)
index 64cf220..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-
-DEAL::residual
-DEAL::Dimensions of result vector verified
-DEAL::Residual vector
-DEAL::-9.0000  -17.0000        
-DEAL::Residual value
-DEAL::19.2354
diff --git a/tests/lac/shifted_matrix_04.cc b/tests/lac/shifted_matrix_04.cc
deleted file mode 100644 (file)
index 887cc79..0000000
+++ /dev/null
@@ -1,86 +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 ShiftedMatrix::checkSetSigma
-
-#include "../tests.h"
-#include <deal.II/base/logstream.h>
-#include <deal.II/lac/shifted_matrix.h>
-#include <deal.II/lac/full_matrix.h>
-#include <deal.II/lac/vector.h>
-
-#include <fstream>
-#include <iomanip>
-#include <cmath>
-
-template<typename number>
-void
-checkSetSigma(FullMatrix<number> &A, double sigma)
-{
-  deallog << "shift(sigma)" << std::endl;
-
-  deallog << "Init ShiftedMatrix with sigma=0" << std::endl;
-  ShiftedMatrix < FullMatrix<number> > S(A, 0);
-
-  deallog << "Multiplying with all ones vector" << std::endl;
-  Vector<number> V(A.n());
-  for (unsigned int i = 0; i < V.size(); ++i)
-    V(i) = 1;
-
-  Vector<number> O(A.m());
-
-  S.vmult(O, V);
-
-  // Check the dimensions of the result matrix
-  Assert(A.m() == O.size(), ExcInternalError());
-  deallog << "Dimensions of result vector verified" << std::endl;
-
-  for (unsigned int i = 0; i < O.size(); ++i)
-    deallog << O(i) << '\t';
-  deallog << std::endl;
-
-  deallog << "Setting new sigma value" << std::endl;
-  S.shift(sigma);
-
-  deallog << "Multiplying with all ones vector" << std::endl;
-  S.vmult(O, V);
-
-  // Check the dimensions of the result matrix
-  Assert(A.m() == O.size(), ExcInternalError());
-  deallog << "Dimensions of result vector verified" << std::endl;
-
-  for (unsigned int i = 0; i < O.size(); ++i)
-    deallog << O(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);
-
-  const double Adata[] =
-  { 2, 3, 4, 5 };
-
-  FullMatrix<double> A(2, 2);
-
-  A.fill(Adata);
-
-  checkSetSigma<double>(A, 2);
-}
diff --git a/tests/lac/shifted_matrix_04.output b/tests/lac/shifted_matrix_04.output
deleted file mode 100644 (file)
index 822d2dd..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-
-DEAL::shift(sigma)
-DEAL::Init ShiftedMatrix with sigma=0
-DEAL::Multiplying with all ones vector
-DEAL::Dimensions of result vector verified
-DEAL::5.0000   9.0000  
-DEAL::Setting new sigma value
-DEAL::Multiplying with all ones vector
-DEAL::Dimensions of result vector verified
-DEAL::7.0000   11.0000 
diff --git a/tests/lac/shifted_matrix_05.cc b/tests/lac/shifted_matrix_05.cc
deleted file mode 100644 (file)
index a7a616f..0000000
+++ /dev/null
@@ -1,95 +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 ShiftedMatrix::checkGetSigma
-
-#include "../tests.h"
-#include <deal.II/base/logstream.h>
-#include <deal.II/lac/shifted_matrix.h>
-#include <deal.II/lac/full_matrix.h>
-#include <deal.II/lac/vector.h>
-
-#include <fstream>
-#include <iomanip>
-#include <cmath>
-
-template<typename number>
-void
-checkGetSigma(FullMatrix<number> &A)
-{
-  deallog << "shift()" << std::endl;
-
-  deallog << "Init ShiftedMatrix with sigma=0" << std::endl;
-  ShiftedMatrix < FullMatrix<number> > S(A, 0);
-
-  deallog << "Multiplying with all ones vector" << std::endl;
-  Vector<number> V(A.n());
-  for (unsigned int i = 0; i < V.size(); ++i)
-    V(i) = 1;
-
-  Vector<number> O(A.m());
-
-  S.vmult(O, V);
-
-  // Check the dimensions of the result matrix
-  Assert(A.m() == O.size(), ExcInternalError());
-  deallog << "Dimensions of result vector verified" << std::endl;
-
-  for (unsigned int i = 0; i < O.size(); ++i)
-    deallog << O(i) << '\t';
-  deallog << std::endl;
-
-  deallog << "Setting new sigma value by incrementing old value by 1"
-          << std::endl;
-
-  deallog << "Old sigma value" << std::endl;
-  double sigma = S.shift();
-  deallog << sigma << std::endl;
-  sigma = sigma + 1;
-  deallog << "New sigma value" << std::endl;
-  deallog << sigma << std::endl;
-
-  S.shift(sigma);
-
-  deallog << "Multiplying with all ones vector" << std::endl;
-  S.vmult(O, V);
-
-  // Check the dimensions of the result matrix
-  Assert(A.m() == O.size(), ExcInternalError());
-  deallog << "Dimensions of result vector verified" << std::endl;
-
-  for (unsigned int i = 0; i < O.size(); ++i)
-    deallog << O(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);
-
-  const double Adata[] =
-  { 2, 3, 4, 5 };
-
-  FullMatrix<double> A(2, 2);
-
-  A.fill(Adata);
-
-  checkGetSigma<double>(A);
-}
diff --git a/tests/lac/shifted_matrix_05.output b/tests/lac/shifted_matrix_05.output
deleted file mode 100644 (file)
index 27f92db..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-
-DEAL::shift()
-DEAL::Init ShiftedMatrix with sigma=0
-DEAL::Multiplying with all ones vector
-DEAL::Dimensions of result vector verified
-DEAL::5.0000   9.0000  
-DEAL::Setting new sigma value by incrementing old value by 1
-DEAL::Old sigma value
-DEAL::0
-DEAL::New sigma value
-DEAL::1.0000
-DEAL::Multiplying with all ones vector
-DEAL::Dimensions of result vector verified
-DEAL::6.0000   10.0000 
diff --git a/tests/lac/shifted_matrix_generalized_01.cc b/tests/lac/shifted_matrix_generalized_01.cc
deleted file mode 100644 (file)
index 47aa057..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-#include <deal.II/base/logstream.h>
-
-#include <deal.II/lac/full_matrix.h>
-#include <deal.II/lac/shifted_matrix.h>
-#include <deal.II/lac/vector.h>
-
-#include <fstream>
-
-int main()
-{
-  using namespace dealii;
-
-  std::ofstream logfile("output");
-  deallog << std::fixed;
-  deallog << std::setprecision(4);
-  deallog.attach(logfile);
-  deallog.threshold_double(1.e-10);
-
-  FullMatrix<double> m1(2, 2);
-  FullMatrix<double> m2(2, 2);
-
-  m1(0, 0) = 2.0;
-  m1(0, 1) = 1.0;
-  m1(1, 0) = 1.0;
-  m1(1, 1) = 2.0;
-
-  m2(0, 0) = 1.0;
-  m2(0, 1) = 1.0;
-  m2(1, 0) = 1.0;
-  m2(1, 1) = 1.0;
-
-  ShiftedMatrixGeneralized<FullMatrix<double>, FullMatrix<double>, Vector<double> >
-  shifted_matrix(m1, m2, 2.0);
-
-  Vector<double> src(2);
-  src[0] = 3.0;
-  src[1] = 7.0;
-  Vector<double> dst(2);
-  shifted_matrix.vmult(dst, src);
-
-  deallog << dst[0] << ", ";
-  deallog << dst[1] << std::endl;
-}
diff --git a/tests/lac/shifted_matrix_generalized_01.output b/tests/lac/shifted_matrix_generalized_01.output
deleted file mode 100644 (file)
index e40ef76..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-
-DEAL::33.0000, 37.0000

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.