]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Refinement edges for DG added
authorguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 29 Jun 2000 20:05:54 +0000 (20:05 +0000)
committerguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 29 Jun 2000 20:05:54 +0000 (20:05 +0000)
git-svn-id: https://svn.dealii.org/trunk@3107 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/multigrid/mg_base.h
deal.II/deal.II/source/multigrid/mg_base.cc

index ae1f046c67f54d502d46752522cef432afd5be75..71a41e963ec65c4b9df3d5f4897245fdf6c658a1 100644 (file)
@@ -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}.
index 6dd37906b105f2dd36c2eec9351dd958d0fa248c..f1ab40ffe2927ae76930b7234792dc23bd8cc817 100644 (file)
@@ -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()

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.