* The interface of a function call operator is defined to execute coarse
* grid solution in a derived class.
*/
-class MGCoarseGridSolver
- :
- public Subscriptor
+class MGCoarseGridSolver : public Subscriptor
{
public:
/**
* class like
* #MGCoarseGridLACIteration#.
*
- * Remark that the information
+ * Note that the information
* about the matrix is removed to
* that class.
*/
+
/**
* Abstract base class for multigrid smoothers.
* In fact, this class only provides the interface of the smoothing function.
- * Using deal.II grid handling, #MGSmoother# is a good point to start.
+ * Using #deal.II# grid handling, #MGSmoother# is a good point to start.
*
* @author Wolfgang Bangerth, Guido Kanschat, 1999
*/
-class MGSmootherBase
- :
- public Subscriptor
+class MGSmootherBase : public Subscriptor
{
public:
/**
virtual ~MGSmootherBase();
/**
- * Smoothen the residual of #u# on the given
+ * Smooth the residual of #u# on the given
* level. This function should keep the interior
* level boundary values, so you may want
* to call #set_zero_interior_boundary#
};
+
+
+
+
/**
- * Smoother doing nothing.
+ * Smoother doing nothing. This class is not useful for many applications other
+ * than for testing some multigrid procedures. Also some applications might
+ * get convergence without smoothing and then this class brings you the
+ * cheapest possible multigrid.
+ *
* @author Guido Kanschat, 1999
*/
-class MGSmootherIdentity
- :
- public MGSmootherBase
+class MGSmootherIdentity : public MGSmootherBase
{
public:
/**
const Vector<double> &rhs) const;
};
+
+
/**
* Base class used to declare the operations needed by a concrete class
* implementing prolongation and restriction of vectors in the multigrid
*
* @author Wolfgang Bangerth, Guido Kanschat, 1999
*/
-class MGTransferBase
- :
- public Subscriptor
+class MGTransferBase : public Subscriptor
{
public:
/**
const Vector<double> &src) const = 0;
};
+
+
/**
* An array with a vector for each level.
* The purpose of this class is mostly to provide range checking that is missing in
* @author Guido Kanschat, 1999
*/
template<class VECTOR>
-class MGVector
- :
- public Subscriptor,
- public vector<VECTOR>
+class MGVector : public Subscriptor,
+ public vector<VECTOR>
{
public:
/**
+
/**
* An array of matrices for each level.
* This class provides the functionality of #vector<MATRIX># combined
* @author Guido Kanschat, 1999
*/
template<class MATRIX>
-class MGMatrix
- :
- public Subscriptor,
- public vector<MATRIX>
+class MGMatrix : public Subscriptor,
+ public vector<MATRIX>
{
public:
/**
* Constructor allowing to initialize the number of levels.
*/
MGMatrix(unsigned int minlevel, unsigned int maxlevel);
+
/**
* Safe access operator.
*/
MATRIX& operator[](unsigned int);
+
/**
* Safe access operator.
*/
};
+
+
/**
* Coarse grid solver using LAC iterative methods.
* This is a little wrapper, transforming a triplet of iterative
* solver, matrix and preconditioner into a coarse grid solver.
+ *
* @author Guido Kanschat, 1999
*/
template<class SOLVER, class MATRIX, class PRECOND>
-class MGCoarseGridLACIteration
- :
- public MGCoarseGridSolver
+class MGCoarseGridLACIteration : public MGCoarseGridSolver
{
public:
/**
* preconditioning method for later
* use.
*/
- MGCoarseGridLACIteration( SOLVER&, const MATRIX&, const PRECOND&);
+ MGCoarseGridLACIteration(SOLVER&, const MATRIX&, const PRECOND&);
/**
* Implementation of the abstract
* matrix, vectors and
* preconditioner.
*/
- virtual void operator() (unsigned int level, Vector<double>& dst,
- const Vector<double>& src) const;
+ virtual void operator() (const unsigned int level,
+ Vector<double> &dst,
+ const Vector<double> &src) const;
private:
/**
* Reference to the solver.
*/
SOLVER& solver;
+
/**
* Reference to the matrix.
*/
const PRECOND& precondition;
};
+
+
/**
* Basic class for multigrid preconditioning.
*
*
* @author Guido Kanschat, 1999
* */
-class MGBase
- :
- public Subscriptor
+class MGBase : public Subscriptor
{
private:
MGBase(const MGBase&);
* The interface of a function call operator is defined to execute coarse
* grid solution in a derived class.
*/
-class MGCoarseGridSolver
- :
- public Subscriptor
+class MGCoarseGridSolver : public Subscriptor
{
public:
/**
* class like
* #MGCoarseGridLACIteration#.
*
- * Remark that the information
+ * Note that the information
* about the matrix is removed to
* that class.
*/
+
/**
* Abstract base class for multigrid smoothers.
* In fact, this class only provides the interface of the smoothing function.
- * Using deal.II grid handling, #MGSmoother# is a good point to start.
+ * Using #deal.II# grid handling, #MGSmoother# is a good point to start.
*
* @author Wolfgang Bangerth, Guido Kanschat, 1999
*/
-class MGSmootherBase
- :
- public Subscriptor
+class MGSmootherBase : public Subscriptor
{
public:
/**
virtual ~MGSmootherBase();
/**
- * Smoothen the residual of #u# on the given
+ * Smooth the residual of #u# on the given
* level. This function should keep the interior
* level boundary values, so you may want
* to call #set_zero_interior_boundary#
};
+
+
+
+
/**
- * Smoother doing nothing.
+ * Smoother doing nothing. This class is not useful for many applications other
+ * than for testing some multigrid procedures. Also some applications might
+ * get convergence without smoothing and then this class brings you the
+ * cheapest possible multigrid.
+ *
* @author Guido Kanschat, 1999
*/
-class MGSmootherIdentity
- :
- public MGSmootherBase
+class MGSmootherIdentity : public MGSmootherBase
{
public:
/**
const Vector<double> &rhs) const;
};
+
+
/**
* Base class used to declare the operations needed by a concrete class
* implementing prolongation and restriction of vectors in the multigrid
*
* @author Wolfgang Bangerth, Guido Kanschat, 1999
*/
-class MGTransferBase
- :
- public Subscriptor
+class MGTransferBase : public Subscriptor
{
public:
/**
const Vector<double> &src) const = 0;
};
+
+
/**
* An array with a vector for each level.
* The purpose of this class is mostly to provide range checking that is missing in
* @author Guido Kanschat, 1999
*/
template<class VECTOR>
-class MGVector
- :
- public Subscriptor,
- public vector<VECTOR>
+class MGVector : public Subscriptor,
+ public vector<VECTOR>
{
public:
/**
+
/**
* An array of matrices for each level.
* This class provides the functionality of #vector<MATRIX># combined
* @author Guido Kanschat, 1999
*/
template<class MATRIX>
-class MGMatrix
- :
- public Subscriptor,
- public vector<MATRIX>
+class MGMatrix : public Subscriptor,
+ public vector<MATRIX>
{
public:
/**
* Constructor allowing to initialize the number of levels.
*/
MGMatrix(unsigned int minlevel, unsigned int maxlevel);
+
/**
* Safe access operator.
*/
MATRIX& operator[](unsigned int);
+
/**
* Safe access operator.
*/
};
+
+
/**
* Coarse grid solver using LAC iterative methods.
* This is a little wrapper, transforming a triplet of iterative
* solver, matrix and preconditioner into a coarse grid solver.
+ *
* @author Guido Kanschat, 1999
*/
template<class SOLVER, class MATRIX, class PRECOND>
-class MGCoarseGridLACIteration
- :
- public MGCoarseGridSolver
+class MGCoarseGridLACIteration : public MGCoarseGridSolver
{
public:
/**
* preconditioning method for later
* use.
*/
- MGCoarseGridLACIteration( SOLVER&, const MATRIX&, const PRECOND&);
+ MGCoarseGridLACIteration(SOLVER&, const MATRIX&, const PRECOND&);
/**
* Implementation of the abstract
* matrix, vectors and
* preconditioner.
*/
- virtual void operator() (unsigned int level, Vector<double>& dst,
- const Vector<double>& src) const;
+ virtual void operator() (const unsigned int level,
+ Vector<double> &dst,
+ const Vector<double> &src) const;
private:
/**
* Reference to the solver.
*/
SOLVER& solver;
+
/**
* Reference to the matrix.
*/
const PRECOND& precondition;
};
+
+
/**
* Basic class for multigrid preconditioning.
*
*
* @author Guido Kanschat, 1999
* */
-class MGBase
- :
- public Subscriptor
+class MGBase : public Subscriptor
{
private:
MGBase(const MGBase&);