Skip to content
Snippets Groups Projects
Commit 08aa8ee5 authored by Stéphane Del Pino's avatar Stéphane Del Pino
Browse files

Merge branch 'feature/amg' into 'develop'

Plug PETSc's AMG preconditioner

See merge request !57
parents e23149c9 78eb2388
No related branches found
No related tags found
1 merge request!57Plug PETSc's AMG preconditioner
......@@ -88,6 +88,7 @@ struct LinearSolver::Internals
{
switch (precond) {
case LSPrecond::none:
case LSPrecond::amg:
case LSPrecond::diagonal:
case LSPrecond::incomplete_choleski:
case LSPrecond::incomplete_LU: {
......@@ -244,6 +245,10 @@ struct LinearSolver::Internals
if (not direct_solver) {
switch (options.precond()) {
case LSPrecond::amg: {
PCSetType(pc, PCGAMG);
break;
}
case LSPrecond::diagonal: {
PCSetType(pc, PCJACOBI);
break;
......
......@@ -37,6 +37,7 @@ enum class LSPrecond : int8_t
diagonal,
incomplete_choleski,
incomplete_LU,
amg,
//
LS__end
};
......@@ -101,6 +102,9 @@ name(const LSPrecond precond)
case LSPrecond::incomplete_LU: {
return "ILU";
}
case LSPrecond::amg: {
return "AMG";
}
case LSPrecond::LS__end: {
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment