const typename Triangulation<dim,spacedim>::cell_iterator &cell,
const Point<spacedim> &p) const = 0;
+/**
+ * Transforms the point @p p on the real @p cell to the corresponding point
+ * on the unit cell, and then projects it to a dim-1 point on the face with
+ * the given face number @p face_no. Ideally the point @p p is near the face
+ * @ face_no, but any point in the cell can technically be projected.
+ */
+virtual Point<dim-1>
+transform_real_to_unit_projected_to_face (
+ const typename Triangulation<dim,spacedim>::cell_iterator &cell,
+ const unsigned int &face_no,
+ const Point<spacedim> &p) const;
+
/**
* Base class for internal data of mapping objects. The
* internal mechanism is that upon construction of a FEValues object, it
}
+template<int dim, int spacedim>
+Point<dim-1>
+Mapping<dim,spacedim>::
+transform_real_to_unit_projected_to_face (
+ const typename Triangulation<dim,spacedim>::cell_iterator &cell,
+ const unsigned int &face_no,
+ const Point<spacedim> &p) const
+{
+ Point<dim> unit_cell_pt = transform_real_to_unit_cell(cell, p);
+
+ Point<dim-1> unit_face_pt;
+
+ if (dim==2) {
+ if (GeometryInfo<dim>::unit_normal_direction[face_no] == 0)
+ unit_face_pt = Point<dim-1>(unit_cell_pt(1));
+ else if (GeometryInfo<dim>::unit_normal_direction[face_no] == 1)
+ unit_face_pt = Point<dim-1>(unit_cell_pt(0));
+ }
+ else if (dim==3) {
+ if (GeometryInfo<dim>::unit_normal_direction[face_no] == 0)
+ unit_face_pt = Point<dim-1>(unit_cell_pt(1), unit_cell_pt(2));
+ else if (GeometryInfo<dim>::unit_normal_direction[face_no] == 1)
+ unit_face_pt = Point<dim-1>(unit_cell_pt(0), unit_cell_pt(2));
+ else if (GeometryInfo<dim>::unit_normal_direction[face_no] == 2)
+ unit_face_pt = Point<dim-1>(unit_cell_pt(0), unit_cell_pt(1));
+ }
+
+ return unit_face_pt;
+}
/*------------------------------ InternalDataBase ------------------------------*/
}
+
+
/*------------------------------ InternalData ------------------------------*/