]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix some more of these nasty two-stage-lookup problems that we have w.r.t. the C...
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Mon, 27 May 2002 07:00:05 +0000 (07:00 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Mon, 27 May 2002 07:00:05 +0000 (07:00 +0000)
git-svn-id: https://svn.dealii.org/trunk@5876 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/grid/tria_accessor.templates.h
deal.II/deal.II/include/grid/tria_iterator.templates.h
deal.II/lac/include/lac/precondition.h
deal.II/lac/include/lac/solver_cg.h

index 802d7b7c8ce541a24c6244ebe5c5195b123c6cc1..b270bb2be9727442390ee4973a89b1404d100deb 100644 (file)
@@ -165,7 +165,7 @@ TriaObjectAccessor<1,dim>::child (const unsigned int i) const
   Assert (i<2, ExcIndexRange(i,0,2));
   
   TriaIterator<dim,TriaObjectAccessor<1,dim> >
-    q (tria, this->present_level+1, child_index (i));
+    q (this->tria, this->present_level+1, child_index (i));
   
   Assert ((q.state() == IteratorState::past_the_end) || q->used(),
          typename TriaAccessor<dim>::ExcUnusedCellAsChild());
@@ -322,7 +322,7 @@ TriaObjectAccessor<2,dim>::line (const unsigned int i) const
   return
     TriaIterator<dim,TriaObjectAccessor<1,dim> >
     (
-      tria,
+      this->tria,
       this->present_level,
       line_index (i)
     );
@@ -350,7 +350,7 @@ TriaObjectAccessor<2,dim>::child (const unsigned int i) const
   Assert (i<4, ExcIndexRange(i,0,4));
   
   TriaIterator<dim,TriaObjectAccessor<2,dim> >
-    q (tria, this->present_level+1, child_index (i));
+    q (this->tria, this->present_level+1, child_index (i));
   
   Assert ((q.state() == IteratorState::past_the_end) || q->used(),
          typename TriaAccessor<dim>::ExcUnusedCellAsChild());
@@ -533,7 +533,7 @@ TriaObjectAccessor<3,dim>::line (const unsigned int i) const
                return this->quad(4)->line(3);
        };
   Assert (false, ExcIndexRange(i,0,12));
-  return TriaIterator<dim,TriaObjectAccessor<1,dim> >(tria, -1, -1, 0);
+  return TriaIterator<dim,TriaObjectAccessor<1,dim> >(this->tria, -1, -1, 0);
 };
 
 
@@ -547,7 +547,7 @@ TriaObjectAccessor<3,dim>::quad (const unsigned int i) const
   return
     TriaIterator<dim,TriaObjectAccessor<2,dim> >
     (
-      tria,
+      this->tria,
       this->present_level,
       quad_index (i)
     );
