]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Merged from trunk to branch manifold id
authorheltai <heltai@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 20 Nov 2013 20:02:35 +0000 (20:02 +0000)
committerheltai <heltai@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 20 Nov 2013 20:02:35 +0000 (20:02 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_manifold_id@31737 0785d39b-7218-0410-832d-ea1e28bc413d

29 files changed:
tests/CMakeLists.txt
tests/a-framework/CMakeLists.txt
tests/aniso/CMakeLists.txt
tests/base/CMakeLists.txt
tests/bits/CMakeLists.txt
tests/codim_one/CMakeLists.txt
tests/deal.II/CMakeLists.txt
tests/distributed_grids/CMakeLists.txt
tests/fe/CMakeLists.txt
tests/gla/CMakeLists.txt
tests/grid/CMakeLists.txt
tests/hp/CMakeLists.txt
tests/integrators/CMakeLists.txt
tests/lac/CMakeLists.txt
tests/lac/ala_01.with_trilinos=true.with_petsc=true.output [moved from tests/lac/ala_01.output with 100% similarity]
tests/lac/iteration_number_control.cc [new file with mode: 0644]
tests/lac/iteration_number_control.output [new file with mode: 0644]
tests/lapack/CMakeLists.txt
tests/manifold/CMakeLists.txt
tests/matrix_free/CMakeLists.txt
tests/metis/CMakeLists.txt
tests/mpi/CMakeLists.txt
tests/multigrid/CMakeLists.txt
tests/petsc/CMakeLists.txt
tests/run_testsuite.cmake
tests/serialization/CMakeLists.txt
tests/slepc/CMakeLists.txt
tests/trilinos/CMakeLists.txt
tests/umfpack/CMakeLists.txt

index 15b4d9ad0cd5fbef70b909f3245868d5cbb4cb0c..b1ad22bf6397a4180872fe7557e9e2e428fd2504 100644 (file)
@@ -1,3 +1,6 @@
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
+PROJECT(TESTSUITE NONE)
+
 MESSAGE(FATAL_ERROR "\n
 The testsuite cannot be set up as an independent project.
 Please configure \"deal.II\" directly instead.\n\n"
index 2077b01d03db3671d7a6a941e987eb13b6a9cce0..c2ca3dd75d5b54919e0407d87e607aad21c1e6ae 100644 (file)
@@ -1,5 +1,5 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
-INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsuite.cmake)
+INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsubproject.cmake)
 PROJECT(testsuite CXX)
 INCLUDE(${DEAL_II_TARGET_CONFIG})
 DEAL_II_PICKUP_TESTS()
index e39c51b85d2fa39981f342cb7b34ad9e3e6e2830..ffa6bb54a1ca95a36874f9718cd24d23bce17da2 100644 (file)
@@ -1,5 +1,5 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
-INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsuite.cmake)
+INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsubproject.cmake)
 PROJECT(testsuite CXX)
 INCLUDE(${DEAL_II_TARGET_CONFIG})
 DEAL_II_PICKUP_TESTS()
index e39c51b85d2fa39981f342cb7b34ad9e3e6e2830..ffa6bb54a1ca95a36874f9718cd24d23bce17da2 100644 (file)
@@ -1,5 +1,5 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
-INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsuite.cmake)
+INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsubproject.cmake)
 PROJECT(testsuite CXX)
 INCLUDE(${DEAL_II_TARGET_CONFIG})
 DEAL_II_PICKUP_TESTS()
index e39c51b85d2fa39981f342cb7b34ad9e3e6e2830..ffa6bb54a1ca95a36874f9718cd24d23bce17da2 100644 (file)
@@ -1,5 +1,5 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
-INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsuite.cmake)
+INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsubproject.cmake)
 PROJECT(testsuite CXX)
 INCLUDE(${DEAL_II_TARGET_CONFIG})
 DEAL_II_PICKUP_TESTS()
index e39c51b85d2fa39981f342cb7b34ad9e3e6e2830..ffa6bb54a1ca95a36874f9718cd24d23bce17da2 100644 (file)
@@ -1,5 +1,5 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
-INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsuite.cmake)
+INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsubproject.cmake)
 PROJECT(testsuite CXX)
 INCLUDE(${DEAL_II_TARGET_CONFIG})
 DEAL_II_PICKUP_TESTS()
