From: guido Date: Mon, 10 Mar 2003 14:39:42 +0000 (+0000) Subject: this-> added X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b050ab33a2784a9a329b5431c1a4dfb1f7e86422;p=dealii-svn.git this-> added git-svn-id: https://svn.dealii.org/trunk@7290 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/include/numerics/dof_print_solver_step.h b/deal.II/deal.II/include/numerics/dof_print_solver_step.h index 1dfaff68e8..de66214a70 100644 --- a/deal.II/deal.II/include/numerics/dof_print_solver_step.h +++ b/deal.II/deal.II/include/numerics/dof_print_solver_step.h @@ -124,7 +124,7 @@ DoFPrintSolverStep::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 diff --git a/deal.II/deal.II/source/multigrid/multigrid.cc b/deal.II/deal.II/source/multigrid/multigrid.cc index 0491b8132e..05c958b057 100644 --- a/deal.II/deal.II/source/multigrid/multigrid.cc +++ b/deal.II/deal.II/source/multigrid/multigrid.cc @@ -86,7 +86,6 @@ void MGTransferPrebuilt::build_matrices ( prolongation_sparsities[level].reinit (sizes[level+1], sizes[level], dofs_per_cell+1); -#endif for (typename MGDoFHandler::cell_iterator cell=mg_dof.begin(level); cell != mg_dof.end(level); ++cell) @@ -123,6 +122,7 @@ void MGTransferPrebuilt::build_matrices ( prolongation_sparsities[level].compress (); prolongation_matrices[level].reinit (prolongation_sparsities[level]); +#endif // now actually build the matrices for (typename MGDoFHandler::cell_iterator cell=mg_dof.begin(level); diff --git a/deal.II/lac/include/lac/eigen.h b/deal.II/lac/include/lac/eigen.h index c4a82c3479..85db6bbd77 100644 --- a/deal.II/lac/include/lac/eigen.h +++ b/deal.II/lac/include/lac/eigen.h @@ -206,8 +206,8 @@ EigenPower::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::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::solve (double &value, ReductionControl inner_control (A.m(), 1.e-16, 1.e-8, false, false); PreconditionIdentity prec; SolverCG - 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::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 } diff --git a/deal.II/lac/include/lac/solver_qmrs.h b/deal.II/lac/include/lac/solver_qmrs.h index 7a30d4753c..ea60a59905 100644 --- a/deal.II/lac/include/lac/solver_qmrs.h +++ b/deal.II/lac/include/lac/solver_qmrs.h @@ -231,11 +231,11 @@ SolverQMRS::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::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::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::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;