// $Id$
// Version: $Name$
//
-// Copyright (C) 1998, 1999, 2000 by the deal.II authors
+// Copyright (C) 1998, 1999, 2000, 2001 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
int main()
{
+ try
+ {
ofstream logfile("mg.output");
deallog.attach(logfile);
deallog.depth_console(0);
Vector<double> u;
u.reinit(f);
PrimitiveVectorMemory<> mem;
- SolverControl control(100, 1.e-12);
+ SolverControl control(1000, 1.e-10,false , true);
SolverCG<> solver(control, mem);
u = 0.;
mgA[i].reinit(mgstruct[i]);
}
equation.build_mgmatrix(mgA, mgdof, quadrature);
-
- SolverControl cgcontrol(10,0., false, false);
+
+ SolverControl cgcontrol(1000,1.e-12, false, false);
PrimitiveVectorMemory<> cgmem;
SolverCG<> cgsolver(cgcontrol, cgmem);
PreconditionIdentity cgprec;
}
deallog.pop();
}
+
+ }
+ catch (const SolverControl::NoConvergence& e)
+ {
+ deallog << "Step " << e.last_step
+ << " Residual " << e.last_residual << endl;
+ }
}
template<int dim>
PreconditionSSOR<> prec;
prec.initialize((*matrices)[level], 1.);
- rich.solve((*matrices)[level], u, rhs, prec);
+ try
+ {
+ rich.solve((*matrices)[level], u, rhs, prec);
+ }
+ catch (const SolverControl::NoConvergence&)
+ {
+ }
}
DEAL:Q1::DoFs 9
DEAL:Q1::Levels: 2
DEAL:Q1:cg::Starting
-DEAL:Q1:cg::Convergence step 4
+DEAL:Q1:cg::Convergence step 3
DEAL:Q1::DoFs 25
DEAL:Q1::Levels: 3
DEAL:Q1:cg::Starting
-DEAL:Q1:cg::Convergence step 5
+DEAL:Q1:cg::Convergence step 4
DEAL:Q1::DoFs 81
DEAL:Q1::Levels: 4
DEAL:Q1:cg::Starting
-DEAL:Q1:cg::Convergence step 6
+DEAL:Q1:cg::Convergence step 5
DEAL:Q2::DoFs 25
DEAL:Q2::Levels: 2
DEAL:Q2:cg::Starting
-DEAL:Q2:cg::Convergence step 6
+DEAL:Q2:cg::Convergence step 5
DEAL:Q2::DoFs 81
DEAL:Q2::Levels: 3
DEAL:Q2:cg::Starting
-DEAL:Q2:cg::Convergence step 7
+DEAL:Q2:cg::Convergence step 6
DEAL:Q2::DoFs 289
DEAL:Q2::Levels: 4
DEAL:Q2:cg::Starting
-DEAL:Q2:cg::Convergence step 7
+DEAL:Q2:cg::Convergence step 6
DEAL:Q3::DoFs 49
DEAL:Q3::Levels: 2
DEAL:Q3:cg::Starting
-DEAL:Q3:cg::Convergence step 8
+DEAL:Q3:cg::Convergence step 6
DEAL:Q3::DoFs 169
DEAL:Q3::Levels: 3
DEAL:Q3:cg::Starting
-DEAL:Q3:cg::Convergence step 7
+DEAL:Q3:cg::Convergence step 6
DEAL:Q3::DoFs 625
DEAL:Q3::Levels: 4
DEAL:Q3:cg::Starting
-DEAL:Q3:cg::Convergence step 7
+DEAL:Q3:cg::Convergence step 6