]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Provide an overload for TriaAccess<0,1,spacedim>::copy_from().
authorWolfgang Bangerth <bangerth@colostate.edu>
Wed, 29 Dec 2021 16:36:41 +0000 (09:36 -0700)
committerWolfgang Bangerth <bangerth@colostate.edu>
Fri, 7 Jan 2022 07:40:58 +0000 (00:40 -0700)
include/deal.II/grid/tria_accessor.h
include/deal.II/grid/tria_accessor.templates.h

index a095c8f36bdf4b30616ed896da25653ba5274e6a..c6f9ff01e46accc05b313f4da72ae24bf542c867 100644 (file)
@@ -2384,6 +2384,14 @@ public:
   void
   copy_from(const TriaAccessor &);
 
+  /**
+   * Copy operator. We need this function to support generic
+   * programming, but it just throws an exception because it cannot do
+   * the required operations.
+   */
+  void
+  copy_from(const TriaAccessorBase<0, 1, spacedim> &);
+
   /**
    * Return the state of the iterator. Since an iterator to points can not be
    * incremented or decremented, its state remains constant, and in particular
index 70ad55af027e2d7701477dadac4f54f398cfa391..c93e2713ee582d107a4953b4887028587d89e976 100644 (file)
@@ -2769,6 +2769,19 @@ TriaAccessor<0, 1, spacedim>::copy_from(const TriaAccessor &t)
 
 
 
+template <int spacedim>
+inline void
+TriaAccessor<0, 1, spacedim>::copy_from(
+  const TriaAccessorBase<0, 1, spacedim> &)
+{
+  // We cannot convert from TriaAccessorBase to
+  // TriaAccessor<0,1,spacedim> because the latter is not derived from
+  // the former. We should never get here.
+  Assert(false, ExcInternalError());
+}
+
+
+
 template <int spacedim>
 inline bool
 TriaAccessor<0, 1, spacedim>::operator<(

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.