Skip to content
Snippets Groups Projects
Commit e2ecd2c3 authored by Praetorius, Simon's avatar Praetorius, Simon
Browse files

replaced SeqILU0 with SeqILU in ISTL backend

parent 71cbbe25
No related branches found
No related tags found
No related merge requests found
......@@ -39,6 +39,7 @@ namespace AMDiS
ISTLPrecon(std::string const& prefix)
{
Parameters::get(prefix + "->relaxation", w_);
Parameters::get(prefix + "->iterations", iter_);
}
using PreconBase = Dune::Preconditioner<VectorX, VectorB>;
......@@ -51,13 +52,13 @@ namespace AMDiS
template <class P>
std::unique_ptr<P> createImpl(Matrix const& A, Type<P>) const
{
return std::make_unique<P>(A, 1, w_);
return std::make_unique<P>(A, iter_, w_);
}
std::unique_ptr<Dune::SeqILU0<Matrix, VectorX, VectorB>>
createImpl(Matrix const& A, Type<Dune::SeqILU0<Matrix, VectorX, VectorB>>) const
std::unique_ptr<Dune::SeqILU<Matrix, VectorX, VectorB>>
createImpl(Matrix const& A, Type<Dune::SeqILU<Matrix, VectorX, VectorB>>) const
{
return std::make_unique<Dune::SeqILU0<Matrix, VectorX, VectorB>>(A, w_);
return std::make_unique<Dune::SeqILU<Matrix, VectorX, VectorB>>(A, iter_, w_);
}
std::unique_ptr<Dune::Richardson<VectorX, VectorB>>
......@@ -67,6 +68,7 @@ namespace AMDiS
}
double w_ = 1.0;
int iter_ = 0;
};
......@@ -105,7 +107,7 @@ namespace AMDiS
auto ssor = new PreconCreator<Dune::SeqSSOR<Matrix, VectorX, VectorB>>;
Map::addCreator("ssor", ssor);
auto ilu = new PreconCreator<Dune::SeqILU0<Matrix, VectorX, VectorB>>;
auto ilu = new PreconCreator<Dune::SeqILU<Matrix, VectorX, VectorB>>;
Map::addCreator("ilu", ilu);
Map::addCreator("ilu0", ilu);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment