]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
New reinit function.
authorhartmann <hartmann@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 17 Dec 2002 11:08:13 +0000 (11:08 +0000)
committerhartmann <hartmann@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 17 Dec 2002 11:08:13 +0000 (11:08 +0000)
git-svn-id: https://svn.dealii.org/trunk@6838 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/multigrid/multigrid.h

index 9acfc3b4220f524194dad71c65b4bdfec970f389..a83843198416a9bc43c607fe3db2070905f9fc5e 100644 (file)
@@ -59,7 +59,7 @@
  * returning the solution to the system @p{Ax=b} on the coarsest level
  * in @p{x}.
  * 
- * @author Guido Kanschat, 1999, 2001, 2002
+ * @author Guido Kanschat, 1999, 2001, 2002, Ralf Hartmann 2002
  */
 template <class VECTOR>
 class Multigrid : public Subscriptor
@@ -99,7 +99,14 @@ class Multigrid : public Subscriptor
              const MGSmoother<VECTOR>& post_smooth,
              const unsigned int            minlevel = 0,
              const unsigned int            maxlevel = 1000000);
-    
+
+
+                                    /**
+                                     * Reinit this class according to
+                                     * @p{minlevel} and @p{maxlevel}.
+                                     */
+    void reinit (const unsigned int minlevel,
+                const unsigned int maxlevel);
 
                                     /**
                                      * Execute one step of the
@@ -333,10 +340,22 @@ Multigrid<VECTOR>::Multigrid (const MGDoFHandler<dim>& mg_dof_handler,
                post_smooth(&post_smooth),
                edge_down(0),
                edge_up(0)
-{
-};
+{}
 
 
+template <class VECTOR>
+void
+Multigrid<VECTOR>::reinit(const unsigned int min_level,
+                         const unsigned int max_level)
+{
+  minlevel=min_level;
+  maxlevel=max_level;
+  defect.resize(minlevel, maxlevel);
+  solution.resize(minlevel, maxlevel);
+  t.resize(minlevel, maxlevel);
+}
+
+  
 /* --------------------------- inline functions --------------------- */
 
 

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.