]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Do not make a difference between debug/release mode when to include a file.
authorWolfgang Bangerth <bangerth@colostate.edu>
Wed, 15 Jan 2025 04:02:53 +0000 (21:02 -0700)
committerWolfgang Bangerth <bangerth@colostate.edu>
Wed, 15 Jan 2025 14:54:26 +0000 (07:54 -0700)
include/deal.II/grid/tria_iterator.h
include/deal.II/grid/tria_iterator.templates.h

index 839dd1bece1362eb6e35a2a2b3f7d275332c3900..4436e904755dafce83b5aebaf1a5a17ba20a9e4e 100644 (file)
@@ -44,13 +44,6 @@ class TriaActiveIterator;
 
 
 
-// note: in non-debug mode, i.e. with optimizations, the file
-// tria_iterator.templates.h is included at the end of this file.
-// this includes a lot of templates and thus makes compilation
-// slower, but at the same time allows for more aggressive
-// inlining and thus faster code.
-
-
 /**
  * This class implements an iterator, analogous to those used in the standard
  * library. It fulfills the requirements of a bidirectional iterator. See the
@@ -1245,12 +1238,524 @@ operator<<(std::ostream &out, const TriaActiveIterator<Accessor> &i)
 }
 
 
-DEAL_II_NAMESPACE_CLOSE
+#ifndef DOXYGEN
+
+/*------------------------ Functions: TriaRawIterator ------------------*/
+
+
+template <typename Accessor>
+inline TriaRawIterator<Accessor>::TriaRawIterator()
+  : accessor(nullptr, -2, -2, nullptr)
+{}
+
+
+template <typename Accessor>
+inline TriaRawIterator<Accessor>::TriaRawIterator(
+  const TriaRawIterator<Accessor> &i)
+  : accessor(i.accessor)
+{}
+
+
+
+template <typename Accessor>
+inline TriaRawIterator<Accessor>::TriaRawIterator(
+  const Triangulation<Accessor::dimension, Accessor::space_dimension> *parent,
+  const int                                                            level,
+  const int                                                            index,
+  const typename Accessor::AccessorData *local_data)
+  : accessor(parent, level, index, local_data)
+{}
+
+
+template <typename Accessor>
+inline TriaRawIterator<Accessor>::TriaRawIterator(
+  const TriaAccessorBase<Accessor::structure_dimension,
+                         Accessor::dimension,
+                         Accessor::space_dimension> &tria_accessor,
+  const typename Accessor::AccessorData             *local_data)
+  : accessor(nullptr, -2, -2, local_data)
+{
+  accessor.copy_from(tria_accessor);
+}
+
+
+template <typename Accessor>
+inline TriaRawIterator<Accessor> &
+TriaRawIterator<Accessor>::operator=(const TriaRawIterator<Accessor> &i)
+{
+  accessor.copy_from(i.accessor);
+
+  return *this;
+}
+
+
+
+template <typename Accessor>
+template <typename OtherAccessor>
+inline std::enable_if_t<std::is_convertible_v<OtherAccessor, Accessor>, bool>
+TriaRawIterator<Accessor>::operator==(
+  const TriaRawIterator<OtherAccessor> &other) const
+{
+  return accessor == other.accessor;
+}
+
+
+template <typename Accessor>
+inline bool
+TriaRawIterator<Accessor>::operator!=(
+  const TriaRawIterator<Accessor> &other) const
+{
+  return !(*this == other);
+}
+
+
+template <typename Accessor>
+inline TriaRawIterator<Accessor>
+TriaRawIterator<Accessor>::operator++(int)
+{
+  TriaRawIterator<Accessor> tmp(*this);
+  operator++();
+
+  return tmp;
+}
+
+
+template <typename Accessor>
+inline TriaRawIterator<Accessor>
+TriaRawIterator<Accessor>::operator--(int)
+{
+  TriaRawIterator<Accessor> tmp(*this);
+  operator--();
+
+  return tmp;
+}
+
+
+/*-----------------------  functions: TriaIterator ---------------*/
+
+
+template <typename Accessor>
+inline TriaIterator<Accessor>::TriaIterator()
+  : TriaRawIterator<Accessor>()
+{}
+
+
+template <typename Accessor>
+inline TriaIterator<Accessor>::TriaIterator(const TriaIterator<Accessor> &i)
+  : TriaRawIterator<Accessor>(i.accessor)
+{}
+
+
+template <typename Accessor>
+inline TriaIterator<Accessor>::TriaIterator(const TriaRawIterator<Accessor> &i)
+  : TriaRawIterator<Accessor>(i.accessor)
+{
+#  ifdef DEBUG
+  // do this like this, because:
+  // if we write
+  // "Assert (IteratorState::past_the_end || used)"
+  // used() is called anyway, even if
+  // state==IteratorState::past_the_end, and will then
+  // throw the exception!
+  if (this->state() != IteratorState::past_the_end)
+    Assert(this->accessor.used(), ExcAssignmentOfUnusedObject());
+#  endif
+}
+
 
