]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add ScratchData::reinit() for interfaces that does not require arguments for the...
authorJean-Paul Pelteret <jppelteret@gmail.com>
Fri, 23 Dec 2022 11:12:23 +0000 (12:12 +0100)
committerJean-Paul Pelteret <jppelteret@gmail.com>
Thu, 29 Dec 2022 07:40:15 +0000 (08:40 +0100)
include/deal.II/meshworker/scratch_data.h
source/meshworker/scratch_data.cc

index ee2d98b17d090f9a9b05de8aaae6ec3903895ca5..2d2423d64fdd17c6068cff870f3482bc6898c9f9 100644 (file)
@@ -459,6 +459,27 @@ namespace MeshWorker
            const unsigned int face_no,
            const unsigned int subface_no);
 
+    /**
+     * Initialize the internal FEInterfaceValues with the given arguments, and
+     * return a reference to it.
+     *
+     * After calling this function, get_local_dof_indices(),
+     * get_quadrature_points(), get_normal_vectors(), and get_JxW_values() will
+     * be forwarded to the local FEInterfaceValues object. The methods
+     * get_current_fe_values() will return the FEValuesBase associated to the
+     * current cell, while get_neighbor_fe_values() will be associated with the
+     * neighbor cell. The method get_local_dof_indices() will return the
+     * same result of FEInterfaceValues::get_interface_dof_indices(),
+     * while the get_neighbor_dof_indices() will return the local dof indices
+     * of the neighbor cell.
+     */
+    const FEInterfaceValues<dim, spacedim> &
+    reinit(const typename DoFHandler<dim, spacedim>::active_cell_iterator &cell,
+           const unsigned int face_no,
+           const typename DoFHandler<dim, spacedim>::active_cell_iterator
+             &                cell_neighbor,
+           const unsigned int face_no_neighbor);
+
     /**
      * Initialize the internal FEInterfaceValues with the given arguments, and
      * return a reference to it.
index 434307edad4c9480445833990af59ecfd8c0b01b..fedca84bc440883fc560e2fd66896cb4cd6ccba2 100644 (file)
@@ -433,6 +433,25 @@ namespace MeshWorker
 
 
 
+  template <int dim, int spacedim>
+  const FEInterfaceValues<dim, spacedim> &
+  ScratchData<dim, spacedim>::reinit(
+    const typename DoFHandler<dim, spacedim>::active_cell_iterator &cell,
+    const unsigned int                                              face_no,
+    const typename DoFHandler<dim, spacedim>::active_cell_iterator
+      &                cell_neighbor,
+    const unsigned int face_no_neighbor)
+  {
+    return reinit(cell,
+                  face_no,
+                  numbers::invalid_unsigned_int,
+                  cell_neighbor,
+                  face_no_neighbor,
+                  numbers::invalid_unsigned_int);
+  }
+
+
+
   template <int dim, int spacedim>
   const FEInterfaceValues<dim, spacedim> &
   ScratchData<dim, spacedim>::reinit(

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.