SuperLU: EXAMPLE/zfgmr.c File Reference

SuperLU 6.0.0

Macros | Functions
zfgmr.c File Reference
Example

flexible GMRES from ITSOL developed by Yousef Saad. More...

`#include <unistd.h>`
`#include "slu_zdefs.h"`
Include dependency graph for zfgmr.c:

## Macros
#define | epsmac 1.0e-16

## Functions
void | zdotc_ (doublecomplex *, int *, doublecomplex[], int *, doublecomplex[], int *)
double | dznrm2_ (int *, doublecomplex[], int *)
int | zfgmr (int n, void(*zmatvec)(doublecomplex, doublecomplex[], doublecomplex, doublecomplex[]), void(*zpsolve)(int, doublecomplex[], doublecomplex[]), doublecomplex *rhs, doublecomplex *sol, double tol, int im, int *itmax, FILE *fits)
| Simple version of the ARMS preconditioned FGMRES algorithm. More...

## Macro Definition Documentation

## ◆ epsmac

#define epsmac 1.0e-16

## Function Documentation

## ◆ dznrm2_()

double dznrm2_ | ( | int * | ,
|  | doublecomplex | [],
|  | int * |
| ) |  |

## ◆ zdotc_()

void zdotc_ | ( | doublecomplex * | ,
|  | int * | ,
|  | doublecomplex | [],
|  | int * | ,
|  | doublecomplex | [],
|  | int * |
| ) |  |

## ◆ zfgmr()

int zfgmr | ( | int | n,
|  | void(*)(doublecomplex, doublecomplex[], doublecomplex, doublecomplex[]) | zmatvec,
|  | void(*)(int, doublecomplex[], doublecomplex[]) | zpsolve,
|  | doublecomplex * | rhs,
|  | doublecomplex * | sol,
|  | double | tol,
|  | int | im,
|  | int * | itmax,
|  | FILE * | fits
| ) |  |

Y. S. Dec. 2000. – Apr. 2008 internal work arrays: vv = work array of length [im+1][n] (used to store the Arnoldi basis) hh = work array of length [im][im+1] (Householder matrix) z = work array of length [im][n] to store preconditioned vectors

Parameters

  [in] | n | Dimension of vectors and matrices.
  [in] | zmatvec | Operation for matrix-vector multiplication.
  [in] | zpsolve | (right) preconditioning operation. Can be a NULL pointer (GMRES without preconditioner)
  [in] | rhs | Real vector of length n containing the right hand side.
  [in,out] | sol | In: Real vector of length n containing an initial guess to the solution on input. Out: Contains an approximate solution (upon successful return).
  [in] | tol | Tolerance for stopping iteration
  [in] | im | Krylov subspace dimension
  [in,out] | itmax | In: max number of iterations allowed. Out: number of steps required to converge.
  [in] | fits | If NULL, no output. If not NULL, file handle to output "resid vs time and its".

Returns
  Whether the algorithm finished successfully.

Here is the call graph for this function: