]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Add another constructor for the 1d case, since there no faces exist. Not yet implemen...
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 14 Apr 1999 11:23:48 +0000 (11:23 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 14 Apr 1999 11:23:48 +0000 (11:23 +0000)
git-svn-id: https://svn.dealii.org/trunk@1135 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/multigrid/mg_smoother.h
deal.II/deal.II/include/numerics/mg_smoother.h
deal.II/deal.II/source/multigrid/mg_smoother.cc
deal.II/deal.II/source/numerics/mg_smoother.cc

index 6ae764fe0068c45091cd7853e2e820990b77848c..2703b910cf9927681d934a012c9c0b649747a56d 100644 (file)
@@ -36,7 +36,25 @@ class MGSmoother :  public Subscriptor
   public:
 
                                     /**
-                                     * Constructor. This one sets clobbers
+                                     * Constructor. This one collects
+                                     * the indices of the degrees of freedom
+                                     * on the interior boundaries between
+                                     * the different levels, which are
+                                     * needed by the function
+                                     * #set_zero_interior_boundaries#.
+                                     *
+                                     * Since this function is implemented
+                                     * a bit different in 1d (there are no
+                                     * faces of cells, just vertices),
+                                     * there are actually two sets of
+                                     * constructors, namely this one for 1d
+                                     * and the following one for all other
+                                     * dimensions.
+                                     */
+    MGSmoother (const MGDoFHandler<1> &mg_dof);
+
+                                    /**
+                                     * Constructor. This one collects
                                      * the indices of the degrees of freedom
                                      * on the interior boundaries between
                                      * the different levels, which are
index 6ae764fe0068c45091cd7853e2e820990b77848c..2703b910cf9927681d934a012c9c0b649747a56d 100644 (file)
@@ -36,7 +36,25 @@ class MGSmoother :  public Subscriptor
   public:
 
                                     /**
-                                     * Constructor. This one sets clobbers
+                                     * Constructor. This one collects
+                                     * the indices of the degrees of freedom
+                                     * on the interior boundaries between
+                                     * the different levels, which are
+                                     * needed by the function
+                                     * #set_zero_interior_boundaries#.
+                                     *
+                                     * Since this function is implemented
+                                     * a bit different in 1d (there are no
+                                     * faces of cells, just vertices),
+                                     * there are actually two sets of
+                                     * constructors, namely this one for 1d
+                                     * and the following one for all other
+                                     * dimensions.
+                                     */
+    MGSmoother (const MGDoFHandler<1> &mg_dof);
+
+                                    /**
+                                     * Constructor. This one collects
                                      * the indices of the degrees of freedom
                                      * on the interior boundaries between
                                      * the different levels, which are
index b415f18743c1032f2a632e53d9c5427dea8eb20b..bc6a227a858898f439d05c9ff8c5d3250ed0e493 100644 (file)
 #include <algorithm>
 
 
+#if deal_II_dimension == 1
 
+MGSmoother::MGSmoother (const MGDoFHandler<1> &/*mg_dof*/) 
+{
+  Assert (false, ExcNotImplemented());
+};
+
+#endif
+
+
+#if deal_II_dimension > 1
 
 template <int dim>
 MGSmoother::MGSmoother (const MGDoFHandler<dim> &mg_dof) 
@@ -71,6 +81,8 @@ MGSmoother::MGSmoother (const MGDoFHandler<dim> &mg_dof)
     };      
 };
 
+#endif
+
 
 
 MGSmoother::~MGSmoother () 
@@ -104,4 +116,8 @@ MGSmoother::post_smooth (const unsigned int  level,
 
 
 // explicit instantiations
+// don't do the following instantiation in 1d, since there is a specialized
+// function there
+#if deal_II_dimension > 1
 template MGSmoother::MGSmoother (const MGDoFHandler<deal_II_dimension>&);
+#endif
index b415f18743c1032f2a632e53d9c5427dea8eb20b..bc6a227a858898f439d05c9ff8c5d3250ed0e493 100644 (file)
 #include <algorithm>
 
 
+#if deal_II_dimension == 1
 
+MGSmoother::MGSmoother (const MGDoFHandler<1> &/*mg_dof*/) 
+{
+  Assert (false, ExcNotImplemented());
+};
+
+#endif
+
+
+#if deal_II_dimension > 1
 
 template <int dim>
 MGSmoother::MGSmoother (const MGDoFHandler<dim> &mg_dof) 
@@ -71,6 +81,8 @@ MGSmoother::MGSmoother (const MGDoFHandler<dim> &mg_dof)
     };      
 };
 
+#endif
+
 
 
 MGSmoother::~MGSmoother () 
@@ -104,4 +116,8 @@ MGSmoother::post_smooth (const unsigned int  level,
 
 
 // explicit instantiations
+// don't do the following instantiation in 1d, since there is a specialized
+// function there
+#if deal_II_dimension > 1
 template MGSmoother::MGSmoother (const MGDoFHandler<deal_II_dimension>&);
+#endif

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.