// user.
copy = sample_copy_data;
+ // Store the dimension in which we are working for later use
+ const auto dim = cell->get_triangulation().dimension;
+
const bool ignore_subdomain =
(cell->get_triangulation().locally_owned_subdomain() ==
numbers::invalid_subdomain_id);
const bool periodic_neighbor =
cell->has_periodic_neighbor(face_no);
- if ((!periodic_neighbor &&
- cell->neighbor_is_coarser(face_no)) ||
- (periodic_neighbor &&
- cell->periodic_neighbor_is_coarser(face_no)))
+ if (dim > 1 && ((!periodic_neighbor &&
+ cell->neighbor_is_coarser(face_no)) ||
+ (periodic_neighbor &&
+ cell->periodic_neighbor_is_coarser(face_no))))
{
Assert(cell->is_active(), ExcInternalError());
Assert(neighbor->is_active(), ExcInternalError());
copy);
}
}
- else if (CellIteratorType::AccessorType::dimension == 1 &&
- cell->level() > neighbor->level())
+ else if (dim == 1 && cell->level() > neighbor->level())
{
// In one dimension, there is no other check to do
const unsigned int neighbor_face_no =