From d5ce7f9d5d86d56f57eb4d5a7abad8f3c582f6d3 Mon Sep 17 00:00:00 2001 From: Jean-Paul Pelteret Date: Fri, 6 Aug 2021 19:07:36 +0200 Subject: [PATCH] Add FEInterfaceValues::get_cell() and FEInterfaceValues::get_face_number() --- include/deal.II/fe/fe_interface_values.h | 38 ++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/include/deal.II/fe/fe_interface_values.h b/include/deal.II/fe/fe_interface_values.h index 93a74a1db1..89503d44f6 100644 --- a/include/deal.II/fe/fe_interface_values.h +++ b/include/deal.II/fe/fe_interface_values.h @@ -644,6 +644,25 @@ public: UpdateFlags get_update_flags() const; + /** + * Return a triangulation iterator to the current cell of the interface. + * + * The @p cell_index is either 0 or 1 and corresponds to the cell index + * returned by interface_dof_to_cell_and_dof_index(). + */ + const typename Triangulation::cell_iterator + get_cell(const unsigned int cell_index) const; + + /** + * Return the number of the face on the interface selected the last time + * the reinit() function was called. + * + * The @p cell_index is either 0 or 1 and corresponds to the cell index + * returned by interface_dof_to_cell_and_dof_index(). + */ + unsigned int + get_face_number(const unsigned int cell_index) const; + /** * @name Functions to query information on a given interface * @{ @@ -1360,6 +1379,25 @@ FEInterfaceValues::get_update_flags() const +template +const typename Triangulation::cell_iterator +FEInterfaceValues::get_cell(const unsigned int cell_index) const +{ + return get_fe_face_values(cell_index).get_cell(); +} + + + +template +inline unsigned int +FEInterfaceValues::get_face_number( + const unsigned int cell_index) const +{ + return get_fe_face_values(cell_index).get_face_number(); +} + + + template unsigned FEInterfaceValues::n_current_interface_dofs() const -- 2.39.5