13#ifndef MG_MULTIGRID_HH
14#define MG_MULTIGRID_HH
39 template <
class Entry,
class Index,
class Space>
45 static_assert(Space::continuity >= 0,
"makeMultigrid assumes global continuity of finite element functions");
53 int const nSmooth = Entry::rows > 1? 2: 3;
55 int const order = space.mapper().maxOrder();
57 return std::unique_ptr<Preconditioner>(
moveUnique(makeJacobiMultiGrid(A,space.gridManager(),nSmooth,nSmooth,onlyLowerTriangle,directType)));
61 auto mg = makeJacobiPMultiGrid(A,space,nSmooth,nSmooth,onlyLowerTriangle,directType);
62 mg.setSmoothings(3,3);
63 return std::unique_ptr<Preconditioner>(
moveUnique(std::move(mg)));
70 auto mg = makeBlockJacobiPMultiGrid(A,space,nSmooth,nSmooth,onlyLowerTriangle,directType);
71 mg.setSmoothings(3,3);
72 return std::unique_ptr<Preconditioner>(
moveUnique(std::move(mg)));
Interface for symmetric preconditioners.
DirectType
Available direct solvers for linear equation systems.
@ MUMPS
MUMPS sparse solver.
auto makeMultigrid(NumaBCRSMatrix< Entry, Index > const &A, Space const &space, bool onlyLowerTriangle=false, DirectType directType=DirectType::MUMPS)
Convenience function for creating a (multiplicative) multigrid preconditioner for elliptic equations.
auto moveUnique(A &&a)
Creates a dynamically allocated object from an r-value reference.
Convenience typedefs and creation functions for common function spaces.
void NaturalRange
The natural range type.