* pair of numbers, face_no and
* subface_no, with the following
* property:
- * @p{cell->neighbor(neighbor)->face(face_no)->child(subface_no)==cell}.
+ * @p{cell->neighbor(neighbor)->face(face_no)->child(subface_no)==cell->face(neighbor)}.
+ *
+ * This function is impossible
+ * for @p{dim==1}.
*/
- std::pair<unsigned int, unsigned int> neighbor_of_coarser_neighbor (const unsigned int neighbor) const;
+ std::pair<unsigned int, unsigned int>
+ neighbor_of_coarser_neighbor (const unsigned int neighbor) const;
/**
* Return whether the @p{i}th
return (vertex(0)[0] <= p[0]) && (p[0] <= vertex(1)[0]);
}
+
+template <>
+std::pair<unsigned int, unsigned int>
+CellAccessor<1>::neighbor_of_coarser_neighbor (const unsigned int) const
+{
+ Assert(false, ExcImpossibleInDim(1));
+ return std::make_pair (static_cast<unsigned int>(-1),
+ static_cast<unsigned int>(-1));
+}
+
+
#endif
template <int dim>
-pair<unsigned int, unsigned int>
+std::pair<unsigned int, unsigned int>
CellAccessor<dim>::neighbor_of_coarser_neighbor (const unsigned int neighbor) const
{
// make sure that the neighbor is
if (face_guess->has_children())
for (unsigned int subface_no=0; subface_no<GeometryInfo<dim>::subfaces_per_face; ++subface_no)
if (face_guess->child(subface_no)==this_face)
- return pair<unsigned int,unsigned int> (face_no_guess, subface_no);
+ return std::make_pair (face_no_guess, subface_no);
// if the guess was false, then
// we need to loop over all faces
if (face->has_children())
for (unsigned int subface_no=0; subface_no<GeometryInfo<dim>::subfaces_per_face; ++subface_no)
if (face->child(subface_no)==this_face)
- return pair<unsigned int,unsigned int> (face_no, subface_no);
+ return std::make_pair (face_no, subface_no);
}
}
// since then we did not find
// our way back...
Assert (false, ExcInternalError());
- return pair<unsigned int,unsigned int> (static_cast<unsigned int>(-1),
- static_cast<unsigned int>(-1));
+ return std::make_pair (static_cast<unsigned int>(-1),
+ static_cast<unsigned int>(-1));
};