From: Jean-Paul Pelteret Date: Fri, 6 Aug 2021 17:07:36 +0000 (+0200) Subject: Add FEInterfaceValues::get_cell() and FEInterfaceValues::get_face_number() X-Git-Tag: v9.4.0-rc1~1099^2~2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d5ce7f9d5d86d56f57eb4d5a7abad8f3c582f6d3;p=dealii.git Add FEInterfaceValues::get_cell() and FEInterfaceValues::get_face_number() --- 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