Fast Auxiliary Space Preconditioning  1.8.4 Feb/15/2016
gmg_poisson.c File Reference

GMG method as an iterative solver for Poisson Problem. More...

#include <time.h>
#include <math.h>
#include "fasp.h"
#include "fasp_functs.h"
#include "gmg_util.inl"

Go to the source code of this file.

Functions

INT fasp_poisson_gmg_1D (REAL *u, REAL *b, const INT nx, const INT maxlevel, const REAL rtol, const SHORT prtlvl)
 Solve Ax=b of Poisson 1D equation by Geometric Multigrid Method. More...
 
INT fasp_poisson_gmg_2D (REAL *u, REAL *b, const INT nx, const INT ny, const INT maxlevel, const REAL rtol, const SHORT prtlvl)
 Solve Ax=b of Poisson 2D equation by Geometric Multigrid Method. More...
 
INT fasp_poisson_gmg_3D (REAL *u, REAL *b, const INT nx, const INT ny, const INT nz, const INT maxlevel, const REAL rtol, const SHORT prtlvl)
 Solve Ax=b of Poisson 3D equation by Geometric Multigrid Method. More...
 
void fasp_poisson_fgmg_1D (REAL *u, REAL *b, const INT nx, const INT maxlevel, const REAL rtol, const SHORT prtlvl)
 Solve Ax=b of Poisson 1D equation by Geometric Multigrid Method (Full Multigrid) More...
 
void fasp_poisson_fgmg_2D (REAL *u, REAL *b, const INT nx, const INT ny, const INT maxlevel, const REAL rtol, const SHORT prtlvl)
 Solve Ax=b of Poisson 2D equation by Geometric Multigrid Method (Full Multigrid) More...
 
void fasp_poisson_fgmg_3D (REAL *u, REAL *b, const INT nx, const INT ny, const INT nz, const INT maxlevel, const REAL rtol, const SHORT prtlvl)
 Solve Ax=b of Poisson 3D equation by Geometric Multigrid Method (Full Multigrid) More...
 
INT fasp_poisson_pcg_gmg_1D (REAL *u, REAL *b, const INT nx, const INT maxlevel, const REAL rtol, const SHORT prtlvl)
 Solve Ax=b of Poisson 1D equation by Geometric Multigrid Method (GMG preconditioned Conjugate Gradient method) More...
 
INT fasp_poisson_pcg_gmg_2D (REAL *u, REAL *b, const INT nx, const INT ny, const INT maxlevel, const REAL rtol, const SHORT prtlvl)
 Solve Ax=b of Poisson 2D equation by Geometric Multigrid Method (GMG preconditioned Conjugate Gradient method) More...
 
INT fasp_poisson_pcg_gmg_3D (REAL *u, REAL *b, const INT nx, const INT ny, const INT nz, const INT maxlevel, const REAL rtol, const SHORT prtlvl)
 Solve Ax=b of Poisson 3D equation by Geometric Multigrid Method (GMG preconditioned Conjugate Gradient method) More...
 

Detailed Description

GMG method as an iterative solver for Poisson Problem.

Definition in file gmg_poisson.c.

Function Documentation

void fasp_poisson_fgmg_1D ( REAL u,
REAL b,
const INT  nx,
const INT  maxlevel,
const REAL  rtol,
const SHORT  prtlvl 
)

Solve Ax=b of Poisson 1D equation by Geometric Multigrid Method (Full Multigrid)

Parameters
uPointer to the vector of dofs
bPointer to the vector of right hand side
nxNumber of grids in x direction
maxlevelMaximum levels of the multigrid
rtolRelative tolerance to judge convergence
prtlvlPrint level for output
Author
Ziteng Wang
Date
06/07/2013

Definition at line 431 of file gmg_poisson.c.

void fasp_poisson_fgmg_2D ( REAL u,
REAL b,
const INT  nx,
const INT  ny,
const INT  maxlevel,
const REAL  rtol,
const SHORT  prtlvl 
)

Solve Ax=b of Poisson 2D equation by Geometric Multigrid Method (Full Multigrid)

Parameters
uPointer to the vector of dofs
bPointer to the vector of right hand side
nxNumber of grids in x direction
nyNumber of grids in Y direction
maxlevelMaximum levels of the multigrid
rtolRelative tolerance to judge convergence
prtlvlPrint level for output
Author
Ziteng Wang
Date
06/07/2013

Definition at line 524 of file gmg_poisson.c.

void fasp_poisson_fgmg_3D ( REAL u,
REAL b,
const INT  nx,
const INT  ny,
const INT  nz,
const INT  maxlevel,
const REAL  rtol,
const SHORT  prtlvl 
)

Solve Ax=b of Poisson 3D equation by Geometric Multigrid Method (Full Multigrid)

