//---------------------------- 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 <base/utilities.h>
#include "../lac/testmatrix.h"
#include <cmath>
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);
}
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);
SolverControl control(10000, 1.e-3);
deallog << "Size " << size << " Unknowns " << dim << std::endl;
-
+
// Make matrix
FDMatrix testproblem(size, size);
CompressedSimpleSparsityPattern csp (dim, dim);
u.compress ();
GrowingVectorMemory<TrilinosWrappers::Vector> mem;
- SolverRichardson<TrilinosWrappers::Vector> solver(control,mem);
+ SolverRichardson<TrilinosWrappers::Vector> solver(control,mem,0.1);
PreconditionIdentity preconditioner;
check_solve (solver, A,u,f, preconditioner);
}
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