From 6392cb95239d1e050f5cad54869d4c3e34bfffa6 Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Mon, 24 Nov 2014 11:58:08 +0100 Subject: [PATCH] Fix testsuite, cleanup tests in arpack/ --- tests/CMakeLists.txt | 8 +++--- tests/arpack/CMakeLists.txt | 7 +++++ tests/arpack/step-36_ar.cc | 51 ++++--------------------------------- 3 files changed, 16 insertions(+), 50 deletions(-) create mode 100644 tests/arpack/CMakeLists.txt diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index a59fcf8108..67678d6fab 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -59,10 +59,10 @@ FOREACH(_var ENDFOREACH() SET(_categories - a-framework algorithms all-headers aniso base bits build_tests codim_one - deal.II distributed_grids fe gla grid hp integrators lac lapack manifold - matrix_free mesh_converter metis mpi multigrid mumps opencascade petsc serialization - slepc trilinos umfpack arpack + a-framework algorithms all-headers aniso arpack base bits build_tests + codim_one deal.II distributed_grids fe gla grid hp integrators lac lapack + manifold matrix_free mesh_converter metis mpi multigrid mumps opencascade + petsc serialization slepc trilinos umfpack ) # diff --git a/tests/arpack/CMakeLists.txt b/tests/arpack/CMakeLists.txt new file mode 100644 index 0000000000..fb428b8238 --- /dev/null +++ b/tests/arpack/CMakeLists.txt @@ -0,0 +1,7 @@ +CMAKE_MINIMUM_REQUIRED(VERSION 2.8.9) +INCLUDE(${DEAL_II_SOURCE_DIR}/tests/setup_testsubproject.cmake) +PROJECT(testsuite CXX) +INCLUDE(${DEAL_II_TARGET_CONFIG}) +IF(DEAL_II_WITH_ARPACK) + DEAL_II_PICKUP_TESTS() +ENDIF() diff --git a/tests/arpack/step-36_ar.cc b/tests/arpack/step-36_ar.cc index db792017de..416330c2f8 100644 --- a/tests/arpack/step-36_ar.cc +++ b/tests/arpack/step-36_ar.cc @@ -79,8 +79,6 @@ namespace Step36 std::vector > eigenfunctions; std::vector> eigenvalues; - //ParameterHandler parameters; - ConstraintMatrix constraints; }; @@ -92,19 +90,6 @@ namespace Step36 fe (1), dof_handler (triangulation) { -// parameters.declare_entry ("Global mesh refinement steps", "5", -// Patterns::Integer (0, 20), -// "The number of times the 1-cell coarse mesh should " -// "be refined globally for our computations."); -// parameters.declare_entry ("Number of eigenvalues/eigenfunctions", "5", -// Patterns::Integer (0, 100), -// "The number of eigenvalues/eigenfunctions " -// "to be computed."); -// parameters.declare_entry ("Potential", "0", -// Patterns::Anything(), -// "A functional description of the potential."); - -// parameters.read_input (prm_file); } @@ -113,7 +98,7 @@ namespace Step36 void EigenvalueProblem::make_grid_and_dofs () { GridGenerator::hyper_cube (triangulation, -1, 1); - triangulation.refine_global (5/*parameters.get_integer ("Global mesh refinement steps")*/); + triangulation.refine_global (5); dof_handler.distribute_dofs (fe); DoFTools::make_zero_boundary_constraints (dof_handler, constraints); @@ -129,7 +114,7 @@ namespace Step36 mass_matrix.reinit (sparsity_pattern); eigenfunctions - .resize (5/*parameters.get_integer ("Number of eigenvalues/eigenfunctions")*/); + .resize (5); for (unsigned int i=0; i potential; potential.initialize (FunctionParser::default_variable_names (), - "0"/*parameters.get ("Potential")*/, + "0", typename FunctionParser::ConstMap()); std::vector potential_values (n_q_points); @@ -220,11 +205,6 @@ namespace Step36 min_spurious_eigenvalue = std::min (min_spurious_eigenvalue, ev); max_spurious_eigenvalue = std::max (max_spurious_eigenvalue, ev); } - -// std::cout << " Spurious eigenvalues are all in the interval " -// << "[" << min_spurious_eigenvalue << "," << max_spurious_eigenvalue << "]" -// << std::endl; - } @@ -271,7 +251,7 @@ namespace Step36 { FunctionParser potential; potential.initialize (FunctionParser::default_variable_names (), - "0"/*parameters.get ("Potential")*/, + "0", typename FunctionParser::ConstMap()); VectorTools::interpolate (dof_handler, potential, projected_potential); } @@ -290,26 +270,9 @@ namespace Step36 { make_grid_and_dofs (); -// std::cout << " Number of active cells: " -// << triangulation.n_active_cells () -// << std::endl -// << " Number of degrees of freedom: " -// << dof_handler.n_dofs () -// << std::endl; - assemble_system (); const std::pair res = solve (); -// std::cout << " Solver converged in " << res.first -// << " iterations. Residual is " << res.second << std::endl; - -// output_results (); -// -// std::cout << std::endl; -// for (unsigned int i=0; i