Chombo + EB
3.0
|
#include <PetscSolver.H>
Public Member Functions | |
PetscSolver () | |
virtual | ~PetscSolver () |
void | destroy () |
virtual void | setHomogeneous (bool a_homogeneous) |
virtual void | define (LinearOp< T > *a_operator, bool a_homogeneous=false) |
virtual void | solve (T &a_phi, const T &a_rhs) |
int | solve_private (T &a_phi, const T &a_rhs) |
Real | computeResidual () |
int | applyOp (T &a_phi, const T &a_rhs) |
void | setInitialGuessNonzero (bool b=true) |
virtual int | getNNZPerRow () const |
virtual BaseFab< Real > & | getRegFab (T &a_fab, DataIterator &dit)=0 |
virtual const BaseFab< Real > & | getRegFab (const T &a_fab, DataIterator &dit) const =0 |
virtual const BaseFab< Real > & | getRegFab (const T &a_fab, DataIterator &dit, Box &a_box) const =0 |
virtual void | defineData (T &a_data, const T &a_template)=0 |
void | setNull (bool n=true) |
Public Member Functions inherited from LinearSolver< T > | |
virtual | ~LinearSolver () |
virtual void | setConvergenceMetrics (Real a_metric, Real a_tolerance) |
Set a convergence metric, along with solver tolerance, if desired. More... | |
Public Attributes | |
bool | m_homogeneous |
Real | m_dx |
Protected Member Functions | |
virtual Real | addBCdiagValue (const IntVect &a_iv, const IntVect &a_jv, const T &a_rhs, DataIterator dit, const Real coeff=1) |
int | resetOperator () |
virtual Real | addBCrhsValue (const IntVect &a_iv, const T &a_phi, DataIterator dit, const Real &coeff=1) |
int | create_mat_vec (const T &a_phi) |
int | setup_solver (const T &a_phi) |
Protected Attributes | |
bool | m_null |
bool | m_nz_init_guess |
T | m_gids |
LevelData< BaseFab< bool > > | m_bccode |
int | m_gid0 |
Interface to PETSC linear solvers BC implementation hooks: addBCdiagValue (formMatrix) and addBCrhsValue (solveprivate) m_bccode should be encoded true for cells that are at the domain boundaries at formMatrix time.
PetscSolver< T >::PetscSolver | ( | ) |
|
virtual |
void PetscSolver< T >::destroy | ( | ) |
Referenced by PetscSolver< LevelData< FArrayBox > >::~PetscSolver().
|
inlinevirtual |
Set whether the solver uses only homogeneous boundary conditions
Implements LinearSolver< T >.
|
virtual |
Set Function F(u) = 0 and Jacobian dF(u)/du for nonlinear solves
Implements LinearSolver< T >.
Reimplemented in PetscSolverViscousTensor< T >, and PetscSolverPoisson< T >.
Referenced by PetscSolver< LevelData< FArrayBox > >::setHomogeneous().
|
virtual |
Solve
Implements LinearSolver< T >.
Referenced by PetscSolver< LevelData< FArrayBox > >::setHomogeneous().
int PetscSolver< T >::solve_private | ( | T & | a_phi, |
const T & | a_rhs | ||
) |
Real PetscSolver< T >::computeResidual | ( | ) |
viewResidual
Referenced by PetscSolver< LevelData< FArrayBox > >::setHomogeneous().
int PetscSolver< T >::applyOp | ( | T & | a_phi, |
const T & | a_rhs | ||
) |
apply
Referenced by PetscSolver< LevelData< FArrayBox > >::setHomogeneous().
|
inline |
set initial guess non-zero
|
inlinevirtual |
get an estimate of the number of nnz/row for matrix allocation
Reimplemented in PetscSolverViscousTensor< T >.
Referenced by PetscSolver< LevelData< FArrayBox > >::create_mat_vec().
|
inlineprotectedvirtual |
handling boundary conditions, turn it into a term to be added to the diag term this function coordinates with addBCrhsValue for Dirichlet BC for Neumann BC no RHS modification is required
|
inlineprotected |
|
inlineprotectedvirtual |
handling boundary conditions, turn it into a term to be added to the RHS this function coordinates with addBCdiagValue for Dirichlet BC, should return a term that is to be added to RHS
Referenced by PetscSolver< LevelData< FArrayBox > >::solve_private().
|
protected |
|
protected |
Referenced by PetscSolver< LevelData< FArrayBox > >::solve_private().
|
pure virtual |
Implemented in PetscSolverFAB< LevelData< FArrayBox > >.
Referenced by PetscSolver< LevelData< FArrayBox > >::create_mat_vec(), and PetscSolver< LevelData< FArrayBox > >::solve_private().
|
pure virtual |
Implemented in PetscSolverFAB< LevelData< FArrayBox > >.
|
pure virtual |
Implemented in PetscSolverFAB< LevelData< FArrayBox > >.
|
pure virtual |
Implemented in PetscSolverFAB< LevelData< FArrayBox > >.
Referenced by PetscSolver< LevelData< FArrayBox > >::create_mat_vec().
void PetscSolver< T >::setNull | ( | bool | n = true | ) |
bool PetscSolver< T >::m_homogeneous |
public member data: whether or not to use inhomogeneous boundary conditions.
Referenced by PetscSolver< LevelData< FArrayBox > >::define(), and PetscSolver< LevelData< FArrayBox > >::setHomogeneous().
Real PetscSolver< T >::m_dx |
member data: grid spacing
Referenced by PetscSolver< LevelData< FArrayBox > >::applyOp(), PetscSolver< LevelData< FArrayBox > >::define(), PetscSolver< LevelData< FArrayBox > >::PetscSolver(), and PetscSolver< LevelData< FArrayBox > >::solve_private().
|
protected |
|
protected |
|
protected |
|
protected |
Referenced by PetscSolver< LevelData< FArrayBox > >::create_mat_vec().
|
protected |