]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Add some missing this->
authorhartmann <hartmann@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 18 Mar 2004 15:14:41 +0000 (15:14 +0000)
committerhartmann <hartmann@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 18 Mar 2004 15:14:41 +0000 (15:14 +0000)
git-svn-id: https://svn.dealii.org/trunk@8822 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/source/fe/fe_dgp.cc
deal.II/deal.II/source/fe/fe_dgq.cc
deal.II/deal.II/source/fe/fe_q.cc
deal.II/deal.II/source/fe/fe_q_hierarchical.cc

index c833fc630aa58077d79d1a64b21350cdcb9f690a..08f83e11e916db35fb2cda16ec474943e35ee8b9 100644 (file)
@@ -89,7 +89,7 @@ FE_DGP<dim>::get_name () const
   std::ostrstream namebuf;
 #endif
   
-  namebuf << "FE_DGP<" << dim << ">(" << degree << ")";
+  namebuf << "FE_DGP<" << dim << ">(" << this->degree << ")";
 
 #ifndef HAVE_STD_STRINGSTREAM
   namebuf << std::ends;
@@ -103,7 +103,7 @@ template <int dim>
 FiniteElement<dim> *
 FE_DGP<dim>::clone() const
 {
-  return new FE_DGP<dim>(degree);
+  return new FE_DGP<dim>(this->degree);
 }
 
 
index a55ec58c910bf9bb3e867ba9b98d75d6fd8484a8..dd82396ff21ba08c92f66e51b50b2f287ccb8020 100644 (file)
@@ -334,7 +334,7 @@ FE_DGQ<dim>::get_name () const
   std::ostrstream namebuf;
 #endif
   
-  namebuf << "FE_DGQ<" << dim << ">(" << degree << ")";
+  namebuf << "FE_DGQ<" << dim << ">(" << this->degree << ")";
 
 #ifndef HAVE_STD_STRINGSTREAM
   namebuf << std::ends;
@@ -348,7 +348,7 @@ template <int dim>
 FiniteElement<dim> *
 FE_DGQ<dim>::clone() const
 {
-  return new FE_DGQ<dim>(degree);
+  return new FE_DGQ<dim>(this->degree);
 }
 
 
