]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Move the iterative solver classes and helpers from the indepenant MIA library to...
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Mon, 3 Aug 1998 11:35:41 +0000 (11:35 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Mon, 3 Aug 1998 11:35:41 +0000 (11:35 +0000)
git-svn-id: https://svn.dealii.org/trunk@470 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/source/numerics/base.cc
deal.II/deal.II/source/numerics/vectors.cc

index 626ba82f762fffd19a75da3a73c8e5a7790918eb..c50d89c7e2a4a586da14bfcfc544d5decb88aae6 100644 (file)
 #include <basic/function.h>
 #include <fe/fe.h>
 #include <fe/quadrature.h>
-
-#include "../../../mia/control.h"
-#include "../../../mia/vectormemory.h"
-#include "../../../mia/cg.h"
+#include <lac/solver_cg.h>
+#include <lac/vector_memory.h>
 
 #include <map>
 #include <numeric>
@@ -134,15 +132,12 @@ template <int dim>
 void ProblemBase<dim>::solve () {
   Assert ((tria!=0) && (dof_handler!=0), ExcNoTriaSelected());
   
-  int    max_iter  = 4000;
-  double tolerance = 1.e-16;
-  
-  Control                          control1(max_iter,tolerance);
+  SolverControl                    control(4000, 1e-16);
   PrimitiveVectorMemory<dVector>   memory(right_hand_side.size());
-  CG<dSMatrix,dVector>             cg(control1,memory);
+  SolverCG<dSMatrix,dVector>       cg(control,memory);
 
                                   // solve
-  cg (system_matrix, solution, right_hand_side);
+  cg.solve (system_matrix, solution, right_hand_side);
                                   // distribute solution
   constraints.distribute (solution);
 };
index 7f097ba96e26312cd1fa445bc429ac7b159d68d6..70a5d364ac811d6aa9671cf878652b94dc18b582 100644 (file)
 #include <numerics/matrices.h>
 #include <lac/dvector.h>
 #include <lac/dsmatrix.h>
-
-#include "../../../mia/control.h"
-#include "../../../mia/vectormemory.h"
-#include "../../../mia/cg.h"
+#include <lac/solver_cg.h>
+#include <lac/vector_memory.h>
 
 #include <numeric>
 #include <algorithm>
@@ -167,14 +165,12 @@ void VectorTools<dim>::project (const DoFHandler<dim>    &dof,
   MatrixTools<dim>::apply_boundary_values (boundary_values,
                                           mass_matrix, vec, tmp);
 
-  int    max_iter  = 1000;
-  double tolerance = 1.e-16;
-  Control                          control1(max_iter,tolerance);
+  SolverControl                    control(1000,1e-16);
   PrimitiveVectorMemory<dVector>   memory(tmp.size());
-  CG<dSMatrix,dVector>             cg(control1,memory);
+  SolverCG<dSMatrix,dVector>       cg(control,memory);
 
                                   // solve
-  cg (mass_matrix, vec, tmp);
+  cg.solve (mass_matrix, vec, tmp);
   
                                   // distribute solution
   constraints.distribute (vec);
@@ -323,14 +319,12 @@ VectorTools<dim>::project_boundary_values (const DoFHandler<dim>    &dof,
   
   dVector boundary_projection (rhs.size());
 
-  int    max_iter  = 1000;
-  double tolerance = 1.e-16;
-  Control                          control1(max_iter,tolerance);
+  SolverControl                    control(1000, 1e-16);
   PrimitiveVectorMemory<dVector>   memory(rhs.size());
-  CG<dSMatrix,dVector>             cg(control1,memory);
+  SolverCG<dSMatrix,dVector>       cg(control,memory);
 
                                   // solve
-  cg (mass_matrix, boundary_projection, rhs);
+  cg.solve (mass_matrix, boundary_projection, rhs);
 
                                   // fill in boundary values
   for (unsigned int i=0; i<dof_to_boundary_mapping.size(); ++i)

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.