]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Changed interface in Trilinos block solver to the one in the Trilinos solver (non...
authorkronbichler <kronbichler@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 13 Oct 2008 13:32:18 +0000 (13:32 +0000)
committerkronbichler <kronbichler@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 13 Oct 2008 13:32:18 +0000 (13:32 +0000)
git-svn-id: https://svn.dealii.org/trunk@17192 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/include/lac/trilinos_solver_block.h
deal.II/lac/source/trilinos_solver_block.cc

index 5b13a870e33d04971cf2e09746909770f385f71d..8cd2d6d9c540086d5e11d12b59e465bff05ca1e8 100644 (file)
@@ -48,6 +48,22 @@ namespace TrilinosWrappers
   {
     public:
 
+                                      /**
+                                       * Enumeration object that is
+                                       * set in the constructor of
+                                       * the derived classes and
+                                       * tells Trilinos which solver
+                                       * to use. This option can also
+                                       * be set in the user program,
+                                       * so one might use this base
+                                       * class instead of one of the
+                                       * specialized derived classes
+                                       * when the solver should be
+                                       * set at runtime. Currently
+                                       * enabled options are:
+                                       */
+      enum SolverBlockName {cg, gmres} solver_name;
+
                                        /**
                                         * Standardized data struct to
                                         * pipe additional data to the
@@ -92,12 +108,21 @@ namespace TrilinosWrappers
                                        /**
                                         * Constructor. Takes the
                                         * solver control object and
-                                        * the MPI communicator over
-                                        * which parallel computations
-                                        * are to happen.
+                                        * creates the solver.
                                         */
       SolverBlockBase (SolverControl  &cn);
-      
+
+                                       /**
+                                        * Second constructor. This
+                                        * constructor takes an enum
+                                        * object that specifies the
+                                        * solver name and sets the
+                                        * appropriate Krylov
+                                        * method.
+                                        */
+      SolverBlockBase (const enum SolverBlockName  solver_name,
+                      SolverControl              &cn);
+
                                        /**
                                         * Destructor.
                                         */
@@ -190,17 +215,6 @@ namespace TrilinosWrappers
                                         */
       SolverControl &solver_control;
 
-                                      /**
-                                       * String object that is set in
-                                       * the constructor of the
-                                       * derived classes and tells
-                                       * Trilinos which solver to
-                                       * use. Currently enabled
-                                       * options are <tt>"cg",
-                                       * "gmres"</tt>.
-                                       */
-      enum SolverBlockName {cg, gmres} solver_name;
-
     protected:
 
                                        /**
index 122ef6ea75c2911d2b86edeb956a829107a15b62..5021328f0d93527b5f07a517051477ecb80aca6a 100644 (file)
@@ -60,8 +60,17 @@ namespace TrilinosWrappers
   
   SolverBlockBase::SolverBlockBase (SolverControl  &cn)
                   :
-                  solver_control (cn),
-                 solver_name    (gmres)
+                  solver_name    (gmres),
+                  solver_control (cn)
+  {}
+
+  
+
+  SolverBlockBase::SolverBlockBase (SolverBlockBase::SolverBlockName solver_name,
+                                   SolverControl                   &cn)
+                  :
+                  solver_name    (solver_name),
+                  solver_control (cn)
   {}
 
   

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.