MFEM v2.0
Functions
gmres.cpp File Reference
#include <iostream>
#include <iomanip>
#include <math.h>
#include "vector.hpp"
#include "matrix.hpp"
#include "densemat.hpp"
Include dependency graph for gmres.cpp:

Go to the source code of this file.

Functions

void GeneratePlaneRotation (double &dx, double &dy, double &cs, double &sn)
void ApplyPlaneRotation (double &dx, double &dy, double &cs, double &sn)
void Update (Vector &x, int k, DenseMatrix &h, Vector &s, Array< Vector * > &v)
double norm (Vector &u)
int GMRES (const Operator &A, Vector &x, const Vector &b, const Operator &M, int &max_iter, int m, double &tol, double &atol, int printit)
 A GMRES solver.
int aGMRES (const Operator &A, Vector &x, const Vector &b, const Operator &M, int &max_iter, int m_max, int m_min, int m_step, double cf, double &tol, double &atol, int printit)

Function Documentation

int aGMRES ( const Operator A,
Vector x,
const Vector b,
const Operator M,
int &  max_iter,
int  m_max,
int  m_min,
int  m_step,
double  cf,
double &  tol,
double &  atol,
int  printit 
)

Adaptive restarted GMRES. m_max and m_min(=1) are the maximal and minimal restart parameters. m_step(=1) is the step to use for going from m_max and m_min. cf(=0.4) is a desired convergance factor.

Definition at line 200 of file gmres.cpp.

References DenseMatrix::Add(), Add(), ApplyPlaneRotation(), GeneratePlaneRotation(), Operator::Mult(), norm(), Operator::Size(), subtract(), and Update().

void ApplyPlaneRotation ( double &  dx,
double &  dy,
double &  cs,
double &  sn 
) [inline]

Definition at line 56 of file gmres.cpp.

Referenced by aGMRES(), and GMRES().

void GeneratePlaneRotation ( double &  dx,
double &  dy,
double &  cs,
double &  sn 
) [inline]

Definition at line 40 of file gmres.cpp.

Referenced by aGMRES(), and GMRES().

int GMRES ( const Operator A,
Vector x,
const Vector b,
const Operator M,
int &  max_iter,
int  m,
double &  tol,
double &  atol,
int  printit 
)
double norm ( Vector u) [inline]
void Update ( Vector x,
int  k,
DenseMatrix h,
Vector s,
Array< Vector * > &  v 
) [inline]

Definition at line 63 of file gmres.cpp.

References Vector::Add(), and Vector::Size().

Referenced by aGMRES(), and GMRES().

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines