Chombo + EB + MF
3.2
|
#include <LinearSolver.H>
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... | |
Generic linear solver template. BiCGStab and others are built on top of this.
|
inlinevirtual |
|
pure virtual |
reset whether the solver is homogeneous.
Implemented in PetscSolver< T >, PetscSolver< LevelData< FArrayBox > >, MergeSolver< T >, GMRESSolver< T >, RelaxSolver< T >, BiCGStabSolver< T >, BiCGStabSolver< LevelData< FArrayBox > >, BiCGStabSolver< LevelData< T > >, NoOpSolver< T >, NoOpSolver< LevelDataType >, NoOpSolver< LevelData< EBCellFAB > >, NoOpSolver< LevelData< FArrayBox > >, NoOpSolver< LevelData< T > >, NoOpSolver< LevelData< MFCellFAB > >, MFSimpleSolver, and EBSimpleSolver.
|
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 > >, NoOpSolver< LevelData< MFCellFAB > >, MFSimpleSolver, and EBSimpleSolver.
|
pure virtual |
Solve L(phi) = rhs (phi = L^-1 (rhs)).
Implemented in PetscSolver< T >, PetscSolver< LevelData< FArrayBox > >, MergeSolver< T >, GMRESSolver< T >, RelaxSolver< T >, BiCGStabSolver< T >, BiCGStabSolver< LevelData< FArrayBox > >, BiCGStabSolver< LevelData< T > >, NoOpSolver< T >, NoOpSolver< LevelDataType >, NoOpSolver< LevelData< EBCellFAB > >, NoOpSolver< LevelData< FArrayBox > >, NoOpSolver< LevelData< T > >, NoOpSolver< LevelData< MFCellFAB > >, MFSimpleSolver, and EBSimpleSolver.
|
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 > >, NoOpSolver< LevelData< T > >, and NoOpSolver< LevelData< MFCellFAB > >.