]> https://gitweb.dealii.org/ - dealii.git/commitdiff
fix step-51 and tests with Solver*::AdditionalData changes 1580/head
authorTimo Heister <timo.heister@gmail.com>
Thu, 10 Sep 2015 23:09:00 +0000 (19:09 -0400)
committerTimo Heister <timo.heister@gmail.com>
Thu, 10 Sep 2015 23:12:11 +0000 (19:12 -0400)
PR #1572 disabled implicit conversion to Solver*::AdditionalData. This commit
fixes tests and step-51 that broke because of that.

examples/step-51/step-51.cc
tests/bits/step-51.cc
tests/bits/step-51p.cc
tests/lac/solver.cc
tests/lac/solver_monitor.cc
tests/lac/sparse_matrices.cc
tests/mpi/interpolate_to_different_mesh_02.cc
tests/trilinos/deal_solver_06.cc

index eda88d2dce1aa606e98358b7e97fd459bfcd5b99..9b2e479d2696858f45a7cfb2b2aa5a589b2eeb78 100644 (file)
@@ -974,7 +974,7 @@ namespace Step51
   {
     SolverControl solver_control (system_matrix.m()*10,
                                   1e-11*system_rhs.l2_norm());
-    SolverBicgstab<> solver (solver_control, false);
+    SolverBicgstab<> solver (solver_control);
     solver.solve (system_matrix, solution, system_rhs,
                   PreconditionIdentity());
 
index 3b8568568b36b89b1150d8148ffa1adf8a8de6f6..542cb6abcc78059f40dc4e4316314ed11c935b63 100644 (file)
@@ -763,7 +763,7 @@ namespace Step51
     // sensitive
     std::ostringstream stream;
     deallog.attach(stream);
-    SolverBicgstab<> solver (solver_control, false);
+    SolverBicgstab<> solver (solver_control);
     solver.solve (system_matrix, solution, system_rhs,
                   PreconditionIdentity());
     deallog.attach(logfile);
index 9b5f72739bae99970e83031154d37dbc1517be85..2d45748116158e88abcf037033255fa57f675412 100644 (file)
@@ -761,7 +761,7 @@ namespace Step51
                                   1e-12*system_rhs.l2_norm());
     std::ostringstream stream;
     deallog.attach(stream);
-    SolverBicgstab<> solver (solver_control, false);
+    SolverBicgstab<> solver (solver_control);
     solver.solve (system_matrix, solution, system_rhs,
                   PreconditionIdentity());
     deallog.attach(logfile);
index 5af0fbfc2e7ff75ee5de37a82cb34a9c044d3875..8f3ece8434738157b5a3a8f503dc0529f26311de 100644 (file)
@@ -80,9 +80,10 @@ int main()
   SolverControl control(100, 1.e-3);
   SolverControl verbose_control(100, 1.e-3, true);
   SolverCG<> cg(control, mem);
-  SolverGMRES<> gmres(control, mem, 8);
-  SolverGMRES<>::AdditionalData data(8, true);
-  SolverGMRES<> gmresright(control, mem, data);
+  SolverGMRES<>::AdditionalData data1(8);
+  SolverGMRES<> gmres(control, mem, data1);
+  SolverGMRES<>::AdditionalData data2(8, true);
+  SolverGMRES<> gmresright(control, mem, data2);
   SolverMinRes<> minres(control, mem);
   SolverBicgstab<> bicgstab(control, mem);
   SolverRichardson<> rich(control, mem);
index d693975c694b42796706d24519642cdb425fca9a..eec4e9ca9369326c74057e6fc74b5628706670e5 100644 (file)
@@ -91,7 +91,9 @@ int main()
   cg.connect (&monitor_norm);
   cg.connect (&monitor_mean);
 
-  SolverGMRES<> gmres(control, mem, 8);
+  SolverGMRES<> gmres(control,
+                      mem,
+                      SolverGMRES<>::AdditionalData(/*max_vecs=*/ 8));
   gmres.connect (&monitor_norm);
   gmres.connect (&monitor_mean);
 
index 5a3ae0e5f677a78bea78f78ac4af28907d14510b..0a9ec57e3f4ad7592738ee7ee68ef34669834f80 100644 (file)
@@ -54,8 +54,8 @@ check_vmult_quadratic(std::vector<double> &residuals,
   GrowingVectorMemory<> mem;
 
   SolverControl control(10, 1.e-13, false);
-  SolverRichardson<> rich(control, mem, .01);
-  SolverRichardson<> prich(control, mem, 1.);
+  SolverRichardson<> rich(control, mem, SolverRichardson<>::AdditionalData(/*omega=*/.01));
+  SolverRichardson<> prich(control, mem, SolverRichardson<>::AdditionalData(/*omega=*/1.));
 
   const types::global_dof_index block_size = (types::global_dof_index) std::sqrt(A.n()+.3);
   const unsigned int n_blocks = A.n()/block_size;
@@ -130,8 +130,8 @@ check_vmult_quadratic(std::vector<double> &residuals,
   GrowingVectorMemory<> mem;
 
   SolverControl control(10, 1.e-13, false);
-  SolverRichardson<> rich(control, mem, .01);
-  SolverRichardson<> prich(control, mem, 1.);
+  SolverRichardson<> rich(control, mem, SolverRichardson<>::AdditionalData(/*omega=*/.01));
+  SolverRichardson<> prich(control, mem, SolverRichardson<>::AdditionalData(/*omega=*/1.));
   PreconditionIdentity identity;
   PreconditionJacobi<BlockSparseMatrix<double> > jacobi;
   jacobi.initialize(A, .5);
index ff13a1416b1ce71ed36ecd56d9c7be9b595c0968..294068a27d1226956ed0df1c9bb517df54b2bfa5 100644 (file)
@@ -206,7 +206,7 @@ void SeventhProblem<dim>::solve ()
   LA::MPI::Vector
   completely_distributed_solution (locally_owned_dofs, mpi_communicator);
   SolverControl solver_control (dof_handler.n_dofs(), 1e-12);
-  TrilinosWrappers::SolverCG solver(solver_control, mpi_communicator);
+  TrilinosWrappers::SolverCG solver(solver_control);
   TrilinosWrappers::PreconditionAMG preconditioner;
   TrilinosWrappers::PreconditionAMG::AdditionalData data;
   preconditioner.initialize(system_matrix, data);
index 0e17abaa46b973221d1d728ef2db4306f936c91f..bf1a77d9ecb234c3b9b4c5bca9679bacf7b33f0f 100644 (file)
@@ -96,7 +96,8 @@ int main(int argc, char **argv)
     u.compress (VectorOperation::insert);
 
     GrowingVectorMemory<TrilinosWrappers::Vector> mem;
-    SolverRichardson<TrilinosWrappers::Vector> solver(control,mem,0.1);
+    SolverRichardson<TrilinosWrappers::Vector>::AdditionalData data (/*omega=*/0.1);
+    SolverRichardson<TrilinosWrappers::Vector> solver(control, mem, data);
     PreconditionIdentity preconditioner;
     check_solve (solver, control, A,u,f, preconditioner);
   }

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.