From ec57622f86bd2d3e41c5d4af57e331036d3fc0ff Mon Sep 17 00:00:00 2001 From: Guido Kanschat Date: Thu, 29 Jun 2000 20:05:54 +0000 Subject: [PATCH] Refinement edges for DG added git-svn-id: https://svn.dealii.org/trunk@3107 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/deal.II/include/multigrid/mg_base.h | 32 +++++++++++++++++++++ deal.II/deal.II/source/multigrid/mg_base.cc | 16 +++++++++-- 2 files changed, 45 insertions(+), 3 deletions(-) diff --git a/deal.II/deal.II/include/multigrid/mg_base.h b/deal.II/deal.II/include/multigrid/mg_base.h index ae1f046c67..71a41e963e 100644 --- a/deal.II/deal.II/include/multigrid/mg_base.h +++ b/deal.II/deal.II/include/multigrid/mg_base.h @@ -391,6 +391,38 @@ class MGBase : public Subscriptor const Vector &src, const Vector &rhs) = 0; + /** + * Additional multiplication on a + * refinement edge. Using DGFEM, + * the application of the global + * matrix to a function on the + * fine level produces results on + * the surrounding cells of the + * coarse level. Therefore, + * additionally to the fine level + * matrix, we need an operator + * from the fine level to the + * coarse level, taking care of + * this multiplication. + * + * Like @ref{level_vmult}, it is + * expected to add the negative + * product of the matrix and + * @p{src} to @p{dst}. Here, + * @p{src} is a vector on the + * fine level and @p{dst} is a + * vector on the coarse level. + * + * This function has an empty + * implementation here and must + * be overloaded in a multigrid + * class for discontinuous + * methods. + */ + virtual void edge_vmult (const unsigned int level, + Vector &dst, + const Vector &src); + /** * Print a level vector using * @ref{DoFHandler}. diff --git a/deal.II/deal.II/source/multigrid/mg_base.cc b/deal.II/deal.II/source/multigrid/mg_base.cc index 6dd37906b1..f1ab40ffe2 100644 --- a/deal.II/deal.II/source/multigrid/mg_base.cc +++ b/deal.II/deal.II/source/multigrid/mg_base.cc @@ -18,7 +18,7 @@ #include -MGBase::~MGBase () +MGBase::~MGBase () {} @@ -84,9 +84,13 @@ MGBase::level_mgstep(const unsigned int level, level_vmult(level, t, solution[level], defect[level]); // make t rhs of lower level -//TODO: this function adds the restricted t to defect[level-1]. -//TODO: why don't we have to clear it before? + // The non-refined parts of the + // coarse-level defect already contain + // the global defect. transfer->restrict_and_add (level, defect[level-1], t); + + // add additional DG contribution + edge_vmult(level, defect[level-1], defect[level]); // do recursion level_mgstep(level-1, pre_smooth, post_smooth, coarse_grid_solver); @@ -121,6 +125,12 @@ MGBase::level_mgstep(const unsigned int level, } +void +MGBase::edge_vmult (const unsigned int, + Vector&, + const Vector&) +{} + ////////////////////////////////////////////////////////////////////// MGCoarseGridSolver::~MGCoarseGridSolver() -- 2.39.5