Skip to content
Snippets Groups Projects
Commit a4141401 authored by Ansgar Burchardt's avatar Ansgar Burchardt
Browse files

AMGStep: do not use deprecated constructor

parent aa025c3e
No related branches found
No related tags found
No related merge requests found
...@@ -49,7 +49,7 @@ public: ...@@ -49,7 +49,7 @@ public:
setProblem(*stiffnessMatrix, x, rhs); setProblem(*stiffnessMatrix, x, rhs);
fop_ = std::unique_ptr<Operator>(new Operator(*stiffnessMatrix)); fop_ = std::unique_ptr<Operator>(new Operator(*stiffnessMatrix));
amg_ = std::unique_ptr<AMG>(new AMG(*fop_, coarseningCriterion, smootherArgs, 1, 1, 1, false)); amg_ = std::unique_ptr<AMG>(new AMG(*fop_, coarseningCriterion, smootherArgs));
amg_->pre(*this->x_, residual_); amg_->pre(*this->x_, residual_);
} }
...@@ -94,12 +94,21 @@ private: ...@@ -94,12 +94,21 @@ private:
std::unique_ptr<AMG> amg_; std::unique_ptr<AMG> amg_;
VectorType residual_; VectorType residual_;
void setupCoarseningCriterion()
{
coarseningCriterion_.setNoPreSmoothSteps(1);
coarseningCriterion_.setNoPostSmoothSteps(1);
coarseningCriterion_.setGamma(1);
coarseningCriterion_.setAdditive(false);
}
}; };
template <class MatrixType, class VectorType> template <class MatrixType, class VectorType>
void AMGStep<MatrixType,VectorType>::preprocess() void AMGStep<MatrixType,VectorType>::preprocess()
{ {
amg_ = std::unique_ptr<AMG>(new AMG(*fop_, coarseningCriterion_, smootherArgs_, 1, 1, 1, false)); setupCoarseningCriterion();
amg_ = std::unique_ptr<AMG>(new AMG(*fop_, coarseningCriterion_, smootherArgs_));
amg_->pre(*this->x_, residual_); amg_->pre(*this->x_, residual_);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment