]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Add this-> in many places where two-stage name lookup requires them.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 21 Oct 2002 14:37:57 +0000 (14:37 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 21 Oct 2002 14:37:57 +0000 (14:37 +0000)
git-svn-id: https://svn.dealii.org/trunk@6698 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/multigrid/mg_smoother.templates.h
deal.II/deal.II/source/fe/fe.cc
deal.II/deal.II/source/fe/fe_dgp_nonparametric.cc
deal.II/deal.II/source/fe/fe_nedelec.cc
deal.II/deal.II/source/fe/fe_system.cc
deal.II/deal.II/source/multigrid/mg_dof_tools.cc
deal.II/deal.II/source/numerics/time_dependent.cc
deal.II/lac/include/lac/solver_cg.h
deal.II/lac/include/lac/solver_gmres.h
deal.II/lac/include/lac/solver_minres.h

index 54671fd5bbef7f3db3ab3b14b8f40dcbff1dae26..bc6536aa17701739c31aadd52822ad4d107a5d3d 100644 (file)
@@ -42,7 +42,7 @@ MGSmootherRelaxation<MATRIX, VECTOR>
 {
   h1.reinit(u);
   h2.reinit(u);
-  for(unsigned i=0;i<get_steps();++i)
+  for(unsigned i=0; i<this->get_steps(); ++i)
     {
       (*matrix)[level].residual(h1, u, rhs);
       set_zero_interior_boundary(level,h1);
index 7223c5b0b8235fcf73f7f45497e5f5d5a84cef91..3029738e9f4e57c2cafe9facc222281c4f06f985 100644 (file)
@@ -475,7 +475,8 @@ compute_2nd (const Mapping<dim>                   &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);
index 068c0b361c95e93663343fa81519b271a69fe2a7..debf89db4017b5602c3072fe388f4c4c4c19ad22 100644 (file)
@@ -44,7 +44,7 @@ FE_DGPNonparametric<dim>::FE_DGPNonparametric (const unsigned int degree)
                                    // since not implemented, set to
                                    // "empty"
   for (unsigned int i=0;i<GeometryInfo<dim>::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<dim>::FE_DGPNonparametric (const unsigned int degree)
                                    // since not implemented, set to
                                    // "empty"
   for (unsigned int i=0;i<GeometryInfo<dim>::children_per_cell;++i)
-    restriction[i].reinit(0, 0);
+    this->restriction[i].reinit(0, 0);
 
                                    // note further, that these
                                    // elements have neither support
index 7372f96276fec7d1d6e7f8fa2dfb5b75f401379b..2dcff50ba819bc9d35925e72d23dc75287583c5c 100644 (file)
@@ -772,10 +772,10 @@ FE_Nedelec<dim>::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<dim>::get_data (const UpdateFlags      update_flags,
                                   // the unit cell, and need to be
                                   // transformed when visiting an
                                   // actual cell
-   for (unsigned int i=0; i<dofs_per_cell; ++i)
+   for (unsigned int i=0; i<this->dofs_per_cell; ++i)
      for (unsigned int q=0; q<n_q_points; ++q)
        {
         if (flags & update_values)
@@ -851,12 +851,12 @@ FE_Nedelec<dim>::fill_fe_values (const Mapping<dim>                   &mapping,
     {
       std::vector<Tensor<1,dim> > 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; k<dofs_per_cell; ++k)
+      for (unsigned int k=0; k<this->dofs_per_cell; ++k)
        {
                                           // first transform shape
                                           // values...
@@ -880,7 +880,7 @@ FE_Nedelec<dim>::fill_fe_values (const Mapping<dim>                   &mapping,
       std::vector<Tensor<2,dim> > shape_grads1 (n_q_points);
       std::vector<Tensor<2,dim> > 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<dim>::fill_fe_values (const Mapping<dim>                   &mapping,
                                        // gradients of each shape
                                        // function at all quadrature
                                        // points
-      for (unsigned int k=0; k<dofs_per_cell; ++k)
+      for (unsigned int k=0; k<this->dofs_per_cell; ++k)
        {
                                            // treat the gradients of
                                            // this particular shape
@@ -993,7 +993,7 @@ FE_Nedelec<dim>::fill_fe_face_values (const Mapping<dim>                   &mapp
       Assert (data.shape_values.n_cols() == n_q_points,
              ExcInternalError());
       
-      for (unsigned int k=0; k<dofs_per_cell; ++k)
+      for (unsigned int k=0; k<this->dofs_per_cell; ++k)
        {
                                           // first transform shape
                                           // values...
@@ -1021,7 +1021,7 @@ FE_Nedelec<dim>::fill_fe_face_values (const Mapping<dim>                   &mapp
       std::vector<Tensor<2,dim> > shape_grads1 (n_q_points);
       std::vector<Tensor<2,dim> > 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<dim>::fill_fe_face_values (const Mapping<dim>                   &mapp
                                        // gradients of each shape
                                        // function at all quadrature
                                        // points
-      for (unsigned int k=0; k<dofs_per_cell; ++k)
+      for (unsigned int k=0; k<this->dofs_per_cell; ++k)
        {
                                            // treat the gradients of
                                            // this particular shape
@@ -1131,12 +1131,12 @@ FE_Nedelec<dim>::fill_fe_subface_values (const Mapping<dim>                   &m
       
       std::vector<Tensor<1,dim> > 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; k<dofs_per_cell; ++k)
+      for (unsigned int k=0; k<this->dofs_per_cell; ++k)
        {
                                           // first transform shape
                                           // values...
@@ -1164,7 +1164,7 @@ FE_Nedelec<dim>::fill_fe_subface_values (const Mapping<dim>                   &m
       std::vector<Tensor<2,dim> > shape_grads1 (n_q_points);
       std::vector<Tensor<2,dim> > 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<dim>::fill_fe_subface_values (const Mapping<dim>                   &m
                                        // gradients of each shape
                                        // function at all quadrature
                                        // points
-      for (unsigned int k=0; k<dofs_per_cell; ++k)
+      for (unsigned int k=0; k<this->dofs_per_cell; ++k)
        {
                                            // treat the gradients of
                                            // this particular shape
index cc1fa8f31081ec5a820b78409670393388723670..5c62750b3f95cfc59893fb2351b27f195ab9424a 100644 (file)
@@ -284,7 +284,7 @@ FESystem<dim>::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<dim>::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<dim>::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<dim>                   &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<base_fe.dofs_per_cell, ExcInternalError());
 
                                                  // now copy. if the
index 1886960bb5e4ba5d9d92a09a61898f9031b99873..0efff8dd00e85eff541f6340202562042b732cd1 100644 (file)
 #include <dofs/dof_tools.h>
 #include <fe/fe.h>
 
-//#include <multigrid/mg_tools.templates.h>
-
+#include <vector>
 #include <algorithm>
 #include <numeric>
 
+
 template <int dim, class SparsityPattern>
 void MGTools::make_sparsity_pattern (const MGDoFHandler<dim> &dof,
                                        SparsityPattern         &sparsity,
@@ -376,15 +376,15 @@ MGTools::reinit_vector (const MGDoFHandler<dim>& mg_dof,
 template<int dim, typename number>
 void
 MGTools::reinit_vector (const MGDoFHandler<dim>& mg_dof,
-                          MGLevelObject<BlockVector<number> >& v,
-                          const std::vector<bool>& selected)
+                        MGLevelObject<BlockVector<number> >& v,
+                        const std::vector<bool>& 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,
index 64e08aae1fa09461a0b5984a3894dcad43e559ab..7e313ed397484ce2c32e57bb215951fec843a284 100644 (file)
@@ -418,6 +418,7 @@ TimeStepBase_Tria<dim>::TimeStepBase_Tria() :
                TimeStepBase (0),
                tria (0),
                coarse_grid (0),
+                flags (),
                refinement_flags(0)
 {
   Assert (false, ExcPureVirtualFunctionCalled());
index d712f34a4eafc2946b88fc7141dc8c0a57cb6554..a1aa8ea1ee5154d8ed8a1cd19cdf44d9f16b5f55 100644 (file)
@@ -240,10 +240,10 @@ SolverCG<VECTOR>::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<VECTOR>::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();
index 0761c891fee708b3d8a5f9ae8610ce688ffa79db..59ead308cf2e91dcc7d50cf7d0f0c5f28744d3c6 100644 (file)
@@ -354,7 +354,7 @@ SolverGMRES<VECTOR>::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
 };
 
index d87aca8efa8ef4b67b023b576b26b217e6aa4f62..d9e5b806edaf829e3c947c368bcb092359e6359e 100644 (file)
@@ -191,13 +191,13 @@ SolverMinRes<VECTOR>::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<VECTOR>::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<VECTOR>::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<VECTOR>::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
 };
 

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.