index e39c51b85d2fa39981f342cb7b34ad9e3e6e2830..ffa6bb54a1ca95a36874f9718cd24d23bce17da2 100644 (file)
@@ -1,5 +1,5 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
-INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsuite.cmake)
+INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsubproject.cmake)
 PROJECT(testsuite CXX)
 INCLUDE(${DEAL_II_TARGET_CONFIG})
 DEAL_II_PICKUP_TESTS()
index e1ba866f7edc5981b6034aa816b338aa1a768813..baeb270640f0c5eee55001a4e5f93073db2f4977 100644 (file)
@@ -1,5 +1,5 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
-INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsuite.cmake)
+INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsubproject.cmake)
 PROJECT(testsuite CXX)
 INCLUDE(${DEAL_II_TARGET_CONFIG})
 IF(DEAL_II_WITH_P4EST)
index e39c51b85d2fa39981f342cb7b34ad9e3e6e2830..ffa6bb54a1ca95a36874f9718cd24d23bce17da2 100644 (file)
@@ -1,5 +1,5 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
-INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsuite.cmake)
+INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsubproject.cmake)
 PROJECT(testsuite CXX)
 INCLUDE(${DEAL_II_TARGET_CONFIG})
 DEAL_II_PICKUP_TESTS()
index ef84a0b38692feb3d496ef5e4626a2f25f8519e7..e8f4a01f4adc8dd3c8853e19a0fc2ccde127ed09 100644 (file)
@@ -1,5 +1,5 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
-INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsuite.cmake)
+INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsubproject.cmake)
 PROJECT(testsuite CXX)
 INCLUDE(${DEAL_II_TARGET_CONFIG})
 IF(DEAL_II_WITH_MPI AND DEAL_II_WITH_P4EST)
index e39c51b85d2fa39981f342cb7b34ad9e3e6e2830..ffa6bb54a1ca95a36874f9718cd24d23bce17da2 100644 (file)
@@ -1,5 +1,5 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
-INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsuite.cmake)
+INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsubproject.cmake)
 PROJECT(testsuite CXX)
 INCLUDE(${DEAL_II_TARGET_CONFIG})
 DEAL_II_PICKUP_TESTS()
index e39c51b85d2fa39981f342cb7b34ad9e3e6e2830..ffa6bb54a1ca95a36874f9718cd24d23bce17da2 100644 (file)
@@ -1,5 +1,5 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
-INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsuite.cmake)
+INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsubproject.cmake)
 PROJECT(testsuite CXX)
 INCLUDE(${DEAL_II_TARGET_CONFIG})
 DEAL_II_PICKUP_TESTS()
index e39c51b85d2fa39981f342cb7b34ad9e3e6e2830..ffa6bb54a1ca95a36874f9718cd24d23bce17da2 100644 (file)
@@ -1,5 +1,5 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
-INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsuite.cmake)
+INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsubproject.cmake)
 PROJECT(testsuite CXX)
 INCLUDE(${DEAL_II_TARGET_CONFIG})
 DEAL_II_PICKUP_TESTS()
index e39c51b85d2fa39981f342cb7b34ad9e3e6e2830..ffa6bb54a1ca95a36874f9718cd24d23bce17da2 100644 (file)
@@ -1,5 +1,5 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
-INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsuite.cmake)
+INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsubproject.cmake)
 PROJECT(testsuite CXX)
 INCLUDE(${DEAL_II_TARGET_CONFIG})
 DEAL_II_PICKUP_TESTS()
