Go to the documentation of this file.
35 std::vector<double> & r,
int nsmooth=1,
double const omega=1.0,
bool zero=
false);
49 void DiagPrecond(
Matrix const &SK, std::vector<double>
const &r, std::vector<double> &w,
50 double const omega=1.0);
99 {
return _u.at(lev); }
128 void MG_Step(
size_t lev,
int pre_smooth=1,
bool const bzero=
false,
int nu=1);
137 void MG_Solve(
int pre_smooth=1,
double eps=1
e-6,
int nu=1);
142 std::vector<FEM_Matrix>
_SK;
143 std::vector<std::vector<double>>
_u;
144 std::vector<std::vector<double>>
_f;
145 std::vector<std::vector<double>>
_d;
146 std::vector<std::vector<double>>
_w;
147 std::vector<BisectIntDirichlet>
_Pc2f;
void MG_Solve(int pre_smooth=1, double eps=1e-6, int nu=1)
std::vector< double > const & GetSolution(int lev) const
std::vector< std::vector< double > > _w
Correction vector on each level.
std::vector< std::vector< double > > _d
Defect vector on each level.
void MG_Step(size_t lev, int pre_smooth=1, bool const bzero=false, int nu=1)
Mesh const & GetMesh(int lev) const
gMesh_Hierarchy _meshes
mesh hierarchy from coarse (level 0) to fine.
Multigrid & operator=(Multigrid const &)=delete
The Multigrid hierarchy including meshes, vectors and matrices, prolongations is stored.
void JacobiSolve(size_t lev)
std::vector< std::vector< double > > _f
Right hand side vector on each level.
void DiagPrecond(Matrix const &SK, std::vector< double > const &r, std::vector< double > &w, double const omega=1.0)
Simple diagonale preconditioning.
std::vector< BisectIntDirichlet > _Pc2f
Interpolation to level from next coarser level.
void DefineOperator(size_t lev)
void JacobiSolve(CRS_Matrix const &SK, std::vector< double > const &f, std::vector< double > &u)
std::vector< std::vector< double > > _u
Solution vector on each level.
void JacobiSmoother(Matrix const &SK, std::vector< double > const &f, std::vector< double > &u, std::vector< double > &r, int nsmooth=1, double const omega=1.0, bool zero=false)
std::vector< FEM_Matrix > _SK
Sparse matrix on each level.
Multigrid(Mesh const &cmesh, int nlevel)