Parameters
uPointer to the vector of dofs
bPointer to the vector of right hand side
nxNumber of grids in x direction
nyNUmber of grids in y direction
nzNUmber of grids in z direction
maxlevelMaximum levels of the multigrid
rtolRelative tolerance to judge convergence
prtlvlPrint level for output
Author
Ziteng Wang
Date
06/07/2013

Definition at line 632 of file gmg_poisson.c.

INT fasp_poisson_gmg_1D ( REAL u,
REAL b,
const INT  nx,
const INT  maxlevel,
const REAL  rtol,
const SHORT  prtlvl 
)

Solve Ax=b of Poisson 1D equation by Geometric Multigrid Method.

Parameters
uPointer to the vector of dofs
bPointer to the vector of right hand side
nxNumber of grids in x direction
maxlevelMaximum levels of the multigrid
rtolRelative tolerance to judge convergence
prtlvlPrint level for output
Returns
Iteration number if converges; ERROR otherwise.
Author
Ziteng Wang
Date
06/07/2013

Definition at line 36 of file gmg_poisson.c.

INT fasp_poisson_gmg_2D ( REAL u,
REAL b,
const INT  nx,
const INT  ny,
const INT  maxlevel,
const REAL  rtol,
const SHORT  prtlvl 
)

Solve Ax=b of Poisson 2D equation by Geometric Multigrid Method.

Parameters
uPointer to the vector of dofs
bPointer to the vector of right hand side
nxNumber of grids in x direction
nyNumber of grids in y direction
maxlevelMaximum levels of the multigrid
rtolRelative tolerance to judge convergence
prtlvlPrint level for output
Returns
Iteration number if converges; ERROR otherwise.
Author
Ziteng Wang
Date
06/07/2013

Definition at line 160 of file gmg_poisson.c.

INT fasp_poisson_gmg_3D ( REAL u,
REAL b,
const INT  nx,
const INT  ny,
const INT  nz,
const INT  maxlevel,
const REAL  rtol,
const SHORT  prtlvl 
)

Solve Ax=b of Poisson 3D equation by Geometric Multigrid Method.

Parameters
uPointer to the vector of dofs
bPointer to the vector of right hand side
nxNumber of grids in x direction
nyNumber of grids in y direction
nzNumber of grids in z direction
maxlevelMaximum levels of the multigrid
rtolRelative tolerance to judge convergence
prtlvlPrint level for output
Returns
Iteration number if converges; ERROR otherwise.
Author
Ziteng Wang
Date
06/07/2013

Definition at line 296 of file gmg_poisson.c.

INT fasp_poisson_pcg_gmg_1D ( REAL u,
REAL b,
const INT  nx,
const INT  maxlevel,
const REAL  rtol,
const SHORT  prtlvl 
)

Solve Ax=b of Poisson 1D equation by Geometric Multigrid Method (GMG preconditioned Conjugate Gradient method)

Parameters
uPointer to the vector of dofs
bPointer to the vector of right hand side
nxNumber of grids in x direction
maxlevelMaximum levels of the multigrid
rtolRelative tolerance to judge convergence
prtlvlPrint level for output
Returns
Iteration number if converges; ERROR otherwise.
Author
Ziteng Wang
Date
06/07/2013

Definition at line 741 of file gmg_poisson.c.

INT fasp_poisson_pcg_gmg_2D ( REAL u,
REAL b,
const INT  nx,
const INT  ny,
const INT  maxlevel,
const REAL  rtol,
const SHORT  prtlvl 
)

Solve Ax=b of Poisson 2D equation by Geometric Multigrid Method (GMG preconditioned Conjugate Gradient method)

Parameters
uPointer to the vector of dofs
bPointer to the vector of right hand side
nxNumber of grids in x direction
nyNumber of grids in y direction
maxlevelMaximum levels of the multigrid
rtolRelative tolerance to judge convergence
prtlvlPrint level for output
Returns
Iteration number if converges; ERROR otherwise.
Author
Ziteng Wang
Date
06/07/2013

Definition at line 835 of file gmg_poisson.c.

INT fasp_poisson_pcg_gmg_3D ( REAL u,
REAL b,
const INT  nx,
const INT  ny,
const INT  nz,
const INT  maxlevel,
const REAL  rtol,
const SHORT  prtlvl 
)

Solve Ax=b of Poisson 3D equation by Geometric Multigrid Method (GMG preconditioned Conjugate Gradient method)

Parameters
uPointer to the vector of dofs
bPointer to the vector of right hand side
nxNumber of grids in x direction
nyNumber of grids in y direction
nzNumber of grids in z direction
maxlevelMaximum levels of the multigrid
rtolRelative tolerance to judge convergence
prtlvlPrint level for output
Returns
Iteration number if converges; ERROR otherwise.
Author
Ziteng Wang
Date
06/07/2013

Definition at line 944 of file gmg_poisson.c.