diff --git a/tests/lac/iteration_number_control.cc b/tests/lac/iteration_number_control.cc
new file mode 100644 (file)
index 0000000..26ff41d
--- /dev/null
@@ -0,0 +1,85 @@
+// ---------------------------------------------------------------------
+// $Id$
+//
+// Copyright (C) 1998 - 2013 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 that IterationNumber control works as expected, i.e., it terminates
+// with success when reaching the maximum number of iterations
+
+
+#include "../tests.h"
+#include <cmath>
+#include <fstream>
+#include <iomanip>
+#include <deal.II/base/logstream.h>
+#include <deal.II/lac/full_matrix.h>
+#include <deal.II/lac/vector.h>
+#include <deal.II/lac/solver_control.h>
+#include <deal.II/lac/solver_cg.h>
+#include <deal.II/lac/precondition.h>
+
+
+void check()
+{
+  // Check 1: should still terminate after one iteration when using a matrix
+  // with only one eigenvalue
+  const unsigned int size = 20;
+  FullMatrix<double> A(size, size);
+  for (unsigned int i=0; i<size; ++i)
+    A(i,i) = 2;
+
+  Vector<double> in(size), out(size);
+  in = 1.;
+  
+  {
+    IterationNumberControl control(5);
+    SolverCG<> solver(control);
+    solver.solve(A, out, in, PreconditionIdentity());
+    Assert (control.last_step() == 1, ExcInternalError());
+  }
+  for (unsigned int i=0; i<size; ++i)
+    Assert(std::abs(out(i)-0.5) < 1e-12, ExcInternalError());
+
+  // Check 2: should only do 5 iterations but the solution should not be exact
+  for (unsigned int i=0; i<size; ++i)
+    A(i,i) = 1+i;
+
+  out = 0;
+  {
+    IterationNumberControl control(5);
+    SolverCG<> solver(control);
+    solver.solve(A, out, in, PreconditionIdentity());
+    Assert (control.last_step() == 5, ExcInternalError());
+  }
+  bool solved_exactly = true;
+  for (unsigned int i=0; i<size; ++i)
+    if (std::abs(out(i)-1./(1+size)) > 1e-8)
+      solved_exactly = false;
+  Assert(solved_exactly == false, ExcInternalError());
+
+  deallog << "OK" << std::endl;
+}
+
+int main()
+{
+  std::ofstream logfile("output");
+//  logfile.setf(std::ios::fixed);
+  deallog << std::setprecision(4);
+  deallog.attach(logfile);
+  deallog.depth_console(0);
+  deallog.threshold_double(1.e-10);
+
+  check();
+}
+
diff --git a/tests/lac/iteration_number_control.output b/tests/lac/iteration_number_control.output
new file mode 100644 (file)
index 0000000..e2c05a8
--- /dev/null
@@ -0,0 +1,6 @@
+
+DEAL:cg::Starting value 4.472
+DEAL:cg::Convergence step 1 value 0
+DEAL:cg::Starting value 4.472
+DEAL:cg::Convergence step 5 value 0.6308
+DEAL::OK
index 13d07cf2c3f22a1488fbd9474080a0b518a6e75e..8887f4f83007f7544c536638b00e0d3df3ec346f 100644 (file)
@@ -1,5 +1,5 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
-INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsuite.cmake)
+INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsubproject.cmake)
 PROJECT(testsuite CXX)
 INCLUDE(${DEAL_II_TARGET_CONFIG})
 IF(DEAL_II_WITH_LAPACK)
index e39c51b85d2fa39981f342cb7b34ad9e3e6e2830..ffa6bb54a1ca95a36874f9718cd24d23bce17da2 100644 (file)
@@ -1,5 +1,5 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
-INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsuite.cmake)
+INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsubproject.cmake)
 PROJECT(testsuite CXX)
 INCLUDE(${DEAL_II_TARGET_CONFIG})
 DEAL_II_PICKUP_TESTS()
index e39c51b85d2fa39981f342cb7b34ad9e3e6e2830..ffa6bb54a1ca95a36874f9718cd24d23bce17da2 100644 (file)
@@ -1,5 +1,5 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
-INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsuite.cmake)
+INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsubproject.cmake)
 PROJECT(testsuite CXX)
 INCLUDE(${DEAL_II_TARGET_CONFIG})
 DEAL_II_PICKUP_TESTS()
index 3219ef35aa26b63255fc1ad0c9b320ea43e1c312..e45e9f2adbe37c754b8b25f578443b0aaacabb51 100644 (file)
@@ -1,5 +1,5 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
-INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsuite.cmake)
+INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsubproject.cmake)
 PROJECT(testsuite CXX)
 INCLUDE(${DEAL_II_TARGET_CONFIG})
 IF(DEAL_II_WITH_METIS)
