]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
set neighbor geometry data on request
authorkanschat <kanschat@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 5 Apr 2012 15:53:34 +0000 (15:53 +0000)
committerkanschat <kanschat@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 5 Apr 2012 15:53:34 +0000 (15:53 +0000)
git-svn-id: https://svn.dealii.org/trunk@25385 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/include/deal.II/meshworker/integration_info.h
deal.II/include/deal.II/meshworker/integration_info.templates.h

index e2d91a7a848251cb11ba8bcb13a7bddf302800e2..5935e8ee66c986cb970a7e6fd66be4125a3b5124 100644 (file)
@@ -406,19 +406,26 @@ namespace MeshWorker
                                        /* @{ */
 
                                       /**
-                                       * Call this function after
+                                       * Call this function before
                                        * initialize() in order to
                                        * guess the update flags
-                                       * needed.
+                                       * needed, based on the data
+                                       * selected.
                                        *
-                                       * In most cases, this sets all
-                                       * the update flags required
-                                       * for computations. If more
-                                       * are needed, call one of the
-                                       * functions below to add more
-                                       * update flags.
+                                       * When computing face fluxes,
+                                       * we normally can use the
+                                       * geometry (integration
+                                       * weights and normal vectors)
+                                       * from the original cell and
+                                       * thus can avoid updating
+                                       * these values on the
+                                       * neighboring cell. Set
+                                       * <tt>neighbor_geometry</tt>
+                                       * to true in order to
+                                       * initialize these values as
+                                       * well.
                                        */
-      void initialize_update_flags();
+      void initialize_update_flags(bool neighbor_geometry = false);
 
                                        /**
                                         * Add FEValues UpdateFlags for
index 3fde96f5bde0f056e8b2dac18dd2101df31d487f..feec2e6d63218aedb5a8ed3551935eeaf465b6c2 100644 (file)
@@ -149,12 +149,14 @@ namespace MeshWorker
 
   template<int dim, int sdim>
   void
-  IntegrationInfoBox<dim,sdim>::initialize_update_flags ()
+  IntegrationInfoBox<dim,sdim>::initialize_update_flags (bool neighbor_geometry)
   {
     cell_flags |= update_JxW_values;
     boundary_flags |= UpdateFlags(update_JxW_values | update_normal_vectors);
     face_flags |= boundary_flags;
-    neighbor_flags |= update_default;
+    neighbor_flags |= neighbor_geometry
+                     ? boundary_flags
+                     : update_default;
 
     if (cell_selector.has_values() != 0) cell_flags |= update_values;
     if (cell_selector.has_gradients() != 0) cell_flags |= update_gradients;

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.