From: Guido Kanschat <dr.guido.kanschat@gmail.com>
Date: Thu, 29 Jun 2000 20:05:54 +0000 (+0000)
Subject: Refinement edges for DG added
X-Git-Tag: v8.0.0~20316
X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ec57622f86bd2d3e41c5d4af57e331036d3fc0ff;p=dealii.git

Refinement edges for DG added


git-svn-id: https://svn.dealii.org/trunk@3107 0785d39b-7218-0410-832d-ea1e28bc413d
---

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<double> &src,
 			      const Vector<double> &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<double>       &dst,
+			     const Vector<double> &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 <cmath>
 
 
-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<double>&,
+		    const Vector<double>&)
+{}
+
 //////////////////////////////////////////////////////////////////////
 
 MGCoarseGridSolver::~MGCoarseGridSolver()