index ef84a0b38692feb3d496ef5e4626a2f25f8519e7..e8f4a01f4adc8dd3c8853e19a0fc2ccde127ed09 100644 (file)
@@ -1,5 +1,5 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
-INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsuite.cmake)
+INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsubproject.cmake)
 PROJECT(testsuite CXX)
 INCLUDE(${DEAL_II_TARGET_CONFIG})
 IF(DEAL_II_WITH_MPI AND DEAL_II_WITH_P4EST)
index e39c51b85d2fa39981f342cb7b34ad9e3e6e2830..ffa6bb54a1ca95a36874f9718cd24d23bce17da2 100644 (file)
@@ -1,5 +1,5 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
-INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsuite.cmake)
+INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsubproject.cmake)
 PROJECT(testsuite CXX)
 INCLUDE(${DEAL_II_TARGET_CONFIG})
 DEAL_II_PICKUP_TESTS()
index 5afa661fa1aebe266dbb35074ae235e6bb7bb4aa..840a460b100dd8e5a4b237c8430ce59061c86084 100644 (file)
@@ -1,5 +1,5 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
-INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsuite.cmake)
+INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsubproject.cmake)
 PROJECT(testsuite CXX)
 INCLUDE(${DEAL_II_TARGET_CONFIG})
 IF(DEAL_II_WITH_PETSC)
index 00e7a1e294800666d1094fa034f146684925b9a3..5efc0979e31c41772efd6fed56ca2ccbec280e6c 100644 (file)
@@ -21,9 +21,9 @@
 IF( "${CTEST_BINARY_DIRECTORY}" STREQUAL ""
     AND "${CMAKE_CURRENT_BINARY_DIR}" STREQUAL "${CMAKE_CURRENT_LIST_DIR}" )
   MESSAGE(FATAL_ERROR "
-ctest was invoked in the source directory (or test source directory) and
-CTEST_BINARY_DIRECTORY is not set. Please either call ctest from within a
-designated build directory, or set CTEST_BINARY_DIRECTORY accordingly.
+ctest was invoked in the test directory and CTEST_BINARY_DIRECTORY is not
+set. Please either call ctest from within a designated build directory, or
+set CTEST_BINARY_DIRECTORY accordingly.
 "
     )
 ENDIF()
index e39c51b85d2fa39981f342cb7b34ad9e3e6e2830..ffa6bb54a1ca95a36874f9718cd24d23bce17da2 100644 (file)
@@ -1,5 +1,5 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
-INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsuite.cmake)
+INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsubproject.cmake)
 PROJECT(testsuite CXX)
 INCLUDE(${DEAL_II_TARGET_CONFIG})
 DEAL_II_PICKUP_TESTS()
index 27b6959af2275eae22773794a456d988c91723d7..93e938146c753c0d4295d5d62cce32750bddb816 100644 (file)
@@ -1,5 +1,5 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
-INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsuite.cmake)
+INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsubproject.cmake)
 PROJECT(testsuite CXX)
 INCLUDE(${DEAL_II_TARGET_CONFIG})
 IF((DEAL_II_WITH_PETSC) AND (DEAL_II_WITH_SLEPC))
index 862d6a1f5ed228c7e94ee15ec8be77ec56376149..9bd93d7f1384282502872aa69d31e21ad01bab97 100644 (file)
@@ -1,5 +1,5 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
-INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsuite.cmake)
+INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsubproject.cmake)
 PROJECT(testsuite CXX)
 INCLUDE(${DEAL_II_TARGET_CONFIG})
 IF(DEAL_II_WITH_TRILINOS)
index 70aca765fff7bb7027030deebbd636e7723d659a..994c98b39baa0fce55e033878996a226c5ea63e1 100644 (file)
@@ -1,5 +1,5 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
-INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsuite.cmake)
+INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsubproject.cmake)
 PROJECT(testsuite CXX)
 INCLUDE(${DEAL_II_TARGET_CONFIG})
 IF(DEAL_II_WITH_UMFPACK)

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.