Skip to content
Snippets Groups Projects
Commit 7edff98d authored by Elias Pipping's avatar Elias Pipping
Browse files

Propagate ignoreNodes to preconditioner

In analogy to a multigridstep and its basesolver/smoother/etc.
parent 8ff8c958
Branches
No related tags found
No related merge requests found
Pipeline #
// -*- tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
// vi: set et ts=8 sw=4 sts=4:
#include <dune/solvers/common/canignore.hh>
template <class MatrixType, class VectorType>
void CGStep<MatrixType, VectorType>::check() const
{
......@@ -17,6 +19,11 @@ void CGStep<MatrixType, VectorType>::preprocess()
r_[i] = 0;
if (preconditioner_) {
using CanIgnore_t = CanIgnore<DefaultBitVector_t<VectorType>>;
CanIgnore_t *asCanIgnore = dynamic_cast<CanIgnore_t*>(preconditioner_);
if (asCanIgnore != nullptr and this->hasIgnore())
asCanIgnore->setIgnore(this->ignore());
preconditioner_->setMatrix(*matrix_);
preconditioner_->apply(p_, r_);
} else
......
......@@ -93,7 +93,6 @@ struct CGTestSuite
typename Problem::Vector>::
create(Dune::Solvers::BlockGS::LocalSolvers::gs(),
Dune::Solvers::BlockGS::Direction::SYMMETRIC);
blockgs.setIgnore(p.ignore);
Dune::Solvers::CGStep<typename Problem::Matrix,
typename Problem::Vector> cgStep(p.A, u_copy,
rhs_copy,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment