Fast Auxiliary Space Preconditioning 2.7.7 Aug/28/2022
Loading...
Searching...
No Matches
SolCSR.c File Reference

Iterative solvers for dCSRmat matrices. More...

#include <time.h>
#include "fasp.h"
#include "fasp_functs.h"
#include "KryUtil.inl"

Go to the source code of this file.

Functions

INT fasp_solver_dcsr_itsolver (dCSRmat *A, dvector *b, dvector *x, precond *pc, ITS_param *itparam)
 Solve Ax=b by preconditioned Krylov methods for CSR matrices. More...
 
INT fasp_solver_dcsr_itsolver_s (dCSRmat *A, dvector *b, dvector *x, precond *pc, ITS_param *itparam)
 Solve Ax=b by preconditioned Krylov methods with safe-net for CSR matrices. More...
 
INT fasp_solver_dcsr_krylov (dCSRmat *A, dvector *b, dvector *x, ITS_param *itparam)
 Solve Ax=b by standard Krylov methods for CSR matrices. More...
 
INT fasp_solver_dcsr_krylov_s (dCSRmat *A, dvector *b, dvector *x, ITS_param *itparam)
 Solve Ax=b by standard Krylov methods with safe-net for CSR matrices. More...
 
INT fasp_solver_dcsr_krylov_diag (dCSRmat *A, dvector *b, dvector *x, ITS_param *itparam)
 Solve Ax=b by diagonal preconditioned Krylov methods. More...
 
INT fasp_solver_dcsr_krylov_swz (dCSRmat *A, dvector *b, dvector *x, ITS_param *itparam, SWZ_param *schparam)
 Solve Ax=b by overlapping Schwarz Krylov methods. More...
 
INT fasp_solver_dcsr_krylov_amg (dCSRmat *A, dvector *b, dvector *x, ITS_param *itparam, AMG_param *amgparam)
 Solve Ax=b by AMG preconditioned Krylov methods. More...
 
INT fasp_solver_dcsr_krylov_ilu (dCSRmat *A, dvector *b, dvector *x, ITS_param *itparam, ILU_param *iluparam)
 Solve Ax=b by ILUs preconditioned Krylov methods. More...
 
INT fasp_solver_dcsr_krylov_ilu_M (dCSRmat *A, dvector *b, dvector *x, ITS_param *itparam, ILU_param *iluparam, dCSRmat *M)
 Solve Ax=b by ILUs preconditioned Krylov methods: ILU of M as preconditioner. More...
 
INT fasp_solver_dcsr_krylov_amg_nk (dCSRmat *A, dvector *b, dvector *x, ITS_param *itparam, AMG_param *amgparam, dCSRmat *A_nk, dCSRmat *P_nk, dCSRmat *R_nk)
 Solve Ax=b by AMG preconditioned Krylov methods with an extra near kernel solve. More...
 

Detailed Description

Iterative solvers for dCSRmat matrices.

Note
This file contains Level-5 (Sol) functions. It requires: AuxMemory.c, AuxMessage.c, AuxParam.c, AuxTiming.c, AuxVector.c, BlaILUSetupCSR.c, BlaSchwarzSetup.c, BlaSparseCheck.c, BlaSparseCSR.c, KryPbcgs.c, KryPcg.c, KryPgcg.c, KryPgcr.c, KryPgmres.c, KryPminres.c, KryPvfgmres.c, KryPvgmres.c, PreAMGSetupRS.c, PreAMGSetupSA.c, PreAMGSetupUA.c, PreCSR.c, and PreDataInit.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 SolCSR.c.

Function Documentation

◆ fasp_solver_dcsr_itsolver()

INT fasp_solver_dcsr_itsolver ( dCSRmat A,
dvector b,
dvector x,
precond pc,
ITS_param itparam 
)

Solve Ax=b by preconditioned Krylov methods for CSR matrices.

Note
This is an abstract interface for iterative methods.
Parameters
APointer to the coeff matrix in dCSRmat format
bPointer to the right hand side in dvector format
xPointer to the approx solution in dvector format
pcPointer to the preconditioning action
itparamPointer to parameters for iterative solvers
Returns
Iteration number if converges; ERROR otherwise.
Author
Chensong Zhang
Date
09/25/2009

Definition at line 56 of file SolCSR.c.

◆ fasp_solver_dcsr_itsolver_s()

INT fasp_solver_dcsr_itsolver_s ( dCSRmat A,
dvector b,
dvector x,
precond pc,
ITS_param itparam 
)

Solve Ax=b by preconditioned Krylov methods with safe-net for CSR matrices.

Note
This is an abstract interface for iterative methods.
Parameters
APointer to the coeff matrix in dCSRmat format
bPointer to the right hand side in dvector format
xPointer to the approx solution in dvector format
pcPointer to the preconditioning action
itparamPointer to parameters for iterative solvers
Returns
Iteration number if converges; ERROR otherwise.
Author
Chensong Zhang
Date
10/21/2017

Definition at line 163 of file SolCSR.c.

◆ fasp_solver_dcsr_krylov()

INT fasp_solver_dcsr_krylov ( dCSRmat A,
dvector b,
dvector x,
ITS_param itparam 
)

Solve Ax=b by standard Krylov methods for CSR matrices.

Parameters
APointer to the coeff matrix in dCSRmat format
bPointer to the right hand side in dvector format
xPointer to the approx solution in dvector format
itparamPointer to parameters for iterative solvers
Returns
Iteration number if converges; ERROR otherwise.
Author
Chensong Zhang, Shiquan Zhang
Date
09/25/2009

