Chombo + EB  3.2
Public Member Functions | Public Attributes | List of all members
PetscSolverPoisson< T > Class Template Reference

#include <PetscSolver.H>

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

Public Member Functions

 PetscSolverPoisson ()
 
virtual void define (Real a_dx, bool a_homogeneous=true)
 
virtual void define (LinearOp< T > *a_op, bool a_homogeneous=true)
 
virtual int formMatrix (Mat, const LevelData< FArrayBox > *=0, PetscInt my0=0, PetscInt nloc=0, PetscInt *d=0, PetscInt *o=0)
 
- Public Member Functions inherited from PetscSolverFAB< T >
 PetscSolverFAB ()
 
BaseFab< Real > & getRegFab (LevelData< FArrayBox > &a_fab, const DataIndex &a_datInd)
 
const BaseFab< Real > & getRegFab (const LevelData< FArrayBox > &a_fab, const DataIndex &a_datInd) const
 
const BaseFab< Real > & getRegFab (const LevelData< FArrayBox > &a_fab, const DataIndex &a_datInd, Box &a_box) const
 
- Public Member Functions inherited from PetscSolver< T >
 PetscSolver ()
 
virtual ~PetscSolver ()
 
void destroy ()
 
virtual void setHomogeneous (bool a_homogeneous)
 
virtual void setFunctionAndJacobian (PetscErrorCode(*f)(SNES, Vec, Vec, void *), PetscErrorCode(*j)(SNES, Vec, Mat *, Mat *, MatStructure *, void *))
 
virtual void solve (T &a_phi, const T &a_rhs)
 
int solve_private (T &a_phi, const T &a_rhs)
 
virtual void solve_mfree (T &a_phi, const T &a_rhs, LinearOp< T > *a_op)
 
int solve_mfree_private (T &a_phi, const T &a_rhs, LinearOp< T > *a_op)
 
Real computeResidual ()
 
virtual int applyOp (T &a_phi, const T &a_rhs)
 
void setInitialGuessNonzero (bool b=true)
 
void setOptionsPrefix (const char prefix[])
 
KSP getKSP ()
 
virtual int getNNZPerRow () const
 
virtual bool supportNNZExact () const
 
virtual void rhsOperation (const T &a_rhs)
 
virtual Real addBCdiagValue (const IntVect &a_iv, const IntVect &a_jv, const T &a_rhs, const DataIndex &a_datInd, const Real coeff=1)
 
int resetOperator ()
 
Real normInfinity (const T &a_phi) const
 
int setup_solver (const T &a_phi)
 
int create_mat_vec (const T &a_phi)
 
PetscErrorCode putPetscInChombo (T &a_phi, const Vec xx)
 
PetscErrorCode putChomboInPetsc (Vec out, const T &a_phi)
 
virtual int formMatrix (Mat, const T *=0, PetscInt my0=0, PetscInt nloc=0, PetscInt *d=0, PetscInt *o=0)=0
 
virtual BaseFab< Real > & getRegFab (T &a_fab, const DataIndex &a_datInd)=0
 
virtual const BaseFab< Real > & getRegFab (const T &a_fab, const DataIndex &a_datInd) const =0
 
virtual const BaseFab< Real > & getRegFab (const T &a_fab, const DataIndex &a_datInd, Box &a_box) const =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

Real m_alpha
 
Real m_beta
 
- Public Attributes inherited from PetscSolver< T >
LinearOp< T > * m_op_mfree
 
m_phi_mfree
 
m_Lphi_mfree
 
bool m_mfree_homogeneous
 
bool m_homogeneous
 
Real m_dx
 
Mat m_mat
 
void * m_ctx
 
Vec m_xx
 
Vec m_rr
 
Vec m_bb
 
SNES m_snes
 
KSP m_ksp
 
LevelData< BaseFab< PetscInt > > m_gids
 
PetscInt m_gid0
 

Additional Inherited Members

- Static Public Member Functions inherited from PetscSolver< T >
static PetscErrorCode ksp_monitor_pout (KSP ksp, PetscInt it, PetscReal rnorm, void *ctx)
 
static PetscErrorCode apply_mfree (Mat A, Vec x, Vec f)
 
- Protected Member Functions inherited from PetscSolver< T >
virtual Real addBCrhsValue (const IntVect &a_iv, const T &a_phi, const DataIndex &a_datInd, const Real &coeff=1)
 
- Protected Attributes inherited from PetscSolver< T >
PetscInt m_defined
 
PetscErrorCode(* m_function )(SNES, Vec, Vec, void *)
 
PetscErrorCode(* m_jacobian )(SNES, Vec, Mat *, Mat *, MatStructure *, void *)
 
char m_prestring [32]
 
bool m_null
 
bool m_nz_init_guess
 
LevelData< BaseFab< bool > > m_bccode
 

Constructor & Destructor Documentation

template<class T >
PetscSolverPoisson< T >::PetscSolverPoisson ( )

Member Function Documentation

template<class T >
virtual void PetscSolverPoisson< T >::define ( Real  a_dx,
bool  a_homogeneous = true 
)
virtual

Reimplemented from PetscSolver< T >.

template<class T >
virtual void PetscSolverPoisson< T >::define ( LinearOp< T > *  a_operator,
bool  a_homogeneous = true 
)
inlinevirtual

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.

Reimplemented from PetscSolver< T >.

References PetscSolver< T >::define().

template<class T >
virtual int PetscSolverPoisson< T >::formMatrix ( Mat  ,
const LevelData< FArrayBox > *  = 0,
PetscInt  my0 = 0,
PetscInt  nloc = 0,
PetscInt *  d = 0,
PetscInt *  o = 0 
)
virtual

Member Data Documentation

template<class T >
Real PetscSolverPoisson< T >::m_alpha
template<class T >
Real PetscSolverPoisson< T >::m_beta

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