From: kanschat Date: Thu, 5 Apr 2012 15:53:34 +0000 (+0000) Subject: set neighbor geometry data on request X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f474eecce6f191089151da5a8222726a4d12c596;p=dealii-svn.git set neighbor geometry data on request git-svn-id: https://svn.dealii.org/trunk@25385 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/include/deal.II/meshworker/integration_info.h b/deal.II/include/deal.II/meshworker/integration_info.h index e2d91a7a84..5935e8ee66 100644 --- a/deal.II/include/deal.II/meshworker/integration_info.h +++ b/deal.II/include/deal.II/meshworker/integration_info.h @@ -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 + * neighbor_geometry + * 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 diff --git a/deal.II/include/deal.II/meshworker/integration_info.templates.h b/deal.II/include/deal.II/meshworker/integration_info.templates.h index 3fde96f5bd..feec2e6d63 100644 --- a/deal.II/include/deal.II/meshworker/integration_info.templates.h +++ b/deal.II/include/deal.II/meshworker/integration_info.templates.h @@ -149,12 +149,14 @@ namespace MeshWorker template void - IntegrationInfoBox::initialize_update_flags () + IntegrationInfoBox::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;