]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Inline active_cell_index functions 12903/head
authorMartin Kronbichler <martin.kronbichler@it.uu.se>
Mon, 1 Nov 2021 18:16:09 +0000 (19:16 +0100)
committerMartin Kronbichler <martin.kronbichler@it.uu.se>
Mon, 1 Nov 2021 18:16:09 +0000 (19:16 +0100)
include/deal.II/grid/tria_accessor.templates.h
source/grid/tria_accessor.cc

index f19b16feed98f4c6ec24f8e4ca088ed4df0c5b55..b26c6514e90727e8711121eba38fd98a6c996984 100644 (file)
@@ -3863,6 +3863,42 @@ CellAccessor<dim, spacedim>::is_level_cell()
 }
 
 
+
+template <int dim, int spacedim>
+inline unsigned int
+CellAccessor<dim, spacedim>::active_cell_index() const
+{
+  Assert(this->is_active(), TriaAccessorExceptions::ExcCellNotActive());
+  return this->tria->levels[this->present_level]
+    ->active_cell_indices[this->present_index];
+}
+
+
+
+template <int dim, int spacedim>
+inline types::global_cell_index
+CellAccessor<dim, spacedim>::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 <int dim, int spacedim>
+inline types::global_cell_index
+CellAccessor<dim, spacedim>::global_level_cell_index() const
+{
+  return this->tria->levels[this->present_level]
+    ->global_level_cell_indices[this->present_index];
+}
+
+
 DEAL_II_NAMESPACE_CLOSE
 
 #endif
index 16e6858d63370c7326d67224b89a9e5ac80b2d19..fd7dac0727ca323b257c9820174dcedc461d0666 100644 (file)
@@ -2123,17 +2123,6 @@ CellAccessor<dim, spacedim>::parent_index() const
 
 
 
-template <int dim, int spacedim>
-unsigned int
-CellAccessor<dim, spacedim>::active_cell_index() const
-{
-  Assert(this->is_active(), TriaAccessorExceptions::ExcCellNotActive());
-  return this->tria->levels[this->present_level]
-    ->active_cell_indices[this->present_index];
-}
-
-
-
 template <int dim, int spacedim>
 void
 CellAccessor<dim, spacedim>::set_active_cell_index(
@@ -2156,21 +2145,6 @@ CellAccessor<dim, spacedim>::set_global_active_cell_index(
 
 
 
-template <int dim, int spacedim>
-inline types::global_cell_index
-CellAccessor<dim, spacedim>::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 <int dim, int spacedim>
 void
 CellAccessor<dim, spacedim>::set_global_level_cell_index(
@@ -2182,16 +2156,6 @@ CellAccessor<dim, spacedim>::set_global_level_cell_index(
 
 
 
-template <int dim, int spacedim>
-inline types::global_cell_index
-CellAccessor<dim, spacedim>::global_level_cell_index() const
-{
-  return this->tria->levels[this->present_level]
-    ->global_level_cell_indices[this->present_index];
-}
-
-
-
 template <int dim, int spacedim>
 TriaIterator<CellAccessor<dim, spacedim>>
 CellAccessor<dim, spacedim>::parent() const

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.