Skip to content
Snippets Groups Projects
Commit cb50c4ea authored by graeser's avatar graeser Committed by graeser
Browse files

The rhs vector should be const

The rhs_ member is the real rhs_ and not the residual.
It actually was already const semantically.

[[Imported from SVN: r5811]]
parent eecc8714
No related branches found
No related tags found
No related merge requests found
...@@ -28,7 +28,7 @@ template<class OperatorType, ...@@ -28,7 +28,7 @@ template<class OperatorType,
BlockGSStep() {} BlockGSStep() {}
//! Constructor with a linear problem //! Constructor with a linear problem
BlockGSStep(const OperatorType& mat, DiscFuncType& x, DiscFuncType& rhs) BlockGSStep(const OperatorType& mat, DiscFuncType& x, const DiscFuncType& rhs)
: LinearIterationStep<OperatorType,DiscFuncType>(mat, x, rhs) : LinearIterationStep<OperatorType,DiscFuncType>(mat, x, rhs)
{} {}
......
...@@ -20,14 +20,14 @@ public: ...@@ -20,14 +20,14 @@ public:
virtual ~LinearIterationStep() {} virtual ~LinearIterationStep() {}
//! Constructor being given linear operator, solution and right hand side //! Constructor being given linear operator, solution and right hand side
LinearIterationStep(const MatrixType& mat, VectorType& x, VectorType& rhs) { LinearIterationStep(const MatrixType& mat, VectorType& x, const VectorType& rhs) {
mat_ = &mat; mat_ = &mat;
this->x_ = &x; this->x_ = &x;
rhs_ = &rhs; rhs_ = &rhs;
} }
//! Set linear operator, solution and right hand side //! Set linear operator, solution and right hand side
virtual void setProblem(const MatrixType& mat, VectorType& x, VectorType& rhs) { virtual void setProblem(const MatrixType& mat, VectorType& x, const VectorType& rhs) {
this->x_ = &x; this->x_ = &x;
rhs_ = &rhs; rhs_ = &rhs;
mat_ = &mat; mat_ = &mat;
...@@ -57,7 +57,7 @@ public: ...@@ -57,7 +57,7 @@ public:
} }
//! The container for the right hand side //! The container for the right hand side
VectorType* rhs_; const VectorType* rhs_;
//! The linear operator //! The linear operator
const MatrixType* mat_; const MatrixType* mat_;
......
...@@ -133,7 +133,7 @@ ...@@ -133,7 +133,7 @@
virtual void setProblem(const MatrixType& mat, virtual void setProblem(const MatrixType& mat,
VectorType& x, VectorType& x,
VectorType& rhs) const VectorType& rhs)
{ {
level_ = numLevels_-1; level_ = numLevels_-1;
......
...@@ -22,7 +22,7 @@ public: ...@@ -22,7 +22,7 @@ public:
ProjectedBlockGSStep() {} ProjectedBlockGSStep() {}
//! Constructor with a linear problem //! Constructor with a linear problem
ProjectedBlockGSStep(const OperatorType& mat, DiscFuncType& x, DiscFuncType& rhs) ProjectedBlockGSStep(const OperatorType& mat, DiscFuncType& x, const DiscFuncType& rhs)
: BlockGSStep<OperatorType,DiscFuncType>(mat, x, rhs) : BlockGSStep<OperatorType,DiscFuncType>(mat, x, rhs)
{} {}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment