Fast Auxiliary Space Preconditioning 2.7.7 Aug/28/2022
Loading...
Searching...
No Matches
SolGMGPoisson.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 "PreGMG.inl"

Go to the source code of this file.

Functions

INT fasp_poisson_gmg1d (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_gmg2d (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_gmg3d (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_fgmg1d (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 (FMG) More...
 
void fasp_poisson_fgmg2d (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 (FMG) More...
 
void fasp_poisson_fgmg3d (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 (FMG) More...
 
INT fasp_poisson_gmgcg1d (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_gmgcg2d (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_gmgcg3d (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.

Note
This file contains Level-5 (Sol) functions. It requires: AuxArray.c, AuxMessage.c, and AuxTiming.c

Copyright (C) 2009–Present by the FASP team. All rights reserved.

Released under the terms of the GNU Lesser General Public License 3.0 or later.

Definition in file SolGMGPoisson.c.

Function Documentation

◆ fasp_poisson_fgmg1d()

void fasp_poisson_fgmg1d ( 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 (FMG)

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, Chensong Zhang
Date
06/07/2013

Definition at line 442 of file SolGMGPoisson.c.

◆ fasp_poisson_fgmg2d()

void fasp_poisson_fgmg2d ( 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 (FMG)

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, Chensong Zhang
Date
06/07/2013

Definition at line 536 of file SolGMGPoisson.c.

◆ fasp_poisson_fgmg3d()

void fasp_poisson_fgmg3d ( 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 (FMG)

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, Chensong Zhang
Date
06/07/2013

Definition at line 644 of file SolGMGPoisson.c.

◆ fasp_poisson_gmg1d()

INT fasp_poisson_gmg1d ( 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, Chensong Zhang
Date
06/07/2013

Definition at line 48 of file SolGMGPoisson.c.

◆ fasp_poisson_gmg2d()

INT fasp_poisson_gmg2d ( 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, Chensong Zhang
Date
06/07/2013

Definition at line 172 of file SolGMGPoisson.c.

◆ fasp_poisson_gmg3d()

INT fasp_poisson_gmg3d ( 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, Chensong Zhang
Date
06/07/2013

Definition at line 308 of file SolGMGPoisson.c.

◆ fasp_poisson_gmgcg1d()

INT fasp_poisson_gmgcg1d ( 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, Chensong Zhang
Date
06/07/2013

Definition at line 754 of file SolGMGPoisson.c.

◆ fasp_poisson_gmgcg2d()

INT fasp_poisson_gmgcg2d ( 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, Chensong Zhang
Date
06/07/2013

Definition at line 849 of file SolGMGPoisson.c.

◆ fasp_poisson_gmgcg3d()

INT fasp_poisson_gmgcg3d ( 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, Chensong Zhang
Date
06/07/2013

Definition at line 959 of file SolGMGPoisson.c.