Chombo + EB  3.2
Public Member Functions | List of all members
LinearSolver< T > Class Template Referenceabstract

#include <LinearSolver.H>

Inheritance diagram for LinearSolver< T >:
Inheritance graph
[legend]

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. More...
 

Detailed Description

template<class T>
class LinearSolver< T >

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

Constructor & Destructor Documentation

◆ ~LinearSolver()

template<class T>
virtual LinearSolver< T >::~LinearSolver ( )
inlinevirtual

Member Function Documentation

◆ setHomogeneous()

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

◆ define()

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.

Implemented in PetscSolverPoisson< T >, PetscSolver< T >, PetscSolver< LevelData< FArrayBox > >, GMRESSolver< T >, MergeSolver< T >, RelaxSolver< T >, BiCGStabSolver< T >, BiCGStabSolver< LevelData< FArrayBox > >, BiCGStabSolver< LevelData< T > >, NoOpSolver< T >, NoOpSolver< LevelDataType >, NoOpSolver< LevelData< EBCellFAB > >, NoOpSolver< LevelData< FArrayBox > >, NoOpSolver< LevelData< T > >, and EBSimpleSolver.

◆ solve()

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

◆ setConvergenceMetrics()

template<class T>
virtual void LinearSolver< T >::setConvergenceMetrics ( Real  a_metric,
Real  a_tolerance 
)
inlinevirtual

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.

Reimplemented in MergeSolver< T >, BiCGStabSolver< T >, BiCGStabSolver< LevelData< FArrayBox > >, BiCGStabSolver< LevelData< T > >, GMRESSolver< T >, NoOpSolver< T >, NoOpSolver< LevelDataType >, NoOpSolver< LevelData< EBCellFAB > >, NoOpSolver< LevelData< FArrayBox > >, and NoOpSolver< LevelData< T > >.


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