From 270366660b83ddb9c4d6aca37744c976b0188eda Mon Sep 17 00:00:00 2001 From: janssen Date: Fri, 7 May 2010 14:37:24 +0000 Subject: [PATCH] interface matrices in mg assebly for continuous elements added git-svn-id: https://svn.dealii.org/trunk@21094 0785d39b-7218-0410-832d-ea1e28bc413d --- .../include/numerics/mesh_worker_assembler.h | 52 +++++++++++++++++++ deal.II/deal.II/source/multigrid/mg_tools.cc | 2 +- 2 files changed, 53 insertions(+), 1 deletion(-) diff --git a/deal.II/deal.II/include/numerics/mesh_worker_assembler.h b/deal.II/deal.II/include/numerics/mesh_worker_assembler.h index 4ec6764d87..ef5bb877ae 100644 --- a/deal.II/deal.II/include/numerics/mesh_worker_assembler.h +++ b/deal.II/deal.II/include/numerics/mesh_worker_assembler.h @@ -565,6 +565,16 @@ namespace MeshWorker void initialize_fluxes(MGLevelObject& flux_up, MGLevelObject& flux_down); + /** + * Initialize the matrices + * #interface_up and #interface_down + * used for local refinement + * with continuous + * Galerkin methods. + */ + + void initialize_interfaces(MGLevelObject& interface_up, + MGLevelObject& interface_down); /** * Initialize the local data * in the @@ -643,6 +653,24 @@ namespace MeshWorker * fine to coarse. */ SmartPointer,MGMatrixSimple > flux_down; + + /** + * The matrix used for face + * contributions for continuous + * elements across the + * refinement edge, coupling + * coarse to fine. + */ + SmartPointer,MGMatrixSimple > interface_up; + + /** + * The matrix used for face + * contributions for continuous + * elements across the + * refinement edge, coupling + * fine to coarse. + */ + SmartPointer,MGMatrixSimple > interface_down; /** * The smallest positive @@ -927,6 +955,20 @@ namespace MeshWorker * level at refinement edges. */ std::vector flux_up; + + /** + * The interface matrix between + * the fine and the coarse + * level at refinement edges. + */ + std::vector interface_down; + + /** + * The interface matrix between + * the coarse and the fine + * level at refinement edges. + */ + std::vector interface_up; /** * A pointer to the object containing the block structure. @@ -1389,6 +1431,16 @@ namespace MeshWorker } + template + inline void + MGMatrixSimple::initialize_interfaces( + MGLevelObject& up, MGLevelObject& down) + { + interface_up = &up; + interface_down = &down; + } + + template template inline void diff --git a/deal.II/deal.II/source/multigrid/mg_tools.cc b/deal.II/deal.II/source/multigrid/mg_tools.cc index 035e80a42c..5a7ea92d23 100644 --- a/deal.II/deal.II/source/multigrid/mg_tools.cc +++ b/deal.II/deal.II/source/multigrid/mg_tools.cc @@ -1520,7 +1520,7 @@ extract_inner_interface_dofs (const MGDoFHandler &mg_dof_handler, for (unsigned int face_nr=0; face_nr::faces_per_cell; ++face_nr) if(cell->at_boundary(face_nr)) for(unsigned int j=0; j