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

Iterative solvers using matrix-free spmv operations. More...

#include <time.h>
#include "fasp.h"
#include "fasp_functs.h"
#include "fasp_block.h"
#include "itsolver_util.inl"

Go to the source code of this file.

Functions

INT fasp_solver_itsolver (mxv_matfree *mf, dvector *b, dvector *x, precond *pc, itsolver_param *itparam)
 Solve Ax=b by preconditioned Krylov methods for CSR matrices. More...
 
INT fasp_solver_krylov (mxv_matfree *mf, dvector *b, dvector *x, itsolver_param *itparam)
 Solve Ax=b by standard Krylov methods – without preconditioner. More...
 
void fasp_solver_itsolver_init (INT matrix_format, mxv_matfree *mf, void *A)
 Initialize itsovlers. More...
 

Detailed Description

Iterative solvers using matrix-free spmv operations.

Definition in file itsolver_mf.c.

Function Documentation

INT fasp_solver_itsolver ( mxv_matfree mf,
dvector b,
dvector x,
precond pc,
itsolver_param itparam 
)

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

Parameters
mfPointer to mxv_matfree matrix-free spmv operation
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
Note
This is an abstract interface for iterative methods.

Modified by Feiteng Huang on 09/19/2012: matrix free

Definition at line 50 of file itsolver_mf.c.

void fasp_solver_itsolver_init ( INT  matrix_format,
mxv_matfree mf,
void *  A 
)

Initialize itsovlers.

Parameters
matrix_formatmatrix format
mfPointer to mxv_matfree matrix-free spmv operation
Avoid pointer to matrix
Author
Feiteng Huang
Date
09/18/2012

Modified by Chensong Zhang on 05/10/2013: Change interface of mat-free mv

Definition at line 197 of file itsolver_mf.c.

INT fasp_solver_krylov ( mxv_matfree mf,
dvector b,
dvector x,
itsolver_param itparam 
)

Solve Ax=b by standard Krylov methods – without preconditioner.

Parameters
mfPointer to mxv_matfree matrix-free spmv operation
bPointer to the right hand side in dvector format
xPointer to the approx solution in dvector format
itparamPointer to parameters for iterative solvers
Returns
Number of iterations if succeed
Author
Chensong Zhang, Shiquan Zhang
Date
09/25/2009

Modified by Feiteng Huang on 09/20/2012: matrix free

Definition at line 150 of file itsolver_mf.c.