Commit 95a126a5 authored by Praetorius, Simon's avatar Praetorius, Simon
Browse files

Merge branch 'releases/0.2' into 'master'

Releases/0.2

See merge request amdis/amdis-core!1
parents 03c8bf81 07930b89
......@@ -72,7 +72,7 @@ namespace AMDiS
static void init(std::string const& prefix, Eigen::UmfPackLU<M>& solver)
{
DUNE_UNUSED auto& control = solver.umfpackControl();
// here, umfpack parameters could be initialized
// TODO: initialized umfpack parameters
}
};
#endif
......
......@@ -30,7 +30,7 @@ namespace AMDiS
using SolverBase = LinearSolverInterface<Matrix, VectorX, VectorB>;
using Scalar = typename Matrix::Scalar;
std::unique_ptr<SolverBase> createWithString(std::string const& prefix) override
std::unique_ptr<SolverBase> createWithString(std::string prefix) override
{
// get creator string for preconditioner
std::string precon = "no";
......@@ -40,12 +40,12 @@ namespace AMDiS
precon == "jacobi")
{
auto creator = SolverCreator<Eigen::DiagonalPreconditioner<Scalar>>{};
return creator.create(prefix);
return creator.createWithString(prefix);
}
else if (precon == "ilu")
{
auto creator = SolverCreator<Eigen::IncompleteLUT<Scalar>>{};
return creator.create(prefix);
return creator.createWithString(prefix);
}
else if (precon == "ic")
{
......@@ -53,7 +53,7 @@ namespace AMDiS
}
else {
auto creator = SolverCreator<Eigen::IdentityPreconditioner>{};
return creator.create(prefix);
return creator.createWithString(prefix);
}
}
......@@ -62,18 +62,18 @@ namespace AMDiS
using IncompleteCholesky =
SolverCreator<Eigen::IncompleteCholesky<Scalar, Eigen::Lower|Eigen::Upper, Ordering>>;
std::unique_ptr<SolverBase> createIncompleteCholesky(std::string const& prefix) const
std::unique_ptr<SolverBase> createIncompleteCholesky(std::string prefix) const
{
std::string ordering = "amd";
Parameters::get(prefix + "->precon->ordering", ordering);
if (ordering == "amd") {
using AMD = Eigen::AMDOrdering<typename Matrix::StorageIndex>;
return IncompleteCholesky<AMD>{}.create(prefix);
return IncompleteCholesky<AMD>{}.createWithString(prefix);
}
else {
using NATURAL = Eigen::NaturalOrdering<typename Matrix::StorageIndex>;
return IncompleteCholesky<NATURAL>{}.create(prefix);
return IncompleteCholesky<NATURAL>{}.createWithString(prefix);
}
}
};
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment