From ee433f424a057dc833e56d94f2c42662bb13a489 Mon Sep 17 00:00:00 2001 From: Peter Munch Date: Mon, 21 Feb 2022 10:30:59 +0100 Subject: [PATCH] Replace present_index by index() in DoFAccessor --- include/deal.II/dofs/dof_accessor.templates.h | 41 +++++++++---------- 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/include/deal.II/dofs/dof_accessor.templates.h b/include/deal.II/dofs/dof_accessor.templates.h index b6f11ba067..2db49b4293 100644 --- a/include/deal.II/dofs/dof_accessor.templates.h +++ b/include/deal.II/dofs/dof_accessor.templates.h @@ -1462,7 +1462,7 @@ DoFAccessor::dof_index( return dealii::internal::DoFAccessorImplementation::Implementation:: get_dof_index(*this->dof_handler, this->level(), - this->present_index, + this->index(), fe_index, i, std::integral_constant()); @@ -1475,8 +1475,10 @@ DoFAccessor::mg_dof_index( const int level, const unsigned int i) const { - return this->dof_handler->template get_dof_index( - level, this->present_index, 0, i); + return this->dof_handler->template get_dof_index(level, + this->index(), + 0, + i); } @@ -1497,7 +1499,7 @@ DoFAccessor::set_dof_index( dealii::internal::DoFAccessorImplementation::Implementation::set_dof_index( *this->dof_handler, this->level(), - this->present_index, + this->index(), fe_index, i, std::integral_constant(), @@ -1515,7 +1517,7 @@ DoFAccessor::n_active_fe_indices() return dealii::internal::DoFAccessorImplementation::Implementation:: n_active_fe_indices(*this->dof_handler, this->level(), - this->present_index, + this->index(), std::integral_constant()); } @@ -1530,7 +1532,7 @@ DoFAccessor::nth_active_fe_index( return dealii::internal::DoFAccessorImplementation::Implementation:: nth_active_fe_index(*this->dof_handler, this->level(), - this->present_index, + this->index(), n, std::integral_constant()); } @@ -1559,7 +1561,7 @@ DoFAccessor::fe_index_is_active( return dealii::internal::DoFAccessorImplementation::Implementation:: fe_index_is_active(*this->dof_handler, this->level(), - this->present_index, + this->index(), fe_index, std::integral_constant()); } @@ -1677,7 +1679,7 @@ DoFAccessor::set_mg_dof_index( const types::global_dof_index index) const { this->dof_handler->template set_dof_index( - level, this->present_index, 0, i, index); + level, this->index(), 0, i, index); } @@ -2629,12 +2631,9 @@ DoFCellAccessor:: const auto dofs_per_cell = this->get_fe().n_dofs_per_cell(); if (dofs_per_cell > 0) { - const types::global_dof_index *cache = - dealii::internal::DoFAccessorImplementation::Implementation:: - get_cache_ptr(this->dof_handler, - this->present_level, - this->present_index, - dofs_per_cell); + const types::global_dof_index *cache = dealii::internal:: + DoFAccessorImplementation::Implementation::get_cache_ptr( + this->dof_handler, this->present_level, this->index(), dofs_per_cell); for (unsigned int i = 0; i < dofs_per_cell; ++i, ++cache) dof_indices[i] = *cache; } @@ -2720,7 +2719,7 @@ DoFCellAccessor::get_dof_values( dealii::internal::DoFAccessorImplementation::Implementation::get_cache_ptr( this->dof_handler, this->present_level, - this->present_index, + this->index(), this->get_fe().n_dofs_per_cell()); dealii::internal::DoFAccessorImplementation::Implementation:: extract_subvector_to(values, @@ -2755,7 +2754,7 @@ DoFCellAccessor::get_dof_values( dealii::internal::DoFAccessorImplementation::Implementation::get_cache_ptr( this->dof_handler, this->present_level, - this->present_index, + this->index(), this->get_fe().n_dofs_per_cell()); constraints.get_dof_values(values, @@ -2789,7 +2788,7 @@ DoFCellAccessor::set_dof_values( dealii::internal::DoFAccessorImplementation::Implementation::get_cache_ptr( this->dof_handler, this->present_level, - this->present_index, + this->index(), this->get_fe().n_dofs_per_cell()); for (unsigned int i = 0; i < this->get_fe().n_dofs_per_cell(); ++i, ++cache) @@ -3016,7 +3015,7 @@ DoFCellAccessor:: const types::global_dof_index *dofs = dealii::internal::DoFAccessorImplementation::Implementation::get_cache_ptr( - this->dof_handler, this->level(), this->present_index, n_dofs); + this->dof_handler, this->level(), this->index(), n_dofs); // distribute cell vector global_destination.add(n_dofs, dofs, local_source_begin); @@ -3048,7 +3047,7 @@ DoFCellAccessor:: const types::global_dof_index *dofs = dealii::internal::DoFAccessorImplementation::Implementation::get_cache_ptr( - this->dof_handler, this->level(), this->present_index, n_dofs); + this->dof_handler, this->level(), this->index(), n_dofs); // distribute cell vector constraints.distribute_local_to_global(local_source_begin, @@ -3083,7 +3082,7 @@ DoFCellAccessor:: const types::global_dof_index *dofs = dealii::internal::DoFAccessorImplementation::Implementation::get_cache_ptr( - this->dof_handler, this->level(), this->present_index, n_dofs); + this->dof_handler, this->level(), this->index(), n_dofs); // distribute cell matrix for (unsigned int i = 0; i < n_dofs; ++i) @@ -3121,7 +3120,7 @@ DoFCellAccessor:: const unsigned int n_dofs = this->get_fe().n_dofs_per_cell(); const types::global_dof_index *dofs = dealii::internal::DoFAccessorImplementation::Implementation::get_cache_ptr( - this->dof_handler, this->level(), this->present_index, n_dofs); + this->dof_handler, this->level(), this->index(), n_dofs); // distribute cell matrices for (unsigned int i = 0; i < n_dofs; ++i) -- 2.39.5