Definition at line 249 of file SolCSR.c.

◆ fasp_solver_dcsr_krylov_amg()

INT fasp_solver_dcsr_krylov_amg ( dCSRmat A,
dvector b,
dvector x,
ITS_param itparam,
AMG_param amgparam 
)

Solve Ax=b by AMG preconditioned Krylov methods.

Parameters
APointer to the coeff matrix in dCSRmat format
bPointer to the right hand side in dvector format
xPointer to the approx solution in dvector format
itparamPointer to parameters for iterative solvers
amgparamPointer to parameters for AMG methods
Returns
Iteration number if converges; ERROR otherwise.
Author
Chensong Zhang
Date
09/25/2009

Definition at line 476 of file SolCSR.c.

◆ fasp_solver_dcsr_krylov_amg_nk()

INT fasp_solver_dcsr_krylov_amg_nk ( dCSRmat A,
dvector b,
dvector x,
ITS_param itparam,
AMG_param amgparam,
dCSRmat A_nk,
dCSRmat P_nk,
dCSRmat R_nk 
)

Solve Ax=b by AMG preconditioned Krylov methods with an extra near kernel solve.

Parameters
APointer to the coeff matrix in dCSRmat format
bPointer to the right hand side in dvector format
xPointer to the approx solution in dvector format
itparamPointer to parameters for iterative solvers
amgparamPointer to parameters for AMG methods
A_nkPointer to the coeff matrix of near kernel space in dCSRmat format
P_nkPointer to the prolongation of near kernel space in dCSRmat format
R_nkPointer to the restriction of near kernel space in dCSRmat format
Returns
Iteration number if converges; ERROR otherwise.
Author
Xiaozhe Hu
Date
05/26/2014

Definition at line 748 of file SolCSR.c.

◆ fasp_solver_dcsr_krylov_diag()

INT fasp_solver_dcsr_krylov_diag ( dCSRmat A,
dvector b,
dvector x,
ITS_param itparam 
)

Solve Ax=b by diagonal preconditioned Krylov methods.

Parameters
APointer to the coeff matrix in dCSRmat format
bPointer to the right hand side in dvector format
xPointer to the approx solution in dvector format
itparamPointer to parameters for iterative solvers
Returns
Iteration number if converges; ERROR otherwise.
Author
Chensong Zhang, Shiquan Zhang
Date
09/25/2009

Definition at line 341 of file SolCSR.c.

◆ fasp_solver_dcsr_krylov_ilu()

INT fasp_solver_dcsr_krylov_ilu ( dCSRmat A,
dvector b,
dvector x,
ITS_param itparam,
ILU_param iluparam 
)

Solve Ax=b by ILUs preconditioned Krylov methods.

Parameters
APointer to the coeff matrix in dCSRmat format
bPointer to the right hand side in dvector format
xPointer to the approx solution in dvector format
itparamPointer to parameters for iterative solvers
iluparamPointer to parameters for ILU
Returns
Iteration number if converges; ERROR otherwise.
Author
Chensong Zhang, Shiquan Zhang
Date
09/25/2009

Definition at line 588 of file SolCSR.c.

◆ fasp_solver_dcsr_krylov_ilu_M()

INT fasp_solver_dcsr_krylov_ilu_M ( dCSRmat A,
dvector b,
dvector x,
ITS_param itparam,
ILU_param iluparam,
dCSRmat M 
)

Solve Ax=b by ILUs preconditioned Krylov methods: ILU of M as preconditioner.

Parameters
APointer to the coeff matrix in dCSRmat format
bPointer to the right hand side in dvector format
xPointer to the approx solution in dvector format
itparamPointer to parameters for iterative solvers
iluparamPointer to parameters for ILU
MPointer to the preconditioning matrix in dCSRmat format
Returns
Iteration number if converges; ERROR otherwise.
Author
Xiaozhe Hu
Date
09/25/2009
Note
This function is specially designed for reservoir simulation. Have not been tested in any other places.

Definition at line 668 of file SolCSR.c.

◆ fasp_solver_dcsr_krylov_s()

INT fasp_solver_dcsr_krylov_s ( dCSRmat A,
dvector b,
dvector x,
ITS_param itparam 
)

Solve Ax=b by standard Krylov methods with safe-net for CSR matrices.

Parameters
APointer to the coeff matrix in dCSRmat format
bPointer to the right hand side in dvector format
xPointer to the approx solution in dvector format
itparamPointer to parameters for iterative solvers
Returns
Iteration number if converges; ERROR otherwise.
Author
Chensong Zhang
Date
10/22/2017

Definition at line 295 of file SolCSR.c.

◆ fasp_solver_dcsr_krylov_swz()

INT fasp_solver_dcsr_krylov_swz ( dCSRmat A,
dvector b,
dvector x,
ITS_param itparam,
SWZ_param schparam 
)

Solve Ax=b by overlapping Schwarz Krylov methods.

Parameters
APointer to the coeff matrix in dCSRmat format
bPointer to the right hand side in dvector format
xPointer to the approx solution in dvector format
itparamPointer to parameters for iterative solvers
schparamPointer to parameters for Schwarz methods
Returns
Iteration number if converges; ERROR otherwise.
Author
Xiaozhe Hu
Date
03/21/2011

Modified by Chensong on 07/02/2012: change interface

Definition at line 401 of file SolCSR.c.