]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
this-> added
authorguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 10 Mar 2003 14:39:42 +0000 (14:39 +0000)
committerguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 10 Mar 2003 14:39:42 +0000 (14:39 +0000)
git-svn-id: https://svn.dealii.org/trunk@7290 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/numerics/dof_print_solver_step.h
deal.II/deal.II/source/multigrid/multigrid.cc
deal.II/lac/include/lac/eigen.h
deal.II/lac/include/lac/solver_qmrs.h

index 1dfaff68e8d237b326f91f82e22626f8121ed213..de66214a70b71eb47970956e2305548f6b278292 100644 (file)
@@ -124,7 +124,7 @@ DoFPrintSolverStep<dim, SOLVER, VECTOR>::print_vectors (const unsigned int step,
 #endif
 
   filename << basename
-          << std::setw(3) << setfill('0') << step
+          << std::setw(3) << std::setfill('0') << step
           << out.default_suffix();
 
 #ifndef HAVE_STD_STRINGSTREAM
index 0491b8132e17836f2f5b33b55cc834561d000904..05c958b0575fb9c525a4ba1d95c289bcb6b9644a 100644 (file)
@@ -86,7 +86,6 @@ void MGTransferPrebuilt<number>::build_matrices (
       prolongation_sparsities[level].reinit (sizes[level+1],
                                             sizes[level],
                                             dofs_per_cell+1);
-#endif
       
       for (typename MGDoFHandler<dim>::cell_iterator cell=mg_dof.begin(level);
           cell != mg_dof.end(level); ++cell)
@@ -123,6 +122,7 @@ void MGTransferPrebuilt<number>::build_matrices (
       prolongation_sparsities[level].compress ();
 
       prolongation_matrices[level].reinit (prolongation_sparsities[level]);
+#endif
 
                                       // now actually build the matrices
       for (typename MGDoFHandler<dim>::cell_iterator cell=mg_dof.begin(level);
index c4a82c3479f3fbbaeef1e4c0adda80fb64193740..85db6bbd77db09691a5a75ee9a2d6972a2b8bf47 100644 (file)
@@ -206,8 +206,8 @@ EigenPower<VECTOR>::solve (double       &value,
 
   deallog.push("Power method");
 
-  VECTOR* Vy = memory.alloc (); VECTOR& y = *Vy; y.reinit (x);
-  VECTOR* Vr = memory.alloc (); VECTOR& r = *Vr; r.reinit (x);
+  VECTOR* Vy = this->memory.alloc (); VECTOR& y = *Vy; y.reinit (x);
+  VECTOR* Vr = this->memory.alloc (); VECTOR& r = *Vr; r.reinit (x);
   
   double length = x.l2_norm ();
   double old_length = 0.;
@@ -250,19 +250,19 @@ EigenPower<VECTOR>::solve (double       &value,
 
                                       // Check the change of the eigenvalue
                                       // Brrr, this is not really a good criterion
-      conv = control().check (iter, fabs(1./length-1./old_length));
+      conv = this->control().check (iter, fabs(1./length-1./old_length));
     }
   
-  memory.free(Vy);
-  memory.free(Vr);
+  this->memory.free(Vy);
+  this->memory.free(Vr);
 
   deallog.pop();
 
                                   // in case of failure: throw
                                   // exception
-  if (control().last_check() != SolverControl::success)
-    throw SolverControl::NoConvergence (control().last_step(),
-                                       control().last_value());
+  if (this->control().last_check() != SolverControl::success)
+    throw SolverControl::NoConvergence (this->control().last_step(),
+                                       this->control().last_value());
                                   // otherwise exit as normal
 }
 
@@ -300,14 +300,14 @@ EigenInverse<VECTOR>::solve (double       &value,
   ReductionControl inner_control (A.m(), 1.e-16, 1.e-8, false, false);
   PreconditionIdentity prec;
   SolverCG<VECTOR>
-    solver(inner_control, memory);
+    solver(inner_control, this->memory);
 
                                   // Next step for recomputing the shift
   unsigned int goal = 10;
   
                                   // Auxiliary vector
-  VECTOR* Vy = memory.alloc (); VECTOR& y = *Vy; y.reinit (x);
-  VECTOR* Vr = memory.alloc (); VECTOR& r = *Vr; r.reinit (x);
+  VECTOR* Vy = this->memory.alloc (); VECTOR& y = *Vy; y.reinit (x);
+  VECTOR* Vr = this->memory.alloc (); VECTOR& r = *Vr; r.reinit (x);
   
   double length = x.l2_norm ();
   double old_length = 0.;
@@ -357,23 +357,23 @@ EigenInverse<VECTOR>::solve (double       &value,
          y.equ (value, x);
          double res = A.residual (r,x,y);
                                           // Check the residual
-         conv = control().check (iter, res);
+         conv = this->control().check (iter, res);
        } else {
-         conv = control().check (iter, fabs(1./value-1./old_value));
+         conv = this->control().check (iter, fabs(1./value-1./old_value));
        }
       old_value = value;
     }
 
-  memory.free(Vy);
-  memory.free(Vr);
+  this->memory.free(Vy);
+  this->memory.free(Vr);
   
   deallog.pop();
 
                                   // in case of failure: throw
                                   // exception
-  if (control().last_check() != SolverControl::success)
-    throw SolverControl::NoConvergence (control().last_step(),
-                                       control().last_value());
+  if (this->control().last_check() != SolverControl::success)
+    throw SolverControl::NoConvergence (this->control().last_step(),
+                                       this->control().last_value());
                                   // otherwise exit as normal
 }
 
index 7a30d4753c73d21bffe9c64c414176b6ff8377ce..ea60a59905d2576b140a2821ac4e12916bc78a78 100644 (file)
@@ -231,11 +231,11 @@ SolverQMRS<VECTOR>::solve (const MATRIX         &A,
   deallog.push("QMRS");
   
                                   // Memory allocation
-  Vv  = memory.alloc();
-  Vp  = memory.alloc();
-  Vq  = memory.alloc();
-  Vt  = memory.alloc();
-  Vd  = memory.alloc();
+  Vv  = this->memory.alloc();
+  Vp  = this->memory.alloc();
+  Vq  = this->memory.alloc();
+  Vt  = this->memory.alloc();
+  Vd  = this->memory.alloc();
 
   Vx = &x;
   Vb = &b;
@@ -260,20 +260,20 @@ SolverQMRS<VECTOR>::solve (const MATRIX         &A,
   while (state);
     
                                   // Deallocate Memory
-  memory.free(Vv);
-  memory.free(Vp);
-  memory.free(Vq);
-  memory.free(Vt);
-  memory.free(Vd);
+  this->memory.free(Vv);
+  this->memory.free(Vp);
+  this->memory.free(Vq);
+  this->memory.free(Vt);
+  this->memory.free(Vd);
  
                                   // Output
   deallog.pop();
 
                                   // in case of failure: throw
                                   // exception
-  if (control().last_check() != SolverControl::success)
-    throw SolverControl::NoConvergence (control().last_step(),
-                                       control().last_value());
+  if (this->control().last_check() != SolverControl::success)
+    throw SolverControl::NoConvergence (this->control().last_step(),
+                                       this->control().last_value());
                                   // otherwise exit as normal
 };
 
@@ -316,7 +316,7 @@ SolverQMRS<VECTOR>::iterate(const MATRIX         &A,
   v.sadd(-1.,1.,b);
   res = v.l2_norm();
 
-  if (control().check(step, res) == SolverControl::success)
+  if (this->control().check(step, res) == SolverControl::success)
     return false;
 
   p = v;
@@ -360,7 +360,7 @@ SolverQMRS<VECTOR>::iterate(const MATRIX         &A,
        }
       else
        res = sqrt((it+1)*tau);
-      state = control().check(step,res);
+      state = this->control().check(step,res);
       if ((state == SolverControl::success)
       || (state == SolverControl::failure))
        return false;

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.