# LinearSolver< T > Class Template Reference

`#include <LinearSolver.H>`

Inheritance diagram for LinearSolver< T >:

[legend]

## Detailed Description

### template<class T> class LinearSolver< T >

Generic linear solver template. BiCGStab and others are built on top of this.

## Public Member Functions

virtual ~LinearSolver ()
virtual void setHomogeneous (bool a_homogeneous)=0
virtual void define (LinearOp< T > *a_operator, bool a_homogeneous=false)=0
virtual void solve (T &a_phi, const T &a_rhs)=0
virtual void setConvergenceMetrics (Real a_metric, Real a_tolerance)
Set a convergence metric, along with solver tolerance, if desired.

## Constructor & Destructor Documentation

template<class T>
 virtual LinearSolver< T >::~LinearSolver ( ) ` [inline, virtual]`

## Member Function Documentation

template<class T>
 virtual void LinearSolver< T >::setHomogeneous ( bool a_homogeneous ) ` [pure virtual]`

reset whether the solver is homogeneous.

template<class T>
 virtual void LinearSolver< T >::define ( LinearOp< T > * a_operator, bool a_homogeneous = `false` ) ` [pure virtual]`

Define the operator and whether it is a homogeneous solver or not. The LinearSolver does not take over ownership of this a_operator object. It does not call delete on it when the LinearSolver is deleted. It is meant to be like a late-binding reference. If you created a_operator with new, you should call delete on it after LinearSolver is deleted if you want to avoid memory leaks.

template<class T>
 virtual void LinearSolver< T >::solve ( T & a_phi, const T & a_rhs ) ` [pure virtual]`

Solve L(phi) = rhs (phi = L^-1 (rhs)).

template<class T>
 virtual void LinearSolver< T >::setConvergenceMetrics ( Real a_metric, Real a_tolerance ) ` [inline, virtual]`

Set a convergence metric, along with solver tolerance, if desired.

Default implementation does nothing, since there are probably cases (liked direct solves), where this has no real meaning.

The documentation for this class was generated from the following file:

Generated on Tue Apr 14 14:23:43 2009 for Chombo + EB by  1.5.5