]> https://gitweb.dealii.org/ - dealii.git/commitdiff
fix problems with solver selector
authorGuido Kanschat <dr.guido.kanschat@gmail.com>
Fri, 2 Jul 2010 16:22:12 +0000 (16:22 +0000)
committerGuido Kanschat <dr.guido.kanschat@gmail.com>
Fri, 2 Jul 2010 16:22:12 +0000 (16:22 +0000)
git-svn-id: https://svn.dealii.org/trunk@21445 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/include/lac/solver_control.h
deal.II/lac/include/lac/solver_selector.h
deal.II/lac/source/solver_control.cc

index 70a8832bf0f440e6550e09539c1b70a18b65694f..12a1a7694d2d15bb74361dd7f44ef5e57ac66456 100644 (file)
@@ -473,6 +473,15 @@ class ReductionControl : public SolverControl
                      const bool     log_history = false,
                      const bool     log_result  = true);
 
+                                    /**
+                                     * Initialize with a
+                                     * SolverControl object. The
+                                     * result will emulate
+                                     * SolverControl by setting
+                                     * #reduce to zero.
+                                     */
+    ReductionControl(const SolverControl& c);
+    
                                     /**
                                      * Assign a SolverControl object
                                      * to ReductionControl. The
@@ -625,16 +634,6 @@ SolverControl::log_result () const
 }
 
 
-inline
-ReductionControl&
-ReductionControl::operator= (const SolverControl& c)
-{
-  SolverControl::operator=(c);
-  set_reduction(0.);
-  return *this;
-}
-
-
 inline double
 ReductionControl::reduction () const
 {
index 9459a8cb3314101173debc9c75212f0356945b43..cb5ad94fb30155e3b591178f14ce7d18087ca230 100644 (file)
@@ -255,8 +255,8 @@ template <class VECTOR>
 SolverSelector<VECTOR>::SolverSelector(const std::string    &solver_name,
                                       SolverControl        &control,
                                       VectorMemory<VECTOR> &) :
-               solver_name(solver_name),
-               control(control)
+               control(control),
+               solver_name(solver_name)
 {}
 
 
index 9b873e632f515367d4657504d436e1fd616282e8..1e7d18deb8216f3ace2a585dab84df9ecac33acc 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$
 //
-//    Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2006 by the deal.II authors
+//    Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2006, 2010 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -266,6 +266,23 @@ ReductionControl::ReductionControl(const unsigned int n,
 {}
 
 
+ReductionControl::ReductionControl (const SolverControl& c)
+               :
+               SolverControl(c)
+{
+  set_reduction(0.);
+}
+
+
+ReductionControl&
+ReductionControl::operator= (const SolverControl& c)
+{
+  SolverControl::operator=(c);
+  set_reduction(0.);
+  return *this;
+}
+
+
 ReductionControl::~ReductionControl()
 {}
 

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.