From 27b62f7ec0eddbabfef2963f8213d9ffab78d2f8 Mon Sep 17 00:00:00 2001 From: hartmann Date: Thu, 18 Mar 2004 15:14:41 +0000 Subject: [PATCH] Add some missing this-> git-svn-id: https://svn.dealii.org/trunk@8822 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/deal.II/source/fe/fe_dgp.cc | 4 +- deal.II/deal.II/source/fe/fe_dgq.cc | 12 ++-- deal.II/deal.II/source/fe/fe_q.cc | 62 +++++++++---------- .../deal.II/source/fe/fe_q_hierarchical.cc | 45 +++++++------- 4 files changed, 62 insertions(+), 61 deletions(-) diff --git a/deal.II/deal.II/source/fe/fe_dgp.cc b/deal.II/deal.II/source/fe/fe_dgp.cc index c833fc630a..08f83e11e9 100644 --- a/deal.II/deal.II/source/fe/fe_dgp.cc +++ b/deal.II/deal.II/source/fe/fe_dgp.cc @@ -89,7 +89,7 @@ FE_DGP::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 FiniteElement * FE_DGP::clone() const { - return new FE_DGP(degree); + return new FE_DGP(this->degree); } diff --git a/deal.II/deal.II/source/fe/fe_dgq.cc b/deal.II/deal.II/source/fe/fe_dgq.cc index a55ec58c91..dd82396ff2 100644 --- a/deal.II/deal.II/source/fe/fe_dgq.cc +++ b/deal.II/deal.II/source/fe/fe_dgq.cc @@ -334,7 +334,7 @@ FE_DGQ::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 FiniteElement * FE_DGQ::clone() const { - return new FE_DGQ(degree); + return new FE_DGQ(this->degree); } @@ -375,7 +375,7 @@ void FE_DGQ::rotate_indices (std::vector &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 &x_source_fe, for (unsigned int j=0; jdegree,1U)*dim, ExcInternalError()); } } @@ -550,7 +550,7 @@ FE_DGQ::has_support_on_face (const unsigned int shape_index, Assert (face_index < GeometryInfo::faces_per_cell, ExcIndexRange (face_index, 0, GeometryInfo::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::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; diff --git a/deal.II/deal.II/source/fe/fe_q.cc b/deal.II/deal.II/source/fe/fe_q.cc index 755a56d2ee..d925e7cde3 100644 --- a/deal.II/deal.II/source/fe/fe_q.cc +++ b/deal.II/deal.II/source/fe/fe_q.cc @@ -466,7 +466,7 @@ FE_Q::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 FiniteElement * FE_Q::clone() const { - return new FE_Q(degree); + return new FE_Q(this->degree); } @@ -565,7 +565,7 @@ get_interpolation_matrix (const FiniteElementBase &x_source_fe, for (unsigned int j=0; jdegree*dim, ExcInternalError()); } } @@ -581,22 +581,22 @@ template void FE_Q::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; idegree+1; this->unit_support_points.resize(n); const std::vector &index_map_inverse= this->poly_space.get_numbering_inverse(); - const double step = 1./degree; + const double step = 1./this->degree; Point 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::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; idegree+1; this->unit_face_support_points.resize(n); const std::vector &face_index_map_inverse= FE_Q_Helper::invert_numbering(face_index_map); - const double step = 1./degree; + const double step = 1./this->degree; Point 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 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 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::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::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::initialize_embedding () // here for (unsigned int i=0; idofs_per_cell; ++i) for (unsigned int j=0; jdofs_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::initialize_embedding () double sum = 0; for (unsigned int col=0; coldofs_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::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::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; jdofs_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::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; jdofs_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 diff --git a/deal.II/deal.II/source/fe/fe_q_hierarchical.cc b/deal.II/deal.II/source/fe/fe_q_hierarchical.cc index 1054eb7e3a..ee4f90b8c5 100644 --- a/deal.II/deal.II/source/fe/fe_q_hierarchical.cc +++ b/deal.II/deal.II/source/fe/fe_q_hierarchical.cc @@ -108,7 +108,7 @@ FE_Q_Hierarchical::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 FiniteElement * FE_Q_Hierarchical::clone() const { - return new FE_Q_Hierarchical(degree); + return new FE_Q_Hierarchical(this->degree); } @@ -197,6 +197,7 @@ FE_Q_Hierarchical:: initialize_constraints (const std::vector > &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 void FE_Q_Hierarchical::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; idegree+1; this->unit_support_points.resize(n); @@ -466,9 +467,9 @@ void FE_Q_Hierarchical::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::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; idegree+1; this->unit_face_support_points.resize(n); Point 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 std::vector FE_Q_Hierarchical::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::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 embedding_dofs (this->dofs_per_cell); for (unsigned int i=0; idofs_per_cell; ++i) @@ -1035,7 +1036,7 @@ FE_Q_Hierarchical::get_embedding_dofs (const unsigned int sub_degree) const const unsigned int line = (i - GeometryInfo::vertices_per_cell - j) / (sub_degree-1); embedding_dofs[i] = GeometryInfo::vertices_per_cell + - line * (degree-1) + j; + line * (this->degree-1) + j; } // quad else if (i<(GeometryInfo::vertices_per_cell + @@ -1050,9 +1051,9 @@ FE_Q_Hierarchical::get_embedding_dofs (const unsigned int sub_degree) const GeometryInfo::lines_per_cell * (sub_degree-1) - k * (sub_degree-1) - j) / ( (sub_degree-1) * (sub_degree-1) ); embedding_dofs[i] = GeometryInfo::vertices_per_cell + - GeometryInfo::lines_per_cell * (degree-1) + - face * (degree-1) * (degree-1) + - k * (degree-1) + j; + GeometryInfo::lines_per_cell * (this->degree-1) + + face * (this->degree-1) * (this->degree-1) + + k * (this->degree-1) + j; } // hex else if (i<(GeometryInfo::vertices_per_cell + @@ -1071,9 +1072,9 @@ FE_Q_Hierarchical::get_embedding_dofs (const unsigned int sub_degree) const GeometryInfo::quads_per_cell * (sub_degree-1) * (sub_degree-1) - j - k * (sub_degree-1)) / ( (sub_degree-1) * (sub_degree-1) ); embedding_dofs[i] = GeometryInfo::vertices_per_cell + - GeometryInfo::lines_per_cell * (degree-1) + - GeometryInfo::quads_per_cell * (degree-1) * (degree-1) + - l * (degree-1) * (degree-1) + k * (degree-1) + j; + GeometryInfo::lines_per_cell * (this->degree-1) + + GeometryInfo::quads_per_cell * (this->degree-1) * (this->degree-1) + + l * (this->degree-1) * (this->degree-1) + k * (this->degree-1) + j; } } -- 2.39.5