From: wolf Date: Mon, 21 Oct 2002 14:37:57 +0000 (+0000) Subject: Add this-> in many places where two-stage name lookup requires them. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d4a6ee40142d5e50276f3ab7e87077bdf0ce098b;p=dealii-svn.git Add this-> in many places where two-stage name lookup requires them. git-svn-id: https://svn.dealii.org/trunk@6698 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/include/multigrid/mg_smoother.templates.h b/deal.II/deal.II/include/multigrid/mg_smoother.templates.h index 54671fd5bb..bc6536aa17 100644 --- a/deal.II/deal.II/include/multigrid/mg_smoother.templates.h +++ b/deal.II/deal.II/include/multigrid/mg_smoother.templates.h @@ -42,7 +42,7 @@ MGSmootherRelaxation { h1.reinit(u); h2.reinit(u); - for(unsigned i=0;iget_steps(); ++i) { (*matrix)[level].residual(h1, u, rhs); set_zero_interior_boundary(level,h1); diff --git a/deal.II/deal.II/source/fe/fe.cc b/deal.II/deal.II/source/fe/fe.cc index 7223c5b0b8..3029738e9f 100644 --- a/deal.II/deal.II/source/fe/fe.cc +++ b/deal.II/deal.II/source/fe/fe.cc @@ -475,7 +475,8 @@ compute_2nd (const Mapping &mapping, for (unsigned int k=0; k<=n; ++k) while (nonzero_components[shape_index][component] == false) ++component; - Assert (component < n_components(), ExcInternalError()); + Assert (component < this->n_components(), + ExcInternalError()); right = fe_internal.differences[d1] ->shape_grad_component(shape_index, q, component); diff --git a/deal.II/deal.II/source/fe/fe_dgp_nonparametric.cc b/deal.II/deal.II/source/fe/fe_dgp_nonparametric.cc index 068c0b361c..debf89db40 100644 --- a/deal.II/deal.II/source/fe/fe_dgp_nonparametric.cc +++ b/deal.II/deal.II/source/fe/fe_dgp_nonparametric.cc @@ -44,7 +44,7 @@ FE_DGPNonparametric::FE_DGPNonparametric (const unsigned int degree) // since not implemented, set to // "empty" for (unsigned int i=0;i::children_per_cell;++i) - prolongation[i].reinit(0, 0); + this->prolongation[i].reinit(0, 0); // restriction can be defined // through projection for @@ -66,7 +66,7 @@ FE_DGPNonparametric::FE_DGPNonparametric (const unsigned int degree) // since not implemented, set to // "empty" for (unsigned int i=0;i::children_per_cell;++i) - restriction[i].reinit(0, 0); + this->restriction[i].reinit(0, 0); // note further, that these // elements have neither support diff --git a/deal.II/deal.II/source/fe/fe_nedelec.cc b/deal.II/deal.II/source/fe/fe_nedelec.cc index 7372f96276..2dcff50ba8 100644 --- a/deal.II/deal.II/source/fe/fe_nedelec.cc +++ b/deal.II/deal.II/source/fe/fe_nedelec.cc @@ -772,10 +772,10 @@ FE_Nedelec::get_data (const UpdateFlags update_flags, // necessary. otherwise, don't // allocate memory if (flags & update_values) - data->shape_values.reinit (dofs_per_cell, n_q_points); + data->shape_values.reinit (this->dofs_per_cell, n_q_points); if (flags & update_gradients) - data->shape_gradients.reinit (dofs_per_cell, n_q_points); + data->shape_gradients.reinit (this->dofs_per_cell, n_q_points); // if second derivatives through // finite differencing is required, @@ -791,7 +791,7 @@ FE_Nedelec::get_data (const UpdateFlags update_flags, // the unit cell, and need to be // transformed when visiting an // actual cell - for (unsigned int i=0; idofs_per_cell; ++i) for (unsigned int q=0; q::fill_fe_values (const Mapping &mapping, { std::vector > shape_values (n_q_points); - Assert (data.shape_values.n_rows() == dofs_per_cell * dim, + Assert (data.shape_values.n_rows() == this->dofs_per_cell * dim, ExcInternalError()); Assert (data.shape_values.n_cols() == n_q_points, ExcInternalError()); - for (unsigned int k=0; kdofs_per_cell; ++k) { // first transform shape // values... @@ -880,7 +880,7 @@ FE_Nedelec::fill_fe_values (const Mapping &mapping, std::vector > shape_grads1 (n_q_points); std::vector > shape_grads2 (n_q_points); - Assert (data.shape_gradients.n_rows() == dofs_per_cell * dim, + Assert (data.shape_gradients.n_rows() == this->dofs_per_cell * dim, ExcInternalError()); Assert (data.shape_gradients.n_cols() == n_q_points, ExcInternalError()); @@ -890,7 +890,7 @@ FE_Nedelec::fill_fe_values (const Mapping &mapping, // gradients of each shape // function at all quadrature // points - for (unsigned int k=0; kdofs_per_cell; ++k) { // treat the gradients of // this particular shape @@ -993,7 +993,7 @@ FE_Nedelec::fill_fe_face_values (const Mapping &mapp Assert (data.shape_values.n_cols() == n_q_points, ExcInternalError()); - for (unsigned int k=0; kdofs_per_cell; ++k) { // first transform shape // values... @@ -1021,7 +1021,7 @@ FE_Nedelec::fill_fe_face_values (const Mapping &mapp std::vector > shape_grads1 (n_q_points); std::vector > shape_grads2 (n_q_points); - Assert (data.shape_gradients.n_rows() == dofs_per_cell * dim, + Assert (data.shape_gradients.n_rows() == this->dofs_per_cell * dim, ExcInternalError()); Assert (data.shape_gradients.n_cols() == n_q_points, ExcInternalError()); @@ -1031,7 +1031,7 @@ FE_Nedelec::fill_fe_face_values (const Mapping &mapp // gradients of each shape // function at all quadrature // points - for (unsigned int k=0; kdofs_per_cell; ++k) { // treat the gradients of // this particular shape @@ -1131,12 +1131,12 @@ FE_Nedelec::fill_fe_subface_values (const Mapping &m std::vector > shape_values (n_q_points); - Assert (data.shape_values.n_rows() == dofs_per_cell * dim, + Assert (data.shape_values.n_rows() == this->dofs_per_cell * dim, ExcInternalError()); Assert (data.shape_values.n_cols() == n_q_points, ExcInternalError()); - for (unsigned int k=0; kdofs_per_cell; ++k) { // first transform shape // values... @@ -1164,7 +1164,7 @@ FE_Nedelec::fill_fe_subface_values (const Mapping &m std::vector > shape_grads1 (n_q_points); std::vector > shape_grads2 (n_q_points); - Assert (data.shape_gradients.n_rows() == dofs_per_cell * dim, + Assert (data.shape_gradients.n_rows() == this->dofs_per_cell * dim, ExcInternalError()); Assert (data.shape_gradients.n_cols() == n_q_points, ExcInternalError()); @@ -1174,7 +1174,7 @@ FE_Nedelec::fill_fe_subface_values (const Mapping &m // gradients of each shape // function at all quadrature // points - for (unsigned int k=0; kdofs_per_cell; ++k) { // treat the gradients of // this particular shape diff --git a/deal.II/deal.II/source/fe/fe_system.cc b/deal.II/deal.II/source/fe/fe_system.cc index cc1fa8f310..5c62750b3f 100644 --- a/deal.II/deal.II/source/fe/fe_system.cc +++ b/deal.II/deal.II/source/fe/fe_system.cc @@ -284,7 +284,7 @@ FESystem::shape_value_component (const unsigned int i, // if this value is supposed to be // zero, then return right away... - if (nonzero_components[i][component] == false) + if (this->nonzero_components[i][component] == false) return 0; // ...otherwise: first find out to @@ -336,7 +336,7 @@ FESystem::shape_grad_component (const unsigned int i, // if this value is supposed to be // zero, then return right away... - if (nonzero_components[i][component] == false) + if (this->nonzero_components[i][component] == false) return Tensor<1,dim>(); // ...otherwise: first find out to @@ -388,7 +388,7 @@ FESystem::shape_grad_grad_component (const unsigned int i, // if this value is supposed to be // zero, then return right away... - if (nonzero_components[i][component] == false) + if (this->nonzero_components[i][component] == false) return Tensor<2,dim>(); // ...otherwise: first find out to @@ -769,7 +769,7 @@ compute_fill (const Mapping &mapping, if (this->system_to_base_table[system_index].first.first == base_no) { const unsigned int - base_index = system_to_base_table[system_index].second; + base_index = this->system_to_base_table[system_index].second; Assert (base_index #include -//#include - +#include #include #include + template void MGTools::make_sparsity_pattern (const MGDoFHandler &dof, SparsityPattern &sparsity, @@ -376,15 +376,15 @@ MGTools::reinit_vector (const MGDoFHandler& mg_dof, template void MGTools::reinit_vector (const MGDoFHandler& mg_dof, - MGLevelObject >& v, - const std::vector& selected) + MGLevelObject >& v, + const std::vector& selected) { const unsigned int ncomp = mg_dof.get_fe().n_components(); if (selected.size() == 0) { selected.resize(ncomp); - fill_n (selected.begin(), ncomp, true); + std::fill_n (selected.begin(), ncomp, true); } Assert (selected.size() == ncomp, diff --git a/deal.II/deal.II/source/numerics/time_dependent.cc b/deal.II/deal.II/source/numerics/time_dependent.cc index 64e08aae1f..7e313ed397 100644 --- a/deal.II/deal.II/source/numerics/time_dependent.cc +++ b/deal.II/deal.II/source/numerics/time_dependent.cc @@ -418,6 +418,7 @@ TimeStepBase_Tria::TimeStepBase_Tria() : TimeStepBase (0), tria (0), coarse_grid (0), + flags (), refinement_flags(0) { Assert (false, ExcPureVirtualFunctionCalled()); diff --git a/deal.II/lac/include/lac/solver_cg.h b/deal.II/lac/include/lac/solver_cg.h index d712f34a4e..a1aa8ea1ee 100644 --- a/deal.II/lac/include/lac/solver_cg.h +++ b/deal.II/lac/include/lac/solver_cg.h @@ -240,10 +240,10 @@ SolverCG::solve (const MATRIX &A, conv = this->control().check(0,res); if (conv) { - memory.free(Vr); - memory.free(Vp); - memory.free(Vz); - memory.free(VAp); + this->memory.free(Vr); + this->memory.free(Vp); + this->memory.free(Vz); + this->memory.free(VAp); deallog.pop(); return; }; @@ -287,10 +287,10 @@ SolverCG::solve (const MATRIX &A, // Deallocate Memory - memory.free(Vr); - memory.free(Vp); - memory.free(Vz); - memory.free(VAp); + this->memory.free(Vr); + this->memory.free(Vp); + this->memory.free(Vz); + this->memory.free(VAp); // Output deallog.pop(); diff --git a/deal.II/lac/include/lac/solver_gmres.h b/deal.II/lac/include/lac/solver_gmres.h index 0761c891fe..59ead308cf 100644 --- a/deal.II/lac/include/lac/solver_gmres.h +++ b/deal.II/lac/include/lac/solver_gmres.h @@ -354,7 +354,7 @@ SolverGMRES::solve (const MATRIX &A, // Generate an object where basis // vectors are stored. - TmpVectors tmp_vectors (n_tmp_vectors, memory); + TmpVectors tmp_vectors (n_tmp_vectors, this->memory); // number of the present iteration; this // number is not reset to zero upon a @@ -420,7 +420,7 @@ unsigned int dim = 0; // check here, the next scaling // operation would produce // garbage - iteration_state = control().check (accumulated_iterations, rho); + iteration_state = this->control().check (accumulated_iterations, rho); if (iteration_state != SolverControl::iterate) break; @@ -488,7 +488,7 @@ unsigned int dim = 0; /* residual */ rho = fabs(gamma(dim)); - iteration_state = control().check (accumulated_iterations, rho); + iteration_state = this->control().check (accumulated_iterations, rho); }; // end of inner iteration. now @@ -524,9 +524,9 @@ unsigned int dim = 0; 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_minres.h b/deal.II/lac/include/lac/solver_minres.h index d87aca8efa..d9e5b806ed 100644 --- a/deal.II/lac/include/lac/solver_minres.h +++ b/deal.II/lac/include/lac/solver_minres.h @@ -191,13 +191,13 @@ SolverMinRes::solve (const MATRIX &A, // Memory allocation - Vu0 = memory.alloc(); - Vu1 = memory.alloc(); - Vu2 = memory.alloc(); - Vv = memory.alloc(); - Vm0 = memory.alloc(); - Vm1 = memory.alloc(); - Vm2 = memory.alloc(); + Vu0 = this->memory.alloc(); + Vu1 = this->memory.alloc(); + Vu2 = this->memory.alloc(); + Vv = this->memory.alloc(); + Vm0 = this->memory.alloc(); + Vm1 = this->memory.alloc(); + Vm2 = this->memory.alloc(); // define some aliases for simpler access typedef VECTOR vecref; vecref u[3] = {*Vu0, *Vu1, *Vu2}; @@ -257,7 +257,7 @@ SolverMinRes::solve (const MATRIX &A, m[1].reinit(VS); m[2].reinit(VS); - conv = control().check(0,r_l2); + conv = this->control().check(0,r_l2); while (conv==SolverControl::iterate) { @@ -313,7 +313,7 @@ SolverMinRes::solve (const MATRIX &A, x.add (tau, m[0]); r_l2 *= fabs(s); - conv = control().check(j,r_l2); + conv = this->control().check(j,r_l2); // next iteration step ++j; @@ -345,21 +345,21 @@ SolverMinRes::solve (const MATRIX &A, } // Deallocation of Memory - memory.free(Vu0); - memory.free(Vu1); - memory.free(Vu2); - memory.free(Vv); - memory.free(Vm0); - memory.free(Vm1); - memory.free(Vm2); + this->memory.free(Vu0); + this->memory.free(Vu1); + this->memory.free(Vu2); + this->memory.free(Vv); + this->memory.free(Vm0); + this->memory.free(Vm1); + this->memory.free(Vm2); // 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 };