+template <typename Accessor>
+inline TriaIterator<Accessor>::TriaIterator(
+  const Triangulation<Accessor::dimension, Accessor::space_dimension> *parent,
+  const int                                                            level,
+  const int                                                            index,
+  const typename Accessor::AccessorData *local_data)
+  : TriaRawIterator<Accessor>(parent, level, index, local_data)
+{
+#  ifdef DEBUG
+  // do this like this, because:
+  // if we write
+  // "Assert (IteratorState::past_the_end || used)"
+  // used() is called anyway, even if
+  // state==IteratorState::past_the_end, and will then
+  // throw the exception!
+  if (this->state() != IteratorState::past_the_end)
+    Assert(this->accessor.used(), ExcAssignmentOfUnusedObject());
+#  endif
+}
+
+
+template <typename Accessor>
+inline TriaIterator<Accessor>::TriaIterator(
+  const TriaAccessorBase<Accessor::structure_dimension,
+                         Accessor::dimension,
+                         Accessor::space_dimension> &tria_accessor,
+  const typename Accessor::AccessorData             *local_data)
+  : TriaRawIterator<Accessor>(tria_accessor, local_data)
+{
+#  ifdef DEBUG
+  // do this like this, because:
+  // if we write
+  // "Assert (IteratorState::past_the_end || used)"
+  // used() is called anyway, even if
+  // state==IteratorState::past_the_end, and will then
+  // throw the exception!
+  if (this->state() != IteratorState::past_the_end)
+    Assert(this->accessor.used(), ExcAssignmentOfUnusedObject());
+#  endif
+}
+
+
+template <typename Accessor>
+inline TriaIterator<Accessor> &
+TriaIterator<Accessor>::operator=(const TriaIterator<Accessor> &i)
+{
+  this->accessor.copy_from(i.accessor);
+  return *this;
+}
+
+
+template <typename Accessor>
+template <typename OtherAccessor>
+inline TriaIterator<Accessor> &
+TriaIterator<Accessor>::operator=(const TriaIterator<OtherAccessor> &i)
+{
+  this->accessor.copy_from(i.accessor);
+  return *this;
+}
+
+
+template <typename Accessor>
+inline TriaIterator<Accessor> &
+TriaIterator<Accessor>::operator=(const TriaRawIterator<Accessor> &i)
+{
+  this->accessor.copy_from(i.accessor);
+#  ifdef DEBUG
+  // do this like this, because:
+  // if we write
+  // "Assert (IteratorState::past_the_end || used)"
+  // used() is called anyway, even if
+  // state==IteratorState::past_the_end, and will then
+  // throw the exception!
+  if (this->state() != IteratorState::past_the_end)
+    Assert(this->accessor.used(), ExcAssignmentOfUnusedObject());
+#  endif
+  return *this;
+}
+
+
+template <typename Accessor>
+template <typename OtherAccessor>
+inline TriaIterator<Accessor> &
+TriaIterator<Accessor>::operator=(const TriaRawIterator<OtherAccessor> &i)
+{
+  this->accessor.copy_from(i.accessor);
+#  ifdef DEBUG
+  // do this like this, because:
+  // if we write
+  // "Assert (IteratorState::past_the_end || used)"
+  // used() is called anyway, even if
+  // state==IteratorState::past_the_end, and will then
+  // throw the exception!
+  if (this->state() != IteratorState::past_the_end)
+    Assert(this->accessor.used(), ExcAssignmentOfUnusedObject());
+#  endif
+  return *this;
+}
+
+
+template <typename Accessor>
+inline TriaIterator<Accessor> &
+TriaIterator<Accessor>::operator++()
+{
+  while (TriaRawIterator<Accessor>::operator++(),
+         (this->state() == IteratorState::valid))
+    if (this->accessor.used() == true)
+      return *this;
+  return *this;
+}
+
+
+template <typename Accessor>
+inline TriaIterator<Accessor>
+TriaIterator<Accessor>::operator++(int)
+{
+  TriaIterator<Accessor> tmp(*this);
+  operator++();
+
+  return tmp;
+}
+
+
+template <typename Accessor>
+inline TriaIterator<Accessor> &
+TriaIterator<Accessor>::operator--()
+{
+  while (TriaRawIterator<Accessor>::operator--(),
+         (this->state() == IteratorState::valid))
+    if (this->accessor.used() == true)
+      return *this;
+  return *this;
+}
+
+
+template <typename Accessor>
+inline TriaIterator<Accessor>
+TriaIterator<Accessor>::operator--(int)
+{
+  TriaIterator<Accessor> tmp(*this);
+  operator--();
+
+  return tmp;
+}
+
+
+/*-----------------------  functions: TriaActiveIterator ---------------*/
+
+
+template <typename Accessor>
+inline TriaActiveIterator<Accessor>::TriaActiveIterator()
+  : TriaIterator<Accessor>()
+{}
+
+
+template <typename Accessor>
+inline TriaActiveIterator<Accessor>::TriaActiveIterator(
+  const TriaActiveIterator<Accessor> &i)
+  : TriaIterator<Accessor>(static_cast<TriaIterator<Accessor>>(i))
+{}
+
+
+template <typename Accessor>
+inline TriaActiveIterator<Accessor>::TriaActiveIterator(
+  const TriaRawIterator<Accessor> &i)
+  : TriaIterator<Accessor>(i)
+{
+#  ifdef DEBUG
+  // do this like this, because:
+  // if we write
+  // "Assert (IteratorState::past_the_end || !has_children())"
+  // has_children() is called anyway, even if
+  // state==IteratorState::past_the_end, and will then
+  // throw the exception!
+  if (this->state() != IteratorState::past_the_end)
+    Assert(this->accessor.has_children() == false,
+           ExcAssignmentOfInactiveObject());
+#  endif
+}
+
+
+template <typename Accessor>
+inline TriaActiveIterator<Accessor>::TriaActiveIterator(
+  const TriaIterator<Accessor> &i)
+  : TriaIterator<Accessor>(i)
+{
+#  ifdef DEBUG
+  // do this like this, because:
+  // if we write
+  // "Assert (IteratorState::past_the_end || !has_children())"
+  // has_children() is called anyway, even if
+  // state==IteratorState::past_the_end, and will then
+  // throw the exception!
+  if (this->state() != IteratorState::past_the_end)
+    Assert(this->accessor.has_children() == false,
+           ExcAssignmentOfInactiveObject());
+#  endif
+}
+
+
+template <typename Accessor>
+inline TriaActiveIterator<Accessor>::TriaActiveIterator(
+  const Triangulation<Accessor::dimension, Accessor::space_dimension> *parent,
+  const int                                                            level,
+  const int                                                            index,
+  const typename Accessor::AccessorData *local_data)
+  : TriaIterator<Accessor>(parent, level, index, local_data)
+{
+#  ifdef DEBUG
+  // do this like this, because:
+  // if we write
+  // "Assert (IteratorState::past_the_end || !has_children())"
+  // has_children() is called anyway, even if
+  // state==IteratorState::past_the_end, and will then
+  // throw the exception!
+  if (this->state() != IteratorState::past_the_end)
+    Assert(this->accessor.has_children() == false,
+           ExcAssignmentOfInactiveObject());
+#  endif
+}
+
+
+template <typename Accessor>
+inline TriaActiveIterator<Accessor>::TriaActiveIterator(
+  const TriaAccessorBase<Accessor::structure_dimension,
+                         Accessor::dimension,
+                         Accessor::space_dimension> &tria_accessor,
+  const typename Accessor::AccessorData             *local_data)
+  : TriaIterator<Accessor>(tria_accessor, local_data)
+{
+#  ifdef DEBUG
+  // do this like this, because:
+  // if we write
+  // "Assert (IteratorState::past_the_end || !has_children())"
+  // has_children() is called anyway, even if
+  // state==IteratorState::past_the_end, and will then
+  // throw the exception!
+  if (this->state() != IteratorState::past_the_end)
+    Assert(this->accessor.has_children() == false,
+           ExcAssignmentOfInactiveObject());
+#  endif
+}
+
+
+template <typename Accessor>
+inline TriaActiveIterator<Accessor> &
+TriaActiveIterator<Accessor>::operator=(const TriaActiveIterator<Accessor> &i)
+{
+  this->accessor.copy_from(i.accessor);
+  return *this;
+}
+
+
+template <typename Accessor>
+template <class OtherAccessor>
+inline TriaActiveIterator<Accessor> &
+TriaActiveIterator<Accessor>::operator=(
+  const TriaActiveIterator<OtherAccessor> &i)
+{
+  this->accessor.copy_from(i.accessor);
+  return *this;
+}
+
+
+template <typename Accessor>
+inline TriaActiveIterator<Accessor> &
+TriaActiveIterator<Accessor>::operator=(const TriaRawIterator<Accessor> &i)
+{
+  this->accessor.copy_from(i.accessor);
+#  ifdef DEBUG
+  // do this like this, because:
+  // if we write
+  // "Assert (IteratorState::past_the_end || !has_children())"
+  // has_children() is called anyway, even if
+  // state==IteratorState::past_the_end, and will then
+  // throw the exception!
+  if (this->state() != IteratorState::past_the_end)
+    Assert(this->accessor.used() && this->accessor.has_children() == false,
+           ExcAssignmentOfInactiveObject());
+#  endif
+  return *this;
+}
+
+
+template <typename Accessor>
+template <class OtherAccessor>
+inline TriaActiveIterator<Accessor> &
+TriaActiveIterator<Accessor>::operator=(const TriaRawIterator<OtherAccessor> &i)
+{
+  this->accessor.copy_from(i.accessor);
+#  ifdef DEBUG
+  // do this like this, because:
+  // if we write
+  // "Assert (IteratorState::past_the_end || !has_children())"
+  // has_children() is called anyway, even if
+  // state==IteratorState::past_the_end, and will then
+  // throw the exception!
+  if (this->state() != IteratorState::past_the_end)
+    Assert(this->accessor.used() && this->accessor.has_children() == false,
+           ExcAssignmentOfInactiveObject());
+#  endif
+  return *this;
+}
+
+
+template <typename Accessor>
+template <class OtherAccessor>
+inline TriaActiveIterator<Accessor> &
+TriaActiveIterator<Accessor>::operator=(const TriaIterator<OtherAccessor> &i)
+{
+  this->accessor.copy_from(i.accessor);
+#  ifdef DEBUG
+  // do this like this, because:
+  // if we write
+  // "Assert (IteratorState::past_the_end || !has_children())"
+  // has_children() is called anyway, even if
+  // state==IteratorState::past_the_end, and will then
+  // throw the exception!
+  if (this->state() != IteratorState::past_the_end)
+    Assert(this->accessor.has_children() == false,
+           ExcAssignmentOfInactiveObject());
+#  endif
+  return *this;
+}
+
+
+template <typename Accessor>
+inline TriaActiveIterator<Accessor> &
+TriaActiveIterator<Accessor>::operator=(const TriaIterator<Accessor> &i)
+{
+  this->accessor.copy_from(i.accessor);
+#  ifdef DEBUG
+  // do this like this, because:
+  // if we write
+  // "Assert (IteratorState::past_the_end || !has_children())"
+  // has_children() is called anyway, even if
+  // state==IteratorState::past_the_end, and will then
+  // throw the exception!
+  if (this->state() != IteratorState::past_the_end)
+    Assert(this->accessor.has_children() == false,
+           ExcAssignmentOfInactiveObject());
+#  endif
+  return *this;
+}
+
+
+template <typename Accessor>
+inline TriaActiveIterator<Accessor> &
+TriaActiveIterator<Accessor>::operator++()
+{
+  while (TriaIterator<Accessor>::operator++(),
+         (this->state() == IteratorState::valid))
+    if (this->accessor.has_children() == false)
+      return *this;
+  return *this;
+}
+
+
+template <typename Accessor>
+inline TriaActiveIterator<Accessor>
+TriaActiveIterator<Accessor>::operator++(int)
+{
+  TriaActiveIterator<Accessor> tmp(*this);
+  operator++();
+
+  return tmp;
+}
+
+
+template <typename Accessor>
+inline TriaActiveIterator<Accessor> &
+TriaActiveIterator<Accessor>::operator--()
+{
+  while (TriaIterator<Accessor>::operator--(),
+         (this->state() == IteratorState::valid))
+    if (this->accessor.has_children() == false)
+      return *this;
+  return *this;
+}
+
+
+template <typename Accessor>
+inline TriaActiveIterator<Accessor>
+TriaActiveIterator<Accessor>::operator--(int)
+{
+  TriaActiveIterator<Accessor> tmp(*this);
+  operator--();
+
+  return tmp;
+}
 
