Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide some overloads and instantiations #13185

Merged
merged 3 commits into from
Jan 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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>>;
}