Skip to content
Snippets Groups Projects
Commit f16b8236 authored by Oliver Sander's avatar Oliver Sander Committed by sander@PCPOOL.MI.FU-BERLIN.DE
Browse files

use rtti and the new CanIgnore class to hand the ignorenodes to any base...

use rtti and the new CanIgnore class to hand the ignorenodes to any base solver that can handle them

[[Imported from SVN: r2503]]
parent 55555407
Branches
Tags
No related merge requests found
......@@ -109,6 +109,10 @@ void MultigridStep<OperatorType, VectorType, BitVectorType>::preprocess()
if (this->basesolver_ == NULL)
DUNE_THROW(SolverError, "You have not provided a base solver!");
// If the base solver can ignore dofs give it the ignoreNodes field
if (dynamic_cast<CanIgnore<BitVectorType>*>(this->basesolver_))
dynamic_cast<CanIgnore<BitVectorType>*>(this->basesolver_)->ignoreNodes_ = ignoreNodesHierarchy_[0];
typedef ::LoopSolver<VectorType> DuneSolversLoopSolver;
if (typeid(*this->basesolver_) == typeid(DuneSolversLoopSolver)) {
......@@ -128,8 +132,6 @@ void MultigridStep<OperatorType, VectorType, BitVectorType>::preprocess()
QuadraticIPOptSolver<OperatorType,VectorType>* ipoptBaseSolver = dynamic_cast<QuadraticIPOptSolver<OperatorType,VectorType>*> (this->basesolver_);
ipoptBaseSolver->setProblem(*(this->mat_[0]), this->x_[0], this->rhs_[0]);
ipoptBaseSolver->ignoreNodes_ = ignoreNodesHierarchy_[0];
}
#endif
else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment