From b7b6835f0095c5e0550674e7df5fcc2804c40134 Mon Sep 17 00:00:00 2001 From: kronbichler Date: Thu, 9 Sep 2010 09:09:29 +0000 Subject: [PATCH] Fix two tests. git-svn-id: https://svn.dealii.org/trunk@21903 0785d39b-7218-0410-832d-ea1e28bc413d --- tests/trilinos/deal_solver_02.cc | 2 +- tests/trilinos/deal_solver_02/cmp/generic | 4 ++-- tests/trilinos/deal_solver_06.cc | 20 +++++++++---------- tests/trilinos/deal_solver_06/cmp/generic | 7 +++---- .../cmp/i386-apple-darwin8.10.1+gcc4.0 | 9 --------- 5 files changed, 16 insertions(+), 26 deletions(-) delete mode 100644 tests/trilinos/deal_solver_06/cmp/i386-apple-darwin8.10.1+gcc4.0 diff --git a/tests/trilinos/deal_solver_02.cc b/tests/trilinos/deal_solver_02.cc index a1b972a671..baab20c1f3 100644 --- a/tests/trilinos/deal_solver_02.cc +++ b/tests/trilinos/deal_solver_02.cc @@ -63,8 +63,8 @@ check_solve( SOLVER& solver, const MATRIX& A, int main(int argc, char **argv) { std::ofstream logfile("deal_solver_02/output"); - logfile.precision(4); deallog.attach(logfile); + deallog << std::setprecision(4); deallog.depth_console(0); deallog.threshold_double(1.e-10); diff --git a/tests/trilinos/deal_solver_02/cmp/generic b/tests/trilinos/deal_solver_02/cmp/generic index 7f8e0ffdff..664748dd19 100644 --- a/tests/trilinos/deal_solver_02/cmp/generic +++ b/tests/trilinos/deal_solver_02/cmp/generic @@ -1,6 +1,6 @@ DEAL::Size 32 Unknowns 961 DEAL::Solver type: N6dealii14SolverBicgstabINS_16TrilinosWrappers6VectorEEE -DEAL:Bicgstab::Starting value 31.0000 -DEAL:Bicgstab::Convergence step 29 value 0.000873501 +DEAL:Bicgstab::Starting value 31.00 +DEAL:Bicgstab::Convergence step 29 value 0.0008735 DEAL::Solver stopped after 29 iterations diff --git a/tests/trilinos/deal_solver_06.cc b/tests/trilinos/deal_solver_06.cc index 6ef52509b8..ea1828f1a3 100644 --- a/tests/trilinos/deal_solver_06.cc +++ b/tests/trilinos/deal_solver_06.cc @@ -1,20 +1,20 @@ //---------------------------- trilinos_deal_solver_06.cc --------------------------- // $Id$ -// Version: $Name$ +// Version: $Name$ // -// Copyright (C) 2004, 2005, 2008 by the deal.II authors +// Copyright (C) 2004, 2005, 2008, 2010 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. // -//---------------------------- trilinos_deal_solver_06.cc --------------------------- +//------------------ trilinos_deal_solver_06.cc --------------------------- // test the Richardson solver using the Trilinos matrix and vector classes -#include "../tests.h" +#include "../tests.h" #include #include "../lac/testmatrix.h" #include @@ -40,10 +40,10 @@ check_solve( SOLVER& solver, const MATRIX& A, VECTOR& u, VECTOR& f, const PRECONDITION& P) { deallog << "Solver type: " << typeid(solver).name() << std::endl; - + u = 0.; f = 1.; - try + try { solver.solve(A,u,f,P); } @@ -60,10 +60,10 @@ check_solve( SOLVER& solver, const MATRIX& A, int main(int argc, char **argv) { std::ofstream logfile("deal_solver_06/output"); - logfile.precision(4); deallog.attach(logfile); + deallog << std::setprecision(4); deallog.depth_console(0); - deallog.threshold_double(1.e-10); + deallog.threshold_double(1.e-10); Utilities::System::MPI_InitFinalize mpi_initialization (argc, argv); @@ -74,7 +74,7 @@ int main(int argc, char **argv) SolverControl control(10000, 1.e-3); deallog << "Size " << size << " Unknowns " << dim << std::endl; - + // Make matrix FDMatrix testproblem(size, size); CompressedSimpleSparsityPattern csp (dim, dim); @@ -91,7 +91,7 @@ int main(int argc, char **argv) u.compress (); GrowingVectorMemory mem; - SolverRichardson solver(control,mem); + SolverRichardson solver(control,mem,0.1); PreconditionIdentity preconditioner; check_solve (solver, A,u,f, preconditioner); } diff --git a/tests/trilinos/deal_solver_06/cmp/generic b/tests/trilinos/deal_solver_06/cmp/generic index 2a09d922b4..f7b0bc1e0e 100644 --- a/tests/trilinos/deal_solver_06/cmp/generic +++ b/tests/trilinos/deal_solver_06/cmp/generic @@ -1,7 +1,6 @@ DEAL::Size 32 Unknowns 961 DEAL::Solver type: N6dealii16SolverRichardsonINS_16TrilinosWrappers6VectorEEE -DEAL:Richardson::Starting value 31.0000 -DEAL:Richardson::Failure step 374 value nan -DEAL::Iterative method reported convergence failure in step 374 with residual nan -DEAL::Solver stopped after 374 iterations +DEAL:Richardson::Starting value 31.00 +DEAL:Richardson::Convergence step 5271 value 0.0009996 +DEAL::Solver stopped after 5271 iterations diff --git a/tests/trilinos/deal_solver_06/cmp/i386-apple-darwin8.10.1+gcc4.0 b/tests/trilinos/deal_solver_06/cmp/i386-apple-darwin8.10.1+gcc4.0 deleted file mode 100644 index 27bffdf226..0000000000 --- a/tests/trilinos/deal_solver_06/cmp/i386-apple-darwin8.10.1+gcc4.0 +++ /dev/null @@ -1,9 +0,0 @@ - -DEAL::Size 32 Unknowns 961 -DEAL::Solver type: N6dealii16SolverRichardsonINS_13TrilinosWrappers6VectorEEE -DEAL:Richardson::Starting value 31.00 -DEAL:Richardson::Failure step 10000 value nan -DEAL::Iterative method reported convergence failure in step 10000 with residual nan -DEAL::Solver stopped after 10000 iterations -DEAL::GrowingVectorMemory:Overall allocated vectors: 2 -DEAL::GrowingVectorMemory:Maximum allocated vectors: 2 -- 2.39.5