From 7cdacb028ce992bb3704e3dd3432e9aca99daca5 Mon Sep 17 00:00:00 2001 From: Martin Kronbichler Date: Mon, 1 Nov 2021 19:16:09 +0100 Subject: [PATCH] Inline active_cell_index functions --- .../deal.II/grid/tria_accessor.templates.h | 36 +++++++++++++++++++ source/grid/tria_accessor.cc | 36 ------------------- 2 files changed, 36 insertions(+), 36 deletions(-) diff --git a/include/deal.II/grid/tria_accessor.templates.h b/include/deal.II/grid/tria_accessor.templates.h index f19b16feed..b26c6514e9 100644 --- a/include/deal.II/grid/tria_accessor.templates.h +++ b/include/deal.II/grid/tria_accessor.templates.h @@ -3863,6 +3863,42 @@ CellAccessor::is_level_cell() } + +template +inline unsigned int +CellAccessor::active_cell_index() const +{ + Assert(this->is_active(), TriaAccessorExceptions::ExcCellNotActive()); + return this->tria->levels[this->present_level] + ->active_cell_indices[this->present_index]; +} + + + +template +inline types::global_cell_index +CellAccessor::global_active_cell_index() const +{ + Assert(this->used(), TriaAccessorExceptions::ExcCellNotUsed()); + Assert(this->is_active(), + ExcMessage( + "global_active_cell_index() can only be called on active cells!")); + + return this->tria->levels[this->present_level] + ->global_active_cell_indices[this->present_index]; +} + + + +template +inline types::global_cell_index +CellAccessor::global_level_cell_index() const +{ + return this->tria->levels[this->present_level] + ->global_level_cell_indices[this->present_index]; +} + + DEAL_II_NAMESPACE_CLOSE #endif diff --git a/source/grid/tria_accessor.cc b/source/grid/tria_accessor.cc index 16e6858d63..fd7dac0727 100644 --- a/source/grid/tria_accessor.cc +++ b/source/grid/tria_accessor.cc @@ -2123,17 +2123,6 @@ CellAccessor::parent_index() const -template -unsigned int -CellAccessor::active_cell_index() const -{ - Assert(this->is_active(), TriaAccessorExceptions::ExcCellNotActive()); - return this->tria->levels[this->present_level] - ->active_cell_indices[this->present_index]; -} - - - template void CellAccessor::set_active_cell_index( @@ -2156,21 +2145,6 @@ CellAccessor::set_global_active_cell_index( -template -inline types::global_cell_index -CellAccessor::global_active_cell_index() const -{ - Assert(this->used(), TriaAccessorExceptions::ExcCellNotUsed()); - Assert(this->is_active(), - ExcMessage( - "global_active_cell_index() can only be called on active cells!")); - - return this->tria->levels[this->present_level] - ->global_active_cell_indices[this->present_index]; -} - - - template void CellAccessor::set_global_level_cell_index( @@ -2182,16 +2156,6 @@ CellAccessor::set_global_level_cell_index( -template -inline types::global_cell_index -CellAccessor::global_level_cell_index() const -{ - return this->tria->levels[this->present_level] - ->global_level_cell_indices[this->present_index]; -} - - - template TriaIterator> CellAccessor::parent() const -- 2.39.5