@@ -375,7 +375,7 @@ void
 FE_DGQ<dim>::rotate_indices (std::vector<unsigned int> &numbers,
                             const char                 direction) const
 {
-  const unsigned int n = degree+1;
+  const unsigned int n = this->degree+1;
   unsigned int s = n;
   for (unsigned int i=1;i<dim;++i)
     s *= n;
@@ -528,7 +528,7 @@ get_interpolation_matrix (const FiniteElementBase<dim> &x_source_fe,
       for (unsigned int j=0; j<source_fe.dofs_per_cell; ++j)
         sum += interpolation_matrix(i,j);
 
-      Assert (std::fabs(sum-1) < 5e-14*std::max(degree,1U)*dim,
+      Assert (std::fabs(sum-1) < 5e-14*std::max(this->degree,1U)*dim,
               ExcInternalError());
     }
 }
@@ -550,7 +550,7 @@ FE_DGQ<dim>::has_support_on_face (const unsigned int shape_index,
   Assert (face_index < GeometryInfo<dim>::faces_per_cell,
          ExcIndexRange (face_index, 0, GeometryInfo<dim>::faces_per_cell));
 
-  unsigned int n = degree+1;
+  unsigned int n = this->degree+1;
   unsigned int n2 = n*n;
   
   switch (dim)
@@ -571,7 +571,7 @@ FE_DGQ<dim>::has_support_on_face (const unsigned int shape_index,
     {
       if (face_index==0 && shape_index < n)
        return true;
-      if (face_index==1 && (shape_index % n) == degree)
+      if (face_index==1 && (shape_index % n) == this->degree)
        return true;
       if (face_index==2 && shape_index >= this->dofs_per_cell-n)
        return true;
index 755a56d2ee7e528aacce2e9a96af43f7d8a73c29..d925e7cde30f9ec8080215526545da77ba862765 100644 (file)
@@ -466,7 +466,7 @@ FE_Q<dim>::get_name () const
   std::ostrstream namebuf;
 #endif
   
-  namebuf << "FE_Q<" << dim << ">(" << degree << ")";
+  namebuf << "FE_Q<" << dim << ">(" << this->degree << ")";
 
 #ifndef HAVE_STD_STRINGSTREAM
   namebuf << std::ends;
@@ -480,7 +480,7 @@ template <int dim>
 FiniteElement<dim> *
 FE_Q<dim>::clone() const
 {
-  return new FE_Q<dim>(degree);
+  return new FE_Q<dim>(this->degree);
 }
 
 
@@ -565,7 +565,7 @@ get_interpolation_matrix (const FiniteElementBase<dim> &x_source_fe,
       for (unsigned int j=0; j<source_fe.dofs_per_cell; ++j)
         sum += interpolation_matrix(i,j);
 
-      Assert (std::fabs(sum-1) < 2e-14*degree*dim,
+      Assert (std::fabs(sum-1) < 2e-14*this->degree*dim,
               ExcInternalError());
     }
 }
@@ -581,22 +581,22 @@ template <int dim>
 void FE_Q<dim>::initialize_unit_support_points ()
 {
                                   // number of points: (degree+1)^dim
-  unsigned int n = degree+1;
+  unsigned int n = this->degree+1;
   for (unsigned int i=1; i<dim; ++i)
-    n *= degree+1;
+    n *= this->degree+1;
   
   this->unit_support_points.resize(n);
 
   const std::vector<unsigned int> &index_map_inverse=
     this->poly_space.get_numbering_inverse();
   
-  const double step = 1./degree;
+  const double step = 1./this->degree;
   Point<dim> p;
   
   unsigned int k=0;
-  for (unsigned int iz=0; iz <= ((dim>2) ? degree : 0) ; ++iz)
-    for (unsigned int iy=0; iy <= ((dim>1) ? degree : 0) ; ++iy)
-      for (unsigned int ix=0; ix<=degree; ++ix)
+  for (unsigned int iz=0; iz <= ((dim>2) ? this->degree : 0) ; ++iz)
+    for (unsigned int iy=0; iy <= ((dim>1) ? this->degree : 0) ; ++iy)
+      for (unsigned int ix=0; ix<=this->degree; ++ix)
        {
          p(0) = ix * step;
          if (dim>1)
@@ -626,22 +626,22 @@ void FE_Q<dim>::initialize_unit_face_support_points ()
   const unsigned int codim = dim-1;
   
                                   // number of points: (degree+1)^codim
-  unsigned int n = degree+1;
+  unsigned int n = this->degree+1;
   for (unsigned int i=1; i<codim; ++i)
-    n *= degree+1;
+    n *= this->degree+1;
   
   this->unit_face_support_points.resize(n);
 
   const std::vector<unsigned int> &face_index_map_inverse=
     FE_Q_Helper::invert_numbering(face_index_map);
   
-  const double step = 1./degree;
+  const double step = 1./this->degree;
   Point<codim> p;
   
   unsigned int k=0;
-  for (unsigned int iz=0; iz <= ((codim>2) ? degree : 0) ; ++iz)
-    for (unsigned int iy=0; iy <= ((codim>1) ? degree : 0) ; ++iy)
-      for (unsigned int ix=0; ix<=degree; ++ix)
+  for (unsigned int iz=0; iz <= ((codim>2) ? this->degree : 0) ; ++iz)
+    for (unsigned int iy=0; iy <= ((codim>1) ? this->degree : 0) ; ++iy)
+      for (unsigned int ix=0; ix<=this->degree; ++ix)
        {
          p(0) = ix * step;
          if (codim>1)
@@ -1018,7 +1018,7 @@ FE_Q<2>::initialize_constraints ()
                                   // need inside deal.II
   TensorProductPolynomials<dim-1>
     face_polynomials (Polynomials::LagrangeEquidistant::
-                     generate_complete_basis (degree));
+                     generate_complete_basis (this->degree));
   Assert (face_polynomials.n() == this->dofs_per_face, ExcInternalError());
   
   const unsigned int n_small_functions = this->interface_constraints_size()[0];
@@ -1221,11 +1221,11 @@ FE_Q<2>::initialize_constraints ()
                                   // constraint matrices, so make the
                                   // check
   if (dim == 3)
-    if (degree < Matrices::n_constraint_matrices+1)
+    if (this->degree < Matrices::n_constraint_matrices+1)
       {
        FullMatrix<double> x;
        x.TableBase<2,double>::reinit (this->interface_constraints_size());
-       x.fill (Matrices::constraint_matrices[degree-1]);
+       x.fill (Matrices::constraint_matrices[this->degree-1]);
 
        for (unsigned int i=0; i<x.m(); ++i)
          for (unsigned int j=0; j<x.n(); ++j)
@@ -1258,11 +1258,11 @@ FE_Q<3>::initialize_constraints ()
                                    // well, but until this happens we
                                    // rather prefer to go back to the
                                    // precomputed matrices in 3d
-  if (degree < Matrices::n_constraint_matrices+1)
+  if (this->degree < Matrices::n_constraint_matrices+1)
     {
       this->interface_constraints
         .TableBase<2,double>::reinit (this->interface_constraints_size());
-      this->interface_constraints.fill (Matrices::constraint_matrices[degree-1]);
+      this->interface_constraints.fill (Matrices::constraint_matrices[this->degree-1]);
     }
 }
 
@@ -1341,15 +1341,15 @@ FE_Q<dim>::initialize_embedding ()
                                                // growth in
                                                // degree*dim, times a
                                                // small constant.
-             if (std::fabs(cell_value) < 2e-14*degree*dim)
+             if (std::fabs(cell_value) < 2e-14*this->degree*dim)
                cell_interpolation(j, i) = 0.;
              else
                cell_interpolation(j, i) = cell_value;
 
-             if (std::fabs(subcell_value) < 2e-14*degree*dim)
+             if (std::fabs(subcell_value) < 2e-14*this->degree*dim)
                subcell_interpolation(j, i) = 0.;
              else
-               if (std::fabs(subcell_value-1) < 2e-14*degree*dim)
+               if (std::fabs(subcell_value-1) < 2e-14*this->degree*dim)
                  subcell_interpolation(j, i) = 1.;
                else                    
                                                   // we have put our
@@ -1389,7 +1389,7 @@ FE_Q<dim>::initialize_embedding ()
                                         // here
       for (unsigned int i=0; i<this->dofs_per_cell; ++i)
        for (unsigned int j=0; j<this->dofs_per_cell; ++j)
-         if (std::fabs(this->prolongation[child](i,j)) < 2e-14*degree*dim)
+         if (std::fabs(this->prolongation[child](i,j)) < 2e-14*this->degree*dim)
            this->prolongation[child](i,j) = 0.;
 
                                       // and make sure that the row
@@ -1401,7 +1401,7 @@ FE_Q<dim>::initialize_embedding ()
          double sum = 0;
          for (unsigned int col=0; col<this->dofs_per_cell; ++col)
            sum += this->prolongation[child](row,col);
-         Assert (std::fabs(sum-1.) < 2e-14*degree*dim,
+         Assert (std::fabs(sum-1.) < 2e-14*this->degree*dim,
                  ExcInternalError());
        };
     }
@@ -1470,7 +1470,7 @@ FE_Q<dim>::initialize_restriction ()
         {
           const double val
             = this->poly_space.compute_value(mother_dof, p_cell);
-          if (std::fabs (val-1.) < 2e-14*degree*dim)
+          if (std::fabs (val-1.) < 2e-14*this->degree*dim)
                                              // ok, this is the right
                                              // dof
             break;
@@ -1478,14 +1478,14 @@ FE_Q<dim>::initialize_restriction ()
                                              // make sure that all
                                              // other shape functions
                                              // are zero there
-            Assert (std::fabs(val) < 2e-14*degree*dim,
+            Assert (std::fabs(val) < 2e-14*this->degree*dim,
                     ExcInternalError());
         }
                                        // check also the shape
                                        // functions after tat
       for (unsigned int j=mother_dof+1; j<this->dofs_per_cell; ++j)
         Assert (std::fabs (this->poly_space.compute_value(j, p_cell))
-                < 2e-14*degree*dim,
+                < 2e-14*this->degree*dim,
                 ExcInternalError());
 
                                        // then find the children on
@@ -1517,15 +1517,15 @@ FE_Q<dim>::initialize_restriction ()
                 {
                   const double val
                     = this->poly_space.compute_value(child_dof, p_subcell);
-                  if (std::fabs (val-1.) < 2e-14*degree*dim)
+                  if (std::fabs (val-1.) < 2e-14*this->degree*dim)
                     break;
                   else
-                    Assert (std::fabs(val) < 2e-14*degree*dim,
+                    Assert (std::fabs(val) < 2e-14*this->degree*dim,
                             ExcInternalError());
                 }
               for (unsigned int j=child_dof+1; j<this->dofs_per_cell; ++j)
                 Assert (std::fabs (this->poly_space.compute_value(j, p_subcell))
-                        < 2e-14*degree*dim,
+                        < 2e-14*this->degree*dim,
                         ExcInternalError());
 
                                                // so now that we have
index 1054eb7e3a334c1b584a72934388db24a0f9b48a..ee4f90b8c5a793066aa901e5b36560ee152a1b5b 100644 (file)
@@ -108,7 +108,7 @@ FE_Q_Hierarchical<dim>::get_name () const
   std::ostrstream namebuf;
 #endif
   
-  namebuf << "FE_Q_Hierarchical<" << dim << ">(" << degree << ")";
+  namebuf << "FE_Q_Hierarchical<" << dim << ">(" << this->degree << ")";
 
 #ifndef HAVE_STD_STRINGSTREAM
   namebuf << std::ends;
@@ -122,7 +122,7 @@ template <int dim>
 FiniteElement<dim> *
 FE_Q_Hierarchical<dim>::clone() const
 {
-  return new FE_Q_Hierarchical<dim>(degree);
+  return new FE_Q_Hierarchical<dim>(this->degree);
 }
 
 
@@ -197,6 +197,7 @@ FE_Q_Hierarchical<dim>::
 initialize_constraints (const std::vector<FullMatrix<double> > &dofs_subcell)
 {
   const unsigned int dofs_1d = 2*this->dofs_per_vertex + this->dofs_per_line;
+  const unsigned int degree=this->degree;
 
   this->interface_constraints
     .TableBase<2,double>::reinit (this->interface_constraints_size());
@@ -431,9 +432,9 @@ template <int dim>
 void FE_Q_Hierarchical<dim>::initialize_unit_support_points ()
 {
                                   // number of points: (degree+1)^dim
-  unsigned int n = degree+1;
+  unsigned int n = this->degree+1;
   for (unsigned int i=1; i<dim; ++i)
-    n *= degree+1;
+    n *= this->degree+1;
   
   this->unit_support_points.resize(n);
 
@@ -466,9 +467,9 @@ void FE_Q_Hierarchical<dim>::initialize_unit_support_points ()
                                    // FE_Q), so there's not much we
                                    // can do here.
   unsigned int k=0;
-  for (unsigned int iz=0; iz <= ((dim>2) ? degree : 0) ; ++iz)
-    for (unsigned int iy=0; iy <= ((dim>1) ? degree : 0) ; ++iy)
-      for (unsigned int ix=0; ix<=degree; ++ix)
+  for (unsigned int iz=0; iz <= ((dim>2) ? this->degree : 0) ; ++iz)
+    for (unsigned int iy=0; iy <= ((dim>1) ? this->degree : 0) ; ++iy)
+      for (unsigned int ix=0; ix<=this->degree; ++ix)
        {
          if (ix==0)
            p(0) =  0.;
@@ -516,18 +517,18 @@ void FE_Q_Hierarchical<dim>::initialize_unit_face_support_points ()
   const unsigned int codim = dim-1;
   
                                   // number of points: (degree+1)^codim
-  unsigned int n = degree+1;
+  unsigned int n = this->degree+1;
   for (unsigned int i=1; i<codim; ++i)
-    n *= degree+1;
+    n *= this->degree+1;
   
   this->unit_face_support_points.resize(n);
   
   Point<codim> p;
   
   unsigned int k=0;
-  for (unsigned int iz=0; iz <= ((codim>2) ? degree : 0) ; ++iz)
-    for (unsigned int iy=0; iy <= ((codim>1) ? degree : 0) ; ++iy)
-      for (unsigned int ix=0; ix<=degree; ++ix)
+  for (unsigned int iz=0; iz <= ((codim>2) ? this->degree : 0) ; ++iz)
+    for (unsigned int iy=0; iy <= ((codim>1) ? this->degree : 0) ; ++iy)
+      for (unsigned int ix=0; ix<=this->degree; ++ix)
        {
          if (ix==0)
            p(0) =  0.;
@@ -984,8 +985,8 @@ template <int dim>
 std::vector<unsigned int> 
 FE_Q_Hierarchical<dim>::get_embedding_dofs (const unsigned int sub_degree) const
 {
-  Assert ((sub_degree>0) && (sub_degree<=degree),
-         ExcIndexRange(sub_degree, 1, degree));
+  Assert ((sub_degree>0) && (sub_degree<=this->degree),
+         ExcIndexRange(sub_degree, 1, this->degree));
 
   if (dim==1)
     {
@@ -1004,7 +1005,7 @@ FE_Q_Hierarchical<dim>::get_embedding_dofs (const unsigned int sub_degree) const
 
       return embedding_dofs;
     }
-  else if (sub_degree==degree)
+  else if (sub_degree==this->degree)
     {
       std::vector<unsigned int> embedding_dofs (this->dofs_per_cell);
       for (unsigned int i=0; i<this->dofs_per_cell; ++i)
@@ -1035,7 +1036,7 @@ FE_Q_Hierarchical<dim>::get_embedding_dofs (const unsigned int sub_degree) const
              const unsigned int line = (i - GeometryInfo<dim>::vertices_per_cell - j) / (sub_degree-1);
 
              embedding_dofs[i] = GeometryInfo<dim>::vertices_per_cell + 
-                                 line * (degree-1) + j;
+                                 line * (this->degree-1) + j;
            }
                                           // quad
          else if (i<(GeometryInfo<dim>::vertices_per_cell + 
@@ -1050,9 +1051,9 @@ FE_Q_Hierarchical<dim>::get_embedding_dofs (const unsigned int sub_degree) const
                                         GeometryInfo<dim>::lines_per_cell * (sub_degree-1) - k * (sub_degree-1) - j) / ( (sub_degree-1) * (sub_degree-1) );
 
              embedding_dofs[i] = GeometryInfo<dim>::vertices_per_cell + 
-                                 GeometryInfo<dim>::lines_per_cell * (degree-1) +
-                                 face * (degree-1) * (degree-1) +
-                                 k * (degree-1) + j;
+                                 GeometryInfo<dim>::lines_per_cell * (this->degree-1) +
+                                 face * (this->degree-1) * (this->degree-1) +
+                                 k * (this->degree-1) + j;
            }
                                           // hex
          else if (i<(GeometryInfo<dim>::vertices_per_cell + 
@@ -1071,9 +1072,9 @@ FE_Q_Hierarchical<dim>::get_embedding_dofs (const unsigned int sub_degree) const
                                      GeometryInfo<dim>::quads_per_cell * (sub_degree-1) * (sub_degree-1) - j - k * (sub_degree-1)) / ( (sub_degree-1) * (sub_degree-1) );
         
              embedding_dofs[i] = GeometryInfo<dim>::vertices_per_cell + 
-                                 GeometryInfo<dim>::lines_per_cell * (degree-1) +
-                                 GeometryInfo<dim>::quads_per_cell * (degree-1) * (degree-1) +
-                                 l * (degree-1) * (degree-1) + k * (degree-1) + j;
+                                 GeometryInfo<dim>::lines_per_cell * (this->degree-1) +
+                                 GeometryInfo<dim>::quads_per_cell * (this->degree-1) * (this->degree-1) +
+                                 l * (this->degree-1) * (this->degree-1) + k * (this->degree-1) + j;
            }
        }
 

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.