From d993a3ebb1eb99b2f4ea2ea66610fdebee0bd2aa Mon Sep 17 00:00:00 2001 From: wolf Date: Mon, 27 May 2002 07:00:05 +0000 Subject: [PATCH] Fix some more of these nasty two-stage-lookup problems that we have w.r.t. the C++ standard since gcc (and other compilers) don't implement the standard properly. git-svn-id: https://svn.dealii.org/trunk@5876 0785d39b-7218-0410-832d-ea1e28bc413d --- .../include/grid/tria_accessor.templates.h | 12 ++--- .../include/grid/tria_iterator.templates.h | 52 +++++++++---------- deal.II/lac/include/lac/precondition.h | 24 ++++----- deal.II/lac/include/lac/solver_cg.h | 12 ++--- 4 files changed, 50 insertions(+), 50 deletions(-) diff --git a/deal.II/deal.II/include/grid/tria_accessor.templates.h b/deal.II/deal.II/include/grid/tria_accessor.templates.h index 802d7b7c8c..b270bb2be9 100644 --- a/deal.II/deal.II/include/grid/tria_accessor.templates.h +++ b/deal.II/deal.II/include/grid/tria_accessor.templates.h @@ -165,7 +165,7 @@ TriaObjectAccessor<1,dim>::child (const unsigned int i) const Assert (i<2, ExcIndexRange(i,0,2)); TriaIterator > - 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::ExcUnusedCellAsChild()); @@ -322,7 +322,7 @@ TriaObjectAccessor<2,dim>::line (const unsigned int i) const return TriaIterator > ( - 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 > - 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::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 >(tria, -1, -1, 0); + return TriaIterator >(this->tria, -1, -1, 0); }; @@ -547,7 +547,7 @@ TriaObjectAccessor<3,dim>::quad (const unsigned int i) const return TriaIterator > ( - 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 > q (tria, this->present_level+1, child_index (i)); + TriaIterator > q (this->tria, this->present_level+1, child_index (i)); Assert ((q.state() == IteratorState::past_the_end) || q->used(), typename TriaAccessor::ExcUnusedCellAsChild()); diff --git a/deal.II/deal.II/include/grid/tria_iterator.templates.h b/deal.II/deal.II/include/grid/tria_iterator.templates.h index 3c7af91d6d..a9132d6403 100644 --- a/deal.II/deal.II/include/grid/tria_iterator.templates.h +++ b/deal.II/deal.II/include/grid/tria_iterator.templates.h @@ -135,8 +135,8 @@ TriaIterator::TriaIterator (const TriaRawIterator &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::TriaIterator (Triangulation *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 inline TriaIterator & TriaIterator::operator = (const TriaIterator &i) { - accessor.copy_from (i.accessor); + this->accessor.copy_from (i.accessor); return *this; }; @@ -177,7 +177,7 @@ template inline TriaIterator & TriaIterator::operator = (const TriaRawIterator &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::operator = (const TriaRawIterator &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 inline TriaIterator & TriaIterator::operator ++ () { while (TriaRawIterator::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 & TriaIterator::operator -- () { while (TriaRawIterator::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::TriaActiveIterator (const TriaRawIteratorstate() != IteratorState::past_the_end) + Assert (this->accessor.has_children()==false, ExcAssignmentOfInactiveObject()); #endif }; @@ -283,8 +283,8 @@ TriaActiveIterator::TriaActiveIterator (const TriaIteratorstate() != IteratorState::past_the_end) + Assert (this->accessor.has_children()==false, ExcAssignmentOfInactiveObject()); #endif }; @@ -305,8 +305,8 @@ TriaActiveIterator::TriaActiveIterator (Triangulation *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 inline TriaActiveIterator & TriaActiveIterator::operator = (const TriaActiveIterator &i) { - accessor.copy_from (i.accessor); + this->accessor.copy_from (i.accessor); return *this; }; @@ -325,7 +325,7 @@ template inline TriaActiveIterator & TriaActiveIterator::operator = (const TriaRawIterator &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::operator = (const TriaRawIteratorstate() != IteratorState::past_the_end) Assert (accessor.used() && accessor.has_children()==false, ExcAssignmentOfInactiveObject()); #endif @@ -345,7 +345,7 @@ template inline TriaActiveIterator & TriaActiveIterator::operator = (const TriaIterator &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::operator = (const TriaIterator & // 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 & TriaActiveIterator::operator ++ () { while (TriaIterator::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 & TriaActiveIterator::operator -- () { while (TriaIterator::operator--(), - (state() == IteratorState::valid)) - if (accessor.has_children() == false) + (this->state() == IteratorState::valid)) + if (this->accessor.has_children() == false) return *this; return *this; }; diff --git a/deal.II/lac/include/lac/precondition.h b/deal.II/lac/include/lac/precondition.h index c7b6211520..82ce6a09d7 100644 --- a/deal.II/lac/include/lac/precondition.h +++ b/deal.II/lac/include/lac/precondition.h @@ -544,8 +544,8 @@ template inline void PreconditionJacobi::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 inline void PreconditionJacobi::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 inline void PreconditionSOR::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 inline void PreconditionSOR::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 inline void PreconditionSSOR::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 inline void PreconditionSSOR::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); } diff --git a/deal.II/lac/include/lac/solver_cg.h b/deal.II/lac/include/lac/solver_cg.h index 56c8aea6c3..dd48289f34 100644 --- a/deal.II/lac/include/lac/solver_cg.h +++ b/deal.II/lac/include/lac/solver_cg.h @@ -204,7 +204,7 @@ SolverCG::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::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::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::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 }; -- 2.39.5