-// if in optimized mode: include more templates
-#ifndef DEBUG
-#  include <deal.II/grid/tria_iterator.templates.h>
 #endif
 
+DEAL_II_NAMESPACE_CLOSE
+
 #endif
index 9160190efe347d7fbbcbe4de510312107ed0e79f..6b6becbcd55a650cc97fcce824c340f493041635 100644 (file)
 
 #include <deal.II/base/config.h>
 
-#include <deal.II/grid/tria.h>
-#include <deal.II/grid/tria_iterator.h>
-
-DEAL_II_NAMESPACE_OPEN
-
-
-/* Note: This file only contains template definitions and will thus
-   not produce an object file. It is rather thought to be included
-   into the *_accessor.cc files.
-*/
-
-
-/*------------------------ Functions: TriaRawIterator ------------------*/
-
-
-template <typename Accessor>
-inline TriaRawIterator<Accessor>::TriaRawIterator()
-  : accessor(nullptr, -2, -2, nullptr)
-{}
-
-
-template <typename Accessor>
-inline TriaRawIterator<Accessor>::TriaRawIterator(
-  const TriaRawIterator<Accessor> &i)
-  : accessor(i.accessor)
-{}
-
-
-
-template <typename Accessor>
-inline TriaRawIterator<Accessor>::TriaRawIterator(
-  const Triangulation<Accessor::dimension, Accessor::space_dimension> *parent,
-  const int                                                            level,
-  const int                                                            index,
-  const typename Accessor::AccessorData *local_data)
-  : accessor(parent, level, index, local_data)
-{}
-
-
-template <typename Accessor>
-inline TriaRawIterator<Accessor>::TriaRawIterator(
-  const TriaAccessorBase<Accessor::structure_dimension,
-                         Accessor::dimension,
-                         Accessor::space_dimension> &tria_accessor,
-  const typename Accessor::AccessorData             *local_data)
-  : accessor(nullptr, -2, -2, local_data)
-{
-  accessor.copy_from(tria_accessor);
-}
-
-
-template <typename Accessor>
-inline TriaRawIterator<Accessor> &
-TriaRawIterator<Accessor>::operator=(const TriaRawIterator<Accessor> &i)
-{
-  accessor.copy_from(i.accessor);
-
-  return *this;
-}
-
-
-
-template <typename Accessor>
-template <typename OtherAccessor>
-inline std::enable_if_t<std::is_convertible_v<OtherAccessor, Accessor>, bool>
-TriaRawIterator<Accessor>::operator==(
-  const TriaRawIterator<OtherAccessor> &other) const
-{
-  return accessor == other.accessor;
-}
-
-
-template <typename Accessor>
-inline bool
-TriaRawIterator<Accessor>::operator!=(
-  const TriaRawIterator<Accessor> &other) const
-{
-  return !(*this == other);
-}
-
-
-template <typename Accessor>
-inline TriaRawIterator<Accessor>
-TriaRawIterator<Accessor>::operator++(int)
-{
-  TriaRawIterator<Accessor> tmp(*this);
-  operator++();
-
-  return tmp;
-}
-
-
-template <typename Accessor>
-inline TriaRawIterator<Accessor>
-TriaRawIterator<Accessor>::operator--(int)
-{
-  TriaRawIterator<Accessor> tmp(*this);
-  operator--();
-
-  return tmp;
-}
-
-
-/*-----------------------  functions: TriaIterator ---------------*/
-
-
-template <typename Accessor>
-inline TriaIterator<Accessor>::TriaIterator()
-  : TriaRawIterator<Accessor>()
-{}
-
-
-template <typename Accessor>
-inline TriaIterator<Accessor>::TriaIterator(const TriaIterator<Accessor> &i)
-  : TriaRawIterator<Accessor>(i.accessor)
-{}
-
-
-template <typename Accessor>
-inline TriaIterator<Accessor>::TriaIterator(const TriaRawIterator<Accessor> &i)
-  : TriaRawIterator<Accessor>(i.accessor)
-{
-#ifdef DEBUG
-  // do this like this, because:
-  // if we write
-  // "Assert (IteratorState::past_the_end || used)"
-  // used() is called anyway, even if
-  // state==IteratorState::past_the_end, and will then
-  // throw the exception!
-  if (this->state() != IteratorState::past_the_end)
-    Assert(this->accessor.used(), ExcAssignmentOfUnusedObject());
-#endif
-}
-
-
-template <typename Accessor>
-inline TriaIterator<Accessor>::TriaIterator(
-  const Triangulation<Accessor::dimension, Accessor::space_dimension> *parent,
-  const int                                                            level,
-  const int                                                            index,
-  const typename Accessor::AccessorData *local_data)
-  : TriaRawIterator<Accessor>(parent, level, index, local_data)
-{
-#ifdef DEBUG
-  // do this like this, because:
-  // if we write
-  // "Assert (IteratorState::past_the_end || used)"
-  // used() is called anyway, even if
-  // state==IteratorState::past_the_end, and will then
-  // throw the exception!
-  if (this->state() != IteratorState::past_the_end)
-    Assert(this->accessor.used(), ExcAssignmentOfUnusedObject());
-#endif
-}
-
-
-template <typename Accessor>
-inline TriaIterator<Accessor>::TriaIterator(
-  const TriaAccessorBase<Accessor::structure_dimension,
-                         Accessor::dimension,
-                         Accessor::space_dimension> &tria_accessor,
-  const typename Accessor::AccessorData             *local_data)
-  : TriaRawIterator<Accessor>(tria_accessor, local_data)
-{
-#ifdef DEBUG
-  // do this like this, because:
-  // if we write
-  // "Assert (IteratorState::past_the_end || used)"
-  // used() is called anyway, even if
-  // state==IteratorState::past_the_end, and will then
-  // throw the exception!
-  if (this->state() != IteratorState::past_the_end)
-    Assert(this->accessor.used(), ExcAssignmentOfUnusedObject());
-#endif
-}
-
-
-template <typename Accessor>
-inline TriaIterator<Accessor> &
-TriaIterator<Accessor>::operator=(const TriaIterator<Accessor> &i)
-{
-  this->accessor.copy_from(i.accessor);
-  return *this;
-}
-
-
-template <typename Accessor>
-template <typename OtherAccessor>
-inline TriaIterator<Accessor> &
-TriaIterator<Accessor>::operator=(const TriaIterator<OtherAccessor> &i)
-{
-  this->accessor.copy_from(i.accessor);
-  return *this;
-}
-
-
-template <typename Accessor>
-inline TriaIterator<Accessor> &
-TriaIterator<Accessor>::operator=(const TriaRawIterator<Accessor> &i)
-{
-  this->accessor.copy_from(i.accessor);
-#ifdef DEBUG
-  // do this like this, because:
-  // if we write
-  // "Assert (IteratorState::past_the_end || used)"
-  // used() is called anyway, even if
-  // state==IteratorState::past_the_end, and will then
-  // throw the exception!
-  if (this->state() != IteratorState::past_the_end)
-    Assert(this->accessor.used(), ExcAssignmentOfUnusedObject());
-#endif
-  return *this;
-}
-
-
-template <typename Accessor>
-template <typename OtherAccessor>
-inline TriaIterator<Accessor> &
-TriaIterator<Accessor>::operator=(const TriaRawIterator<OtherAccessor> &i)
-{
-  this->accessor.copy_from(i.accessor);
-#ifdef DEBUG
-  // do this like this, because:
-  // if we write
-  // "Assert (IteratorState::past_the_end || used)"
-  // used() is called anyway, even if
-  // state==IteratorState::past_the_end, and will then
-  // throw the exception!
-  if (this->state() != IteratorState::past_the_end)
-    Assert(this->accessor.used(), ExcAssignmentOfUnusedObject());
-#endif
-  return *this;
-}
-
-
-template <typename Accessor>
-inline TriaIterator<Accessor> &
-TriaIterator<Accessor>::operator++()
-{
-  while (TriaRawIterator<Accessor>::operator++(),
-         (this->state() == IteratorState::valid))
-    if (this->accessor.used() == true)
-      return *this;
-  return *this;
-}
-
-
-template <typename Accessor>
-inline TriaIterator<Accessor>
-TriaIterator<Accessor>::operator++(int)
-{
-  TriaIterator<Accessor> tmp(*this);
-  operator++();
-
-  return tmp;
-}
-
-
-template <typename Accessor>
-inline TriaIterator<Accessor> &
-TriaIterator<Accessor>::operator--()
-{
-  while (TriaRawIterator<Accessor>::operator--(),
-         (this->state() == IteratorState::valid))
-    if (this->accessor.used() == true)
-      return *this;
-  return *this;
-}
-
-
-template <typename Accessor>
-inline TriaIterator<Accessor>
-TriaIterator<Accessor>::operator--(int)
-{
-  TriaIterator<Accessor> tmp(*this);
-  operator--();
-
-  return tmp;
-}
-
-
-/*-----------------------  functions: TriaActiveIterator ---------------*/
-
-
-template <typename Accessor>
-inline TriaActiveIterator<Accessor>::TriaActiveIterator()
-  : TriaIterator<Accessor>()
-{}
-
-
-template <typename Accessor>
-inline TriaActiveIterator<Accessor>::TriaActiveIterator(
-  const TriaActiveIterator<Accessor> &i)
-  : TriaIterator<Accessor>(static_cast<TriaIterator<Accessor>>(i))
-{}
-
-
-template <typename Accessor>
-inline TriaActiveIterator<Accessor>::TriaActiveIterator(
-  const TriaRawIterator<Accessor> &i)
-  : TriaIterator<Accessor>(i)
-{
-#ifdef DEBUG
-  // do this like this, because:
-  // if we write
-  // "Assert (IteratorState::past_the_end || !has_children())"
-  // has_children() is called anyway, even if
-  // state==IteratorState::past_the_end, and will then
-  // throw the exception!
-  if (this->state() != IteratorState::past_the_end)
-    Assert(this->accessor.has_children() == false,
-           ExcAssignmentOfInactiveObject());
-#endif
-}
-
-
-template <typename Accessor>
-inline TriaActiveIterator<Accessor>::TriaActiveIterator(
-  const TriaIterator<Accessor> &i)
-  : TriaIterator<Accessor>(i)
-{
-#ifdef DEBUG
-  // do this like this, because:
-  // if we write
-  // "Assert (IteratorState::past_the_end || !has_children())"
-  // has_children() is called anyway, even if
-  // state==IteratorState::past_the_end, and will then
-  // throw the exception!
-  if (this->state() != IteratorState::past_the_end)
-    Assert(this->accessor.has_children() == false,
-           ExcAssignmentOfInactiveObject());
-#endif
-}
-
-
-template <typename Accessor>
-inline TriaActiveIterator<Accessor>::TriaActiveIterator(
-  const Triangulation<Accessor::dimension, Accessor::space_dimension> *parent,
-  const int                                                            level,
-  const int                                                            index,
-  const typename Accessor::AccessorData *local_data)
-  : TriaIterator<Accessor>(parent, level, index, local_data)
-{
-#ifdef DEBUG
-  // do this like this, because:
-  // if we write
-  // "Assert (IteratorState::past_the_end || !has_children())"
-  // has_children() is called anyway, even if
-  // state==IteratorState::past_the_end, and will then
-  // throw the exception!
-  if (this->state() != IteratorState::past_the_end)
-    Assert(this->accessor.has_children() == false,
-           ExcAssignmentOfInactiveObject());
-#endif
-}
-
-
-template <typename Accessor>
-inline TriaActiveIterator<Accessor>::TriaActiveIterator(
-  const TriaAccessorBase<Accessor::structure_dimension,
-                         Accessor::dimension,
-                         Accessor::space_dimension> &tria_accessor,
-  const typename Accessor::AccessorData             *local_data)
-  : TriaIterator<Accessor>(tria_accessor, local_data)
-{
-#ifdef DEBUG
-  // do this like this, because:
-  // if we write
-  // "Assert (IteratorState::past_the_end || !has_children())"
-  // has_children() is called anyway, even if
-  // state==IteratorState::past_the_end, and will then
-  // throw the exception!
-  if (this->state() != IteratorState::past_the_end)
-    Assert(this->accessor.has_children() == false,
-           ExcAssignmentOfInactiveObject());
-#endif
-}
-
-
-template <typename Accessor>
-inline TriaActiveIterator<Accessor> &
-TriaActiveIterator<Accessor>::operator=(const TriaActiveIterator<Accessor> &i)
-{
-  this->accessor.copy_from(i.accessor);
-  return *this;
-}
-
-
-template <typename Accessor>
-template <class OtherAccessor>
-inline TriaActiveIterator<Accessor> &
-TriaActiveIterator<Accessor>::operator=(
-  const TriaActiveIterator<OtherAccessor> &i)
-{
-  this->accessor.copy_from(i.accessor);
-  return *this;
-}
-
-
-template <typename Accessor>
-inline TriaActiveIterator<Accessor> &
-TriaActiveIterator<Accessor>::operator=(const TriaRawIterator<Accessor> &i)
-{
-  this->accessor.copy_from(i.accessor);
-#ifdef DEBUG
-  // do this like this, because:
-  // if we write
-  // "Assert (IteratorState::past_the_end || !has_children())"
-  // has_children() is called anyway, even if
-  // state==IteratorState::past_the_end, and will then
-  // throw the exception!
-  if (this->state() != IteratorState::past_the_end)
-    Assert(this->accessor.used() && this->accessor.has_children() == false,
-           ExcAssignmentOfInactiveObject());
-#endif
-  return *this;
-}
-
-
-template <typename Accessor>
-template <class OtherAccessor>
-inline TriaActiveIterator<Accessor> &
-TriaActiveIterator<Accessor>::operator=(const TriaRawIterator<OtherAccessor> &i)
-{
-  this->accessor.copy_from(i.accessor);
-#ifdef DEBUG
-  // do this like this, because:
-  // if we write
-  // "Assert (IteratorState::past_the_end || !has_children())"
-  // has_children() is called anyway, even if
-  // state==IteratorState::past_the_end, and will then
-  // throw the exception!
-  if (this->state() != IteratorState::past_the_end)
-    Assert(this->accessor.used() && this->accessor.has_children() == false,
-           ExcAssignmentOfInactiveObject());
-#endif
-  return *this;
-}
-
-
-template <typename Accessor>
-template <class OtherAccessor>
-inline TriaActiveIterator<Accessor> &
-TriaActiveIterator<Accessor>::operator=(const TriaIterator<OtherAccessor> &i)
-{
-  this->accessor.copy_from(i.accessor);
-#ifdef DEBUG
-  // do this like this, because:
-  // if we write
-  // "Assert (IteratorState::past_the_end || !has_children())"
-  // has_children() is called anyway, even if
-  // state==IteratorState::past_the_end, and will then
-  // throw the exception!
-  if (this->state() != IteratorState::past_the_end)
-    Assert(this->accessor.has_children() == false,
-           ExcAssignmentOfInactiveObject());
-#endif
-  return *this;
-}
-
-
-template <typename Accessor>
-inline TriaActiveIterator<Accessor> &
-TriaActiveIterator<Accessor>::operator=(const TriaIterator<Accessor> &i)
-{
-  this->accessor.copy_from(i.accessor);
-#ifdef DEBUG
-  // do this like this, because:
-  // if we write
-  // "Assert (IteratorState::past_the_end || !has_children())"
-  // has_children() is called anyway, even if
-  // state==IteratorState::past_the_end, and will then
-  // throw the exception!
-  if (this->state() != IteratorState::past_the_end)
-    Assert(this->accessor.has_children() == false,
-           ExcAssignmentOfInactiveObject());
-#endif
-  return *this;
-}
-
-
-template <typename Accessor>
-inline TriaActiveIterator<Accessor> &
-TriaActiveIterator<Accessor>::operator++()
-{
-  while (TriaIterator<Accessor>::operator++(),
-         (this->state() == IteratorState::valid))
-    if (this->accessor.has_children() == false)
-      return *this;
-  return *this;
-}
-
-
-template <typename Accessor>
-inline TriaActiveIterator<Accessor>
-TriaActiveIterator<Accessor>::operator++(int)
-{
-  TriaActiveIterator<Accessor> tmp(*this);
-  operator++();
-
-  return tmp;
-}
-
-
-template <typename Accessor>
-inline TriaActiveIterator<Accessor> &
-TriaActiveIterator<Accessor>::operator--()
-{
-  while (TriaIterator<Accessor>::operator--(),
-         (this->state() == IteratorState::valid))
-    if (this->accessor.has_children() == false)
-      return *this;
-  return *this;
-}
-
-
-template <typename Accessor>
-inline TriaActiveIterator<Accessor>
-TriaActiveIterator<Accessor>::operator--(int)
-{
-  TriaActiveIterator<Accessor> tmp(*this);
-  operator--();
-
-  return tmp;
-}
-
-DEAL_II_NAMESPACE_CLOSE
+DEAL_II_WARNING(
+  "The use of this header file is deprecated. Just include <deal.II/grid/tria_iterator.h>.")
 
 #endif

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.