const unsigned int n_faces_or_subfaces,
const UpdateFlags update_flags,
const FiniteElement<dim> &fe);
-
- /**
+
+ /**
+ * Virtual destructor needed for
+ * the virtual @p{get_face}
+ * function.
+ */
+ virtual ~FEFaceValuesBase ();
+
+ /**
* Return the outward normal vector to
* the cell at the @p{i}th quadrature
* point. The length of the vector
*/
const vector<Point<dim> > & get_normal_vectors () const;
+ /**
+ * Return the present
+ * face. Implemented in the
+ * derived classes.
+ */
+ virtual DoFHandler<dim>::face_iterator get_face() const=0;
+
+
protected:
/**
* Store the gradients of the shape
*/
void reinit (const typename DoFHandler<dim>::cell_iterator &cell,
const unsigned int face_no);
+
+
+ /**
+ * Return the present face.
+ */
+ virtual DoFHandler<dim>::face_iterator get_face() const;
};
const unsigned int face_no,
const unsigned int subface_no);
+ /**
+ * Return the present face.
+ */
+ virtual DoFHandler<dim>::face_iterator get_face() const;
+
/**
* Exception
*/
DeclException0 (ExcReinitCalledWithBoundaryFace);
-};
+ /**
+ * Exception
+ */
+ DeclException0 (ExcFaceHasNoSubfaces);
+
+ protected:
+
+ /**
+ * Store the subface selected
+ * last time the @p{reinit}
+ * function was called. Is used
+ * by the @p{get_face} fuction.
+ */
+ DoFHandler<dim>::face_iterator present_subface;
+};
/*------------------------ Inline functions: FEFaceValuesBase --------------------*/
+template <int dim>
+inline
+FEFaceValuesBase<dim>::~FEFaceValuesBase()
+{};
+
+
template <int dim>
inline
const vector<Point<dim> > &
};
+/*------------------------ Inline functions: FEFaceValues ------------------------*/
+
+template <int dim>
+inline
+DoFHandler<dim>::face_iterator
+FEFaceValues<dim>::get_face() const {
+ return present_cell->face(selected_dataset);
+};
+
+
+
+/*------------------------ Inline functions: FESubfaceValues ------------------------*/
+
+template <int dim>
+inline
+DoFHandler<dim>::face_iterator
+FESubfaceValues<dim>::get_face() const {
+ return present_subface;
+};
+
+
#endif
const unsigned int face_no,
const unsigned int subface_no)
{
+ Assert (face_no < GeometryInfo<dim>::faces_per_cell,
+ ExcIndexRange (face_no, 0, GeometryInfo<dim>::faces_per_cell));
+ Assert (subface_no < GeometryInfo<dim>::subfaces_per_face,
+ ExcIndexRange (subface_no, 0, GeometryInfo<dim>::subfaces_per_face));
Assert (cell->face(face_no)->at_boundary() == false,
ExcReinitCalledWithBoundaryFace());
+ Assert (cell->face(face_no)->has_children()== true,
+ ExcFaceHasNoSubfaces());
present_cell = cell;
+ present_subface = cell->face(face_no)->child(subface_no);
selected_dataset = face_no*(1<<(dim-1)) + subface_no;
// assert that the finite elements
==
static_cast<const FiniteElementData<dim>&>(cell->get_dof_handler().get_fe()),
typename FEValuesBase<dim>::ExcFEDontMatch());
- Assert (face_no < GeometryInfo<dim>::faces_per_cell,
- ExcIndexRange (face_no, 0, GeometryInfo<dim>::faces_per_cell));
- Assert (subface_no < GeometryInfo<dim>::subfaces_per_face,
- ExcIndexRange (subface_no, 0, GeometryInfo<dim>::subfaces_per_face));
// fill jacobi matrices and real
// quadrature points