Skip to content
Snippets Groups Projects
Commit e8549ed3 authored by Christian Engwer's avatar Christian Engwer
Browse files

[dynamic polymorphism] update schwarz.hh to the new interface

parent e569bbf1
No related branches found
No related tags found
No related merge requests found
......@@ -98,11 +98,6 @@ namespace Dune {
//! implementing the same interface.
typedef C communication_type;
enum {
//! \brief The solver category.
category=SolverCategory::overlapping
};
/**
* @brief constructor: just store a reference to a matrix.
*
......@@ -137,6 +132,12 @@ namespace Dune {
return _A_;
}
//! Category of the linear operator (see SolverCategory::Category)
virtual SolverCategory::Category category() const
{
return SolverCategory::overlapping;
}
private:
const matrix_type& _A_;
const communication_type& communication;
......@@ -177,9 +178,6 @@ namespace Dune {
//! implementing the same interface.
typedef C communication_type;
//! define the category
enum {category=SolverCategory::overlapping};
/*! \brief Constructor needs to know the grid
* \param com The communication object for syncing overlap and copy
* data points. (E.~g. OwnerOverlapCopyCommunication )
......@@ -207,6 +205,12 @@ namespace Dune {
return communication.norm(x);
}
//! Category of the scalar product (see SolverCategory::Category)
virtual SolverCategory::Category category() const
{
return SolverCategory::overlapping;
}
private:
const communication_type& communication;
};
......@@ -263,12 +267,6 @@ namespace Dune {
//! \brief The type of the communication object.
typedef C communication_type;
// define the category
enum {
//! \brief The category the precondtioner is part of.
category=SolverCategory::overlapping
};
/*! \brief Constructor.
constructor gets all parameters to operate the prec.
......@@ -313,6 +311,12 @@ namespace Dune {
*/
virtual void post (X& x) {}
//! Category of the preconditioner (see SolverCategory::Category)
virtual SolverCategory::Category category() const
{
return SolverCategory::overlapping;
}
private:
//! \brief The matrix we operate on.
const matrix_type& _A_;
......@@ -374,12 +378,6 @@ namespace Dune {
//! implementing the same interface.
typedef C communication_type;
// define the category
enum {
//! \brief The category the precondtioner is part of.
category=SolverCategory::overlapping
};
/*! \brief Constructor.
constructor gets all parameters to operate the prec.
......@@ -430,6 +428,12 @@ namespace Dune {
preconditioner.post(x);
}
//! Category of the preconditioner (see SolverCategory::Category)
virtual SolverCategory::Category category() const
{
return SolverCategory::overlapping;
}
private:
//! \brief a sequential preconditioner
T& preconditioner;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment