From: Wolfgang Bangerth Date: Wed, 29 Dec 2021 16:36:41 +0000 (-0700) Subject: Provide an overload for TriaAccess<0,1,spacedim>::copy_from(). X-Git-Tag: v9.4.0-rc1~649^2~2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5878babacb38ba51894fe907bec5e0c47e4f17d2;p=dealii.git Provide an overload for TriaAccess<0,1,spacedim>::copy_from(). --- diff --git a/include/deal.II/grid/tria_accessor.h b/include/deal.II/grid/tria_accessor.h index a095c8f36b..c6f9ff01e4 100644 --- a/include/deal.II/grid/tria_accessor.h +++ b/include/deal.II/grid/tria_accessor.h @@ -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 diff --git a/include/deal.II/grid/tria_accessor.templates.h b/include/deal.II/grid/tria_accessor.templates.h index 70ad55af02..c93e2713ee 100644 --- a/include/deal.II/grid/tria_accessor.templates.h +++ b/include/deal.II/grid/tria_accessor.templates.h @@ -2769,6 +2769,19 @@ TriaAccessor<0, 1, spacedim>::copy_from(const TriaAccessor &t) +template +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 inline bool TriaAccessor<0, 1, spacedim>::operator<(