From 1c1c33e45eed5a20ef179f4c7314b62d6978e4b8 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Fri, 4 Nov 2016 14:16:13 -0600 Subject: [PATCH] Rename some variables. There are variables of the same name in the base class. Avoid the confusion of having similarly named variables in the local scope. --- source/fe/fe_q_base.cc | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/source/fe/fe_q_base.cc b/source/fe/fe_q_base.cc index f8f9e64194..3e0da20bc4 100644 --- a/source/fe/fe_q_base.cc +++ b/source/fe/fe_q_base.cc @@ -1357,7 +1357,7 @@ FE_Q_Base this->dofs_per_cell) return this->restriction[refinement_case-1][child]; - FullMatrix restriction(this->dofs_per_cell, this->dofs_per_cell); + FullMatrix my_restriction(this->dofs_per_cell, this->dofs_per_cell); // distinguish q/q_dg0 case const unsigned int q_dofs_per_cell = Utilities::fixed_power(q_degree+1); @@ -1386,7 +1386,7 @@ FE_Q_Base const unsigned int dofs1d = q_degree+1; std::vector > evaluations1d (dofs1d); - restriction.reinit(this->dofs_per_cell, this->dofs_per_cell); + my_restriction.reinit(this->dofs_per_cell, this->dofs_per_cell); for (unsigned int i=0; i const unsigned int child_dof = index_map_inverse[j+jj]; if (std::fabs (val-1.) < eps) - restriction(mother_dof,child_dof)=1.; + my_restriction(mother_dof,child_dof)=1.; else if (std::fabs(val) > eps) - restriction(mother_dof,child_dof)=val; + my_restriction(mother_dof,child_dof)=val; sum_check += val; } FE_Q_Helper::increment_indices (j_indices, dofs1d); @@ -1453,13 +1453,14 @@ FE_Q_Base // part for FE_Q_DG0 if (q_dofs_per_cell < this->dofs_per_cell) - restriction(this->dofs_per_cell-1,this->dofs_per_cell-1) = + my_restriction(this->dofs_per_cell-1,this->dofs_per_cell-1) = 1./GeometryInfo::n_children(RefinementCase(refinement_case)); } - // swap matrices - restriction.swap(const_cast &> - (this->restriction[refinement_case-1][child])); + // swap the just computed restriction matrix into the + // element of the vector stored in the base class + my_restriction.swap(const_cast &> + (this->restriction[refinement_case-1][child])); } return this->restriction[refinement_case-1][child]; -- 2.39.5