]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Provide default arguments for the two-argument initialize()
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Sat, 13 Feb 2010 04:53:39 +0000 (04:53 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Sat, 13 Feb 2010 04:53:39 +0000 (04:53 +0000)
functions. Name second template argument for MGSmoothPrecondition
according to its meaning.

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

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

index 13fa78ecc6c0cc340a2d3496f9fc3279761678ad..b352d3c2e5a5898f749801857ba69838252b5972 100644 (file)
@@ -238,7 +238,7 @@ class MGSmootherRelaxation : public MGSmoother<VECTOR>
                                      */
     template <class MATRIX2, class DATA>
     void initialize (const MGLevelObject<MATRIX2>& matrices,
-                    const DATA& additional_data);
+                    const DATA& additional_data = RELAX::AdditionalData());
 
                                     /**
                                      * Initialize for matrices. This
@@ -376,7 +376,7 @@ class MGSmootherRelaxation : public MGSmoother<VECTOR>
  *
  * @author Guido Kanschat, 2009
  */
-template<class MATRIX, class RELAX, class VECTOR>
+template<class MATRIX, class PRECONDITIONER, class VECTOR>
 class MGSmootherPrecondition : public MGSmoother<VECTOR>
 {
   public:
@@ -400,14 +400,14 @@ class MGSmootherPrecondition : public MGSmoother<VECTOR>
                                      *
                                      * @p additional_data is an
                                      * object of type
-                                     * @p RELAX::AdditionalData and
+                                     * @p PRECONDITIONER::AdditionalData and
                                      * is handed to the
                                      * initialization function of the
                                      * relaxation method.
                                      */
     template <class MATRIX2, class DATA>
     void initialize (const MGLevelObject<MATRIX2>& matrices,
-                    const DATA& additional_data);
+                    const DATA& additional_data = PRECONDITIONER::AdditionalData());
 
                                     /**
                                      * Initialize for matrices. This
@@ -419,7 +419,7 @@ class MGSmootherPrecondition : public MGSmoother<VECTOR>
                                      *
                                      * @p additional_data is an
                                      * object of type
-                                     * @p RELAX::AdditionalData and
+                                     * @p PRECONDITIONER::AdditionalData and
                                      * is handed to the
                                      * initialization function of the
                                      * relaxation method.
@@ -443,7 +443,7 @@ class MGSmootherPrecondition : public MGSmoother<VECTOR>
                                      *
                                      * @p additional_data is an
                                      * object of type
-                                     * @p RELAX::AdditionalData and
+                                     * @p PRECONDITIONER::AdditionalData and
                                      * is handed to the
                                      * initialization function of the
                                      * relaxation method.
@@ -469,7 +469,7 @@ class MGSmootherPrecondition : public MGSmoother<VECTOR>
                                      *
                                      * @p additional_data is an
                                      * object of type
-                                     * @p RELAX::AdditionalData and
+                                     * @p PRECONDITIONER::AdditionalData and
                                      * is handed to the
                                      * initialization function of the
                                      * relaxation method.
@@ -496,7 +496,7 @@ class MGSmootherPrecondition : public MGSmoother<VECTOR>
                                      * Object containing relaxation
                                      * methods.
                                      */
