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

#include <LinearSolver.H>

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

Public Member Functions

virtual ~LinearOp ()
 
virtual void residual (T &a_lhs, const T &a_phi, const T &a_rhs, bool a_homogeneous=false)=0
 
virtual void preCond (T &a_cor, const T &a_residual)=0
 
virtual void applyOp (T &a_lhs, const T &a_phi, bool a_homogeneous=false)=0
 
virtual void create (T &a_lhs, const T &a_rhs)=0
 
virtual void clear (T &a_lhs)
 
virtual void assign (T &a_lhs, const T &a_rhs)=0
 
virtual void assignLocal (T &a_lhs, const T &a_rhs)
 
virtual Real dotProduct (const T &a_1, const T &a_2)=0
 
virtual void mDotProduct (const T &a_1, const int a_sz, const T a_2[], Real a_mdots[])
 
virtual void incr (T &a_lhs, const T &a_x, Real a_scale)=0
 
virtual void axby (T &a_lhs, const T &a_x, const T &a_y, Real a_a, Real a_b)=0
 
virtual void scale (T &a_lhs, const Real &a_scale)=0
 
virtual Real norm (const T &a_rhs, int a_ord)=0
 
virtual Real dx () const
 
virtual void setToZero (T &a_lhs)=0
 
virtual void write (const T *a, const char *filename)
 

Detailed Description

template<class T>
class LinearOp< T >

Operator class for Linear solver for solving L(phi) = rhs.

Constructor & Destructor Documentation

◆ ~LinearOp()

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

Member Function Documentation

◆ residual()

template<class T>
virtual void LinearOp< T >::residual ( T &  a_lhs,
const T &  a_phi,
const T &  a_rhs,
bool  a_homogeneous = false 
)
pure virtual

Say you are solving L(phi) = rhs. Make a_lhs = L(a_phi) - a_rhs. If a_homogeneous is true, evaluate the operator using homogeneous boundary conditions.

Implemented in EBAMRPoissonOp, NWOEBViscousTensorOp, EBViscousTensorOp, EBConductivityOp, NWOEBConductivityOp, NWOViscousTensorOp, slowEBCO, ViscousTensorOp, AMRPoissonOp, EBPoissonOp, ResistivityOp, AMRNodeOp, MFPoissonOp, MultilevelLinearOp< T >, NewPoissonOp, NewPoissonOp4, and PoissonOp4.

Referenced by LinearOp< LevelData< MFCellFAB > >::~LinearOp().

◆ preCond()

template<class T>
virtual void LinearOp< T >::preCond ( T &  a_cor,
const T &  a_residual 
)
pure virtual

◆ applyOp()

template<class T>
virtual void LinearOp< T >::applyOp ( T &  a_lhs,
const T &  a_phi,
bool  a_homogeneous = false 
)
pure virtual

In the context of solving L(phi) = rhs, set a_lhs = L(a_phi). If a_homogeneous is true, evaluate the operator using homogeneous boundary conditions.

Implemented in EBAMRPoissonOp, NWOEBViscousTensorOp, EBViscousTensorOp, EBConductivityOp, NWOEBConductivityOp, NWOViscousTensorOp, slowEBCO, ViscousTensorOp, AMRPoissonOp, EBPoissonOp, MFPoissonOp, AMRNodeOp, ResistivityOp, MultilevelLinearOp< T >, PoissonOp4, NewPoissonOp, and NewPoissonOp4.

Referenced by LinearOp< LevelData< MFCellFAB > >::~LinearOp().

◆ create()

template<class T>
virtual void LinearOp< T >::create ( T &  a_lhs,
const T &  a_rhs 
)
pure virtual

◆ clear()

template<class T>
virtual void LinearOp< T >::clear ( T &  a_lhs)
inlinevirtual

Opposite of create – perform any operations required before lhs goes out of scope. In general, the only time this needs to be defined in a derived class is if the create() function called new. Otherwise, the default no-op function is sufficient.

Reimplemented in MultilevelLinearOp< T >.

Referenced by PetscSolver< LevelData< FArrayBox > >::solve_mfree_private().

◆ assign()

template<class T>
virtual void LinearOp< T >::assign ( T &  a_lhs,
const T &  a_rhs 
)
pure virtual

◆ assignLocal()

template<class T>
virtual void LinearOp< T >::assignLocal ( T &  a_lhs,
const T &  a_rhs 
)
inlinevirtual

Reimplemented in EBAMRPoissonOp, and AMRPoissonOp.

◆ dotProduct()

template<class T>
virtual Real LinearOp< T >::dotProduct ( const T &  a_1,
const T &  a_2 
)
pure virtual

◆ mDotProduct()

template<class T>
virtual void LinearOp< T >::mDotProduct ( const T &  a_1,
const int  a_sz,
const T  a_2[],
Real  a_mdots[] 
)
inlinevirtual

Reimplemented in AMRPoissonOp.

◆ incr()

template<class T>
virtual void LinearOp< T >::incr ( T &  a_lhs,
const T &  a_x,
Real  a_scale 
)
pure virtual

◆ axby()

template<class T>
virtual void LinearOp< T >::axby ( T &  a_lhs,
const T &  a_x,
const T &  a_y,
Real  a_a,
Real  a_b 
)
pure virtual

◆ scale()

template<class T>
virtual void LinearOp< T >::scale ( T &  a_lhs,
const Real a_scale 
)
pure virtual

◆ norm()

template<class T>
virtual Real LinearOp< T >::norm ( const T &  a_rhs,
int  a_ord 
)
pure virtual

◆ dx()

template<class T>
virtual Real LinearOp< T >::dx ( ) const
inlinevirtual

◆ setToZero()

template<class T>
virtual void LinearOp< T >::setToZero ( T &  a_lhs)
pure virtual

◆ write()

template<class T>
virtual void LinearOp< T >::write ( const T *  a,
const char *  filename 
)
inlinevirtual

Debugging aid for solvers. Print out a "T" to a file named "filename" default implementation is to print out a message saying "LinearOp::write not implemented"

Reimplemented in AMRPoissonOp, and MultilevelLinearOp< T >.


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