From 07c7561228bb041ecf059b3b3c2247c5e7425c16 Mon Sep 17 00:00:00 2001 From: janssen Date: Tue, 16 Mar 2010 15:52:39 +0000 Subject: [PATCH] call mg_fill for level cells and fill otherwise git-svn-id: https://svn.dealii.org/trunk@20832 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/deal.II/include/numerics/mesh_worker_info.h | 1 + .../include/numerics/mesh_worker_info.templates.h | 11 +++++++++++ .../numerics/mesh_worker_vector_selector.templates.h | 8 ++++++-- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/deal.II/deal.II/include/numerics/mesh_worker_info.h b/deal.II/deal.II/include/numerics/mesh_worker_info.h index b591f74641..5e69d90ee3 100644 --- a/deal.II/deal.II/include/numerics/mesh_worker_info.h +++ b/deal.II/deal.II/include/numerics/mesh_worker_info.h @@ -351,6 +351,7 @@ namespace MeshWorker /// The block structure of the system SmartPointer > block_info; + bool level_cell; private: /** * Standard constructor, not diff --git a/deal.II/deal.II/include/numerics/mesh_worker_info.templates.h b/deal.II/deal.II/include/numerics/mesh_worker_info.templates.h index 26eccbb9ed..dadacaa15d 100644 --- a/deal.II/deal.II/include/numerics/mesh_worker_info.templates.h +++ b/deal.II/deal.II/include/numerics/mesh_worker_info.templates.h @@ -50,6 +50,8 @@ namespace MeshWorker } else indices.resize(0); + + level_cell = false; } @@ -68,6 +70,7 @@ namespace MeshWorker for (unsigned int i=0;iblock_info->renumber(i)] = indices_org[i]; } + level_cell = true; } //----------------------------------------------------------------------// @@ -224,6 +227,10 @@ namespace MeshWorker const unsigned int block_start = info.block_info->local().block_start(b); const unsigned int block_size = info.block_info->local().block_size(b); + if(info.level_cell) + this->global_data->mg_fill(values, gradients, hessians, fe, info.cell->level(), info.indices, + comp, n_comp, block_start, block_size); + else this->global_data->fill(values, gradients, hessians, fe, info.indices, comp, n_comp, block_start, block_size); comp += n_comp; @@ -233,6 +240,10 @@ namespace MeshWorker { const FEValuesBase& fe = this->fe_values(0); const unsigned int n_comp = fe.get_fe().n_components(); + if(info.level_cell) + this->global_data->mg_fill(values, gradients, hessians, fe, info.cell->level(), info.indices, + 0, n_comp, 0, info.indices.size()); + else this->global_data->fill(values, gradients, hessians, fe, info.indices, 0, n_comp, 0, info.indices.size()); } diff --git a/deal.II/deal.II/include/numerics/mesh_worker_vector_selector.templates.h b/deal.II/deal.II/include/numerics/mesh_worker_vector_selector.templates.h index b54dbe4294..5b8c3f826f 100644 --- a/deal.II/deal.II/include/numerics/mesh_worker_vector_selector.templates.h +++ b/deal.II/deal.II/include/numerics/mesh_worker_vector_selector.templates.h @@ -48,7 +48,9 @@ namespace MeshWorker unsigned int, unsigned int, unsigned int) const - {} + { + Assert(false, ExcNotImplemented()); + } template @@ -64,7 +66,9 @@ namespace MeshWorker unsigned int, unsigned int, unsigned int) const - {} + { + Assert(false, ExcNotImplemented()); + } //----------------------------------------------------------------------// template -- 2.39.5