-    MGLevelObject<RELAX> smoothers;
+    MGLevelObject<PRECONDITIONER> smoothers;
 
                                     /**
                                      * Memory used by this object.
@@ -816,9 +816,9 @@ memory_consumption () const
 
 //----------------------------------------------------------------------//
 
-template <class MATRIX, class RELAX, class VECTOR>
+template <class MATRIX, class PRECONDITIONER, class VECTOR>
 inline
-MGSmootherPrecondition<MATRIX, RELAX, VECTOR>::MGSmootherPrecondition(
+MGSmootherPrecondition<MATRIX, PRECONDITIONER, VECTOR>::MGSmootherPrecondition(
   VectorMemory<VECTOR>& mem,
   const unsigned int steps,
   const bool variable,
@@ -829,9 +829,9 @@ MGSmootherPrecondition<MATRIX, RELAX, VECTOR>::MGSmootherPrecondition(
 {}
 
 
-template <class MATRIX, class RELAX, class VECTOR>
+template <class MATRIX, class PRECONDITIONER, class VECTOR>
 inline void
-MGSmootherPrecondition<MATRIX, RELAX, VECTOR>::clear ()
+MGSmootherPrecondition<MATRIX, PRECONDITIONER, VECTOR>::clear ()
 {
   smoothers.clear();
 
@@ -842,10 +842,10 @@ MGSmootherPrecondition<MATRIX, RELAX, VECTOR>::clear ()
 }
 
 
-template <class MATRIX, class RELAX, class VECTOR>
+template <class MATRIX, class PRECONDITIONER, class VECTOR>
 template <class MATRIX2, class DATA>
 inline void
-MGSmootherPrecondition<MATRIX, RELAX, VECTOR>::initialize (
+MGSmootherPrecondition<MATRIX, PRECONDITIONER, VECTOR>::initialize (
   const MGLevelObject<MATRIX2>& m,
   const DATA& data)
 {
@@ -862,10 +862,10 @@ MGSmootherPrecondition<MATRIX, RELAX, VECTOR>::initialize (
     }
 }
 
-template <class MATRIX, class RELAX, class VECTOR>
+template <class MATRIX, class PRECONDITIONER, class VECTOR>
 template <class MATRIX2, class DATA>
 inline void
-MGSmootherPrecondition<MATRIX, RELAX, VECTOR>::initialize (
+MGSmootherPrecondition<MATRIX, PRECONDITIONER, VECTOR>::initialize (
   const MGLevelObject<MATRIX2>& m,
   const MGLevelObject<DATA>& data)
 {
@@ -887,10 +887,10 @@ MGSmootherPrecondition<MATRIX, RELAX, VECTOR>::initialize (
     }
 }
 
-template <class MATRIX, class RELAX, class VECTOR>
+template <class MATRIX, class PRECONDITIONER, class VECTOR>
 template <class MATRIX2, class DATA>
 inline void
-MGSmootherPrecondition<MATRIX, RELAX, VECTOR>::initialize (
+MGSmootherPrecondition<MATRIX, PRECONDITIONER, VECTOR>::initialize (
   const MGLevelObject<MATRIX2>& m,
   const DATA& data,
   const unsigned int row,
@@ -909,10 +909,10 @@ MGSmootherPrecondition<MATRIX, RELAX, VECTOR>::initialize (
     }
 }
 
-template <class MATRIX, class RELAX, class VECTOR>
+template <class MATRIX, class PRECONDITIONER, class VECTOR>
 template <class MATRIX2, class DATA>
 inline void
-MGSmootherPrecondition<MATRIX, RELAX, VECTOR>::initialize (
+MGSmootherPrecondition<MATRIX, PRECONDITIONER, VECTOR>::initialize (
   const MGLevelObject<MATRIX2>& m,
   const MGLevelObject<DATA>& data,
   const unsigned int row,
@@ -936,9 +936,9 @@ MGSmootherPrecondition<MATRIX, RELAX, VECTOR>::initialize (
     }
 }
 
-template <class MATRIX, class RELAX, class VECTOR>
+template <class MATRIX, class PRECONDITIONER, class VECTOR>
 inline void
-MGSmootherPrecondition<MATRIX, RELAX, VECTOR>::smooth(
+MGSmootherPrecondition<MATRIX, PRECONDITIONER, VECTOR>::smooth(
   const unsigned int level,
   VECTOR& u,
   const VECTOR& rhs) const
@@ -1009,9 +1009,9 @@ MGSmootherPrecondition<MATRIX, RELAX, VECTOR>::smooth(
 }
 
 
-template <class MATRIX, class RELAX, class VECTOR>
+template <class MATRIX, class PRECONDITIONER, class VECTOR>
 inline unsigned int
-MGSmootherPrecondition<MATRIX, RELAX, VECTOR>::
+MGSmootherPrecondition<MATRIX, PRECONDITIONER, VECTOR>::
 memory_consumption () const
 {
   return sizeof(*this)

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.