@@ -604,7 +604,7 @@ TriaObjectAccessor<3,dim>::child (const unsigned int i) const
 {
   Assert (i<8, ExcIndexRange(i,0,8));
   
-  TriaIterator<dim,TriaObjectAccessor<3,dim> > q (tria, this->present_level+1, child_index (i));
+  TriaIterator<dim,TriaObjectAccessor<3,dim> > q (this->tria, this->present_level+1, child_index (i));
   
   Assert ((q.state() == IteratorState::past_the_end) || q->used(),
          typename TriaAccessor<dim>::ExcUnusedCellAsChild());
index 3c7af91d6d92626373c6b849cb421776605a82ad..a9132d6403b9fa0b894c7927abbb5f737cf5b457 100644 (file)
@@ -135,8 +135,8 @@ TriaIterator<dim,Accessor>::TriaIterator (const TriaRawIterator<dim,Accessor> &i
                                   // used() is called anyway, even if
                                   // state==IteratorState::past_the_end, and will then
                                   // throw the exception!
-  if (state() != IteratorState::past_the_end)
-    Assert (accessor.used(),
+  if (this->state() != IteratorState::past_the_end)
+    Assert (this->accessor.used(),
            ExcAssignmentOfUnusedObject());
 #endif  
 };
@@ -157,8 +157,8 @@ TriaIterator<dim,Accessor>::TriaIterator (Triangulation<dim> *parent,
                                   // used() is called anyway, even if
                                   // state==IteratorState::past_the_end, and will then
                                   // throw the exception!
-  if (state() != IteratorState::past_the_end)
-    Assert (accessor.used(),
+  if (this->state() != IteratorState::past_the_end)
+    Assert (this->accessor.used(),
            ExcAssignmentOfUnusedObject());
 #endif  
 };
@@ -168,7 +168,7 @@ template <int dim, typename Accessor>
 inline
 TriaIterator<dim,Accessor> &
 TriaIterator<dim,Accessor>::operator = (const TriaIterator<dim,Accessor> &i) {
-  accessor.copy_from (i.accessor);
+  this->accessor.copy_from (i.accessor);
   return *this;
 };
 
@@ -177,7 +177,7 @@ template <int dim, typename Accessor>
 inline
 TriaIterator<dim,Accessor> &
 TriaIterator<dim,Accessor>::operator = (const TriaRawIterator<dim,Accessor> &i) {
-  accessor.copy_from (i.accessor);
+  this->accessor.copy_from (i.accessor);
 #ifdef DEBUG
                                   // do this like this, because:
                                   // if we write
@@ -185,7 +185,7 @@ TriaIterator<dim,Accessor>::operator = (const TriaRawIterator<dim,Accessor> &i)
                                   // used() is called anyway, even if
                                   // state==IteratorState::past_the_end, and will then
                                   // throw the exception!
-  if (state() != IteratorState::past_the_end) 
+  if (this->state() != IteratorState::past_the_end) 
     Assert (accessor.used(),
            ExcAssignmentOfUnusedObject());
 #endif  
@@ -197,8 +197,8 @@ template <int dim, typename Accessor>
 inline
 TriaIterator<dim,Accessor> & TriaIterator<dim,Accessor>::operator ++ () {
   while (TriaRawIterator<dim,Accessor>::operator++(),
-        (state() == IteratorState::valid))
-    if (accessor.used() == true)
+        (this->state() == IteratorState::valid))
+    if (this->accessor.used() == true)
       return *this;
   return *this;
 };
@@ -219,8 +219,8 @@ inline
 TriaIterator<dim,Accessor> &
 TriaIterator<dim,Accessor>::operator -- () {
   while (TriaRawIterator<dim,Accessor>::operator--(),
-        (state() == IteratorState::valid))
-    if (accessor.used() == true)
+        (this->state() == IteratorState::valid))
+    if (this->accessor.used() == true)
       return *this;
   return *this;
 };
@@ -264,8 +264,8 @@ TriaActiveIterator<dim,Accessor>::TriaActiveIterator (const TriaRawIterator<dim,
                                   // has_children() is called anyway, even if
                                   // state==IteratorState::past_the_end, and will then
                                   // throw the exception!
-  if (state() != IteratorState::past_the_end) 
-    Assert (accessor.has_children()==false,
+  if (this->state() != IteratorState::past_the_end) 
+    Assert (this->accessor.has_children()==false,
            ExcAssignmentOfInactiveObject());
 #endif  
 };
@@ -283,8 +283,8 @@ TriaActiveIterator<dim,Accessor>::TriaActiveIterator (const TriaIterator<dim,Acc
                                   // has_children() is called anyway, even if
                                   // state==IteratorState::past_the_end, and will then
                                   // throw the exception!
-  if (state() != IteratorState::past_the_end) 
-    Assert (accessor.has_children()==false,
+  if (this->state() != IteratorState::past_the_end) 
+    Assert (this->accessor.has_children()==false,
            ExcAssignmentOfInactiveObject());
 #endif  
 };
@@ -305,8 +305,8 @@ TriaActiveIterator<dim,Accessor>::TriaActiveIterator (Triangulation<dim> *parent
                                   // has_children() is called anyway, even if
                                   // state==IteratorState::past_the_end, and will then
                                   // throw the exception!
-  if (state() != IteratorState::past_the_end) 
-    Assert (accessor.has_children()==false,
+  if (this->state() != IteratorState::past_the_end) 
+    Assert (this->accessor.has_children()==false,
            ExcAssignmentOfInactiveObject());
 #endif  
 };
@@ -316,7 +316,7 @@ template <int dim, typename Accessor>
 inline
 TriaActiveIterator<dim,Accessor> &
 TriaActiveIterator<dim,Accessor>::operator = (const TriaActiveIterator<dim,Accessor> &i) {
-  accessor.copy_from (i.accessor);
+  this->accessor.copy_from (i.accessor);
   return *this;
 };
 
@@ -325,7 +325,7 @@ template <int dim, typename Accessor>
 inline
 TriaActiveIterator<dim,Accessor> &
 TriaActiveIterator<dim,Accessor>::operator = (const TriaRawIterator<dim,Accessor> &i) {
-  accessor.copy_from (i.accessor);
+  this->accessor.copy_from (i.accessor);
 #ifdef DEBUG
                                   // do this like this, because:
                                   // if we write
@@ -333,7 +333,7 @@ TriaActiveIterator<dim,Accessor>::operator = (const TriaRawIterator<dim,Accessor
                                   // has_chidlren() is called anyway, even if
                                   // state==IteratorState::past_the_end, and will then
                                   // throw the exception!
-  if (state() != IteratorState::past_the_end) 
+  if (this->state() != IteratorState::past_the_end) 
     Assert (accessor.used() && accessor.has_children()==false,
            ExcAssignmentOfInactiveObject());
 #endif  
@@ -345,7 +345,7 @@ template <int dim, typename Accessor>
 inline
 TriaActiveIterator<dim,Accessor> &
 TriaActiveIterator<dim,Accessor>::operator = (const TriaIterator<dim,Accessor> &i) {
-  accessor.copy_from (i.accessor);
+  this->accessor.copy_from (i.accessor);
 #ifdef DEBUG
                                   // do this like this, because:
                                   // if we write
@@ -353,7 +353,7 @@ TriaActiveIterator<dim,Accessor>::operator = (const TriaIterator<dim,Accessor> &
                                   // has_children() is called anyway, even if
                                   // state==IteratorState::past_the_end, and will then
                                   // throw the exception!
-  if (state() != IteratorState::past_the_end) 
+  if (this->state() != IteratorState::past_the_end) 
     Assert (accessor.has_children()==false,
            ExcAssignmentOfInactiveObject());
 #endif  
@@ -366,8 +366,8 @@ inline
 TriaActiveIterator<dim,Accessor> &
 TriaActiveIterator<dim,Accessor>::operator ++ () {
   while (TriaIterator<dim,Accessor>::operator++(),
-        (state() == IteratorState::valid))
-    if (accessor.has_children() == false)
+        (this->state() == IteratorState::valid))
+    if (this->accessor.has_children() == false)
       return *this;
   return *this;
 };
@@ -389,8 +389,8 @@ inline
 TriaActiveIterator<dim,Accessor> &
 TriaActiveIterator<dim,Accessor>::operator -- () {
   while (TriaIterator<dim,Accessor>::operator--(),
-        (state() == IteratorState::valid))
-    if (accessor.has_children() == false)
+        (this->state() == IteratorState::valid))
+    if (this->accessor.has_children() == false)
       return *this;
   return *this;
 };
index c7b6211520ed2195e10e81c3820b95e97d08dba7..82ce6a09d756168254bdf150124e0a95cbac8e4e 100644 (file)
@@ -544,8 +544,8 @@ template<class VECTOR>
 inline void
 PreconditionJacobi<MATRIX>::vmult (VECTOR& dst, const VECTOR& src) const
 {
-  Assert (A!=0, ExcNotInitialized());
-  A->precondition_Jacobi (dst, src, omega);
+  Assert (this->A!=0, ExcNotInitialized());
+  this->A->precondition_Jacobi (dst, src, this->omega);
 }
 
 
@@ -555,8 +555,8 @@ template<class VECTOR>
 inline void
 PreconditionJacobi<MATRIX>::Tvmult (VECTOR& dst, const VECTOR& src) const
 {
-  Assert (A!=0, ExcNotInitialized());
-  A->precondition_Jacobi (dst, src, omega);
+  Assert (this->A!=0, ExcNotInitialized());
+  this->A->precondition_Jacobi (dst, src, this->omega);
 }
 
 
@@ -567,8 +567,8 @@ template<class VECTOR>
 inline void
 PreconditionSOR<MATRIX>::vmult (VECTOR& dst, const VECTOR& src) const
 {
-  Assert (A!=0, ExcNotInitialized());
-  A->precondition_SOR (dst, src, omega);
+  Assert (this->A!=0, ExcNotInitialized());
+  this->A->precondition_SOR (dst, src, this->omega);
 }
 
 
@@ -578,8 +578,8 @@ template<class VECTOR>
 inline void
 PreconditionSOR<MATRIX>::Tvmult (VECTOR& dst, const VECTOR& src) const
 {
-  Assert (A!=0, ExcNotInitialized());
-  A->precondition_TSOR (dst, src, omega);
+  Assert (this->A!=0, ExcNotInitialized());
+  this->A->precondition_TSOR (dst, src, this->omega);
 }
 
 
@@ -590,8 +590,8 @@ template<class VECTOR>
 inline void
 PreconditionSSOR<MATRIX>::vmult (VECTOR& dst, const VECTOR& src) const
 {
-  Assert (A!=0, ExcNotInitialized());
-  A->precondition_SSOR (dst, src, omega);
+  Assert (this->A!=0, ExcNotInitialized());
+  this->A->precondition_SSOR (dst, src, this->omega);
 }
 
 
@@ -601,8 +601,8 @@ template<class VECTOR>
 inline void
 PreconditionSSOR<MATRIX>::Tvmult (VECTOR& dst, const VECTOR& src) const
 {
-  Assert (A!=0, ExcNotInitialized());
-  A->precondition_SSOR (dst, src, omega);
+  Assert (this->A!=0, ExcNotInitialized());
+  this->A->precondition_SSOR (dst, src, this->omega);
 }
 
 
index 56c8aea6c3452ce2aa9c5dfecef17211913c58bb..dd48289f34498a4494588ee984d66ff754e20c28 100644 (file)
@@ -204,7 +204,7 @@ SolverCG<VECTOR>::solve (const MATRIX         &A,
   deallog.push("cg");
   
                                   // Memory allocation
-  Vr  = memory.alloc();
+  Vr  = this->memory.alloc();
   Vp  = memory.alloc();
   Vz  = memory.alloc();
   VAp = memory.alloc();
@@ -237,7 +237,7 @@ SolverCG<VECTOR>::solve (const MATRIX         &A,
     g = b;
   res = g.l2_norm();
   
-  conv = control().check(0,res);
+  conv = this->control().check(0,res);
   if (conv) 
     {
       memory.free(Vr);
@@ -269,7 +269,7 @@ SolverCG<VECTOR>::solve (const MATRIX         &A,
 
       print_vectors(it, x, g, d);
       
-      conv = control().check(it,res);
+      conv = this->control().check(it,res);
       if (conv)
        break;
       
@@ -297,9 +297,9 @@ SolverCG<VECTOR>::solve (const MATRIX         &A,
  
                                   // 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
 };
 

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.