Skip to content

Commit

Permalink
Merge pull request #13185 from bangerth/inst
Browse files Browse the repository at this point in the history
Provide some overloads and instantiations
  • Loading branch information
drwells committed Jan 7, 2022
2 parents 90f418c + 090eb37 commit 099edfe
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
8 changes: 8 additions & 0 deletions include/deal.II/grid/tria_accessor.h
Original file line number Diff line number Diff line change
Expand Up @@ -2384,6 +2384,14 @@ class TriaAccessor<0, 1, spacedim>
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
Expand Down
13 changes: 13 additions & 0 deletions include/deal.II/grid/tria_accessor.templates.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<(
Expand Down
6 changes: 6 additions & 0 deletions source/grid/tria_accessor.inst.in
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,9 @@ for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : DIMENSIONS)
CellAccessor<deal_II_dimension, deal_II_space_dimension>>;
#endif
}

for (deal_II_space_dimension : DIMENSIONS)
{
template class TriaAccessor<0, 1, deal_II_space_dimension>;
template class TriaIterator<TriaAccessor<0, 1, deal_II_space_dimension>>;
}

0 comments on commit 099edfe

Please sign in to comment.