Chombo + EB + MF
3.2
|
#include <LinearSolver.H>
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) |
Operator class for Linear solver for solving L(phi) = rhs.
|
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().
|
pure virtual |
Given the current state of the residual the correction, apply your preconditioner to a_cor.
Implemented in EBAMRPoissonOp, NWOEBViscousTensorOp, EBViscousTensorOp, EBConductivityOp, NWOEBConductivityOp, NWOViscousTensorOp, ViscousTensorOp, slowEBCO, AMRPoissonOp, EBPoissonOp, ResistivityOp, AMRNodeOp, MFPoissonOp, MultilevelLinearOp< T >, VCAMRPoissonOp2, NewPoissonOp, NewPoissonOp4, and PoissonOp4.
Referenced by LinearOp< LevelData< MFCellFAB > >::~LinearOp().
|
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().
|
pure virtual |
Creat data holder a_lhs that mirrors a_rhs. You do not need to copy the data of a_rhs, just make a holder the same size.
Implemented in EBAMRPoissonOp, NWOEBViscousTensorOp, EBViscousTensorOp, EBConductivityOp, NWOEBConductivityOp, slowEBCO, NWOViscousTensorOp, ViscousTensorOp, AMRPoissonOp, EBPoissonOp, MFPoissonOp, ResistivityOp, AMRNodeOp, MultilevelLinearOp< T >, PoissonOp4, NewPoissonOp, and NewPoissonOp4.
Referenced by AMRMultiGrid< LevelData< MFCellFAB > >::init(), PetscSolver< LevelData< FArrayBox > >::solve_mfree_private(), and LinearOp< LevelData< MFCellFAB > >::~LinearOp().
|
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().
|
pure virtual |
Set a_lhs equal to a_rhs.
Implemented in EBAMRPoissonOp, NWOEBViscousTensorOp, EBViscousTensorOp, EBConductivityOp, NWOEBConductivityOp, NWOViscousTensorOp, ViscousTensorOp, slowEBCO, AMRPoissonOp, EBPoissonOp, ResistivityOp, MFPoissonOp, AMRNodeOp, MultilevelLinearOp< T >, PoissonOp4, NewPoissonOp, and NewPoissonOp4.
Referenced by AMRLevelOp< LevelData< MFCellFAB > >::assignCopier(), LinearOp< LevelData< MFCellFAB > >::assignLocal(), and LinearOp< LevelData< MFCellFAB > >::clear().
|
inlinevirtual |
Reimplemented in EBAMRPoissonOp, and AMRPoissonOp.
|
pure virtual |
Compute and return the dot product of a_1 and a_2. In most contexts, this means return the sum over all data points of a_1*a_2.
Implemented in EBAMRPoissonOp, NWOEBViscousTensorOp, EBViscousTensorOp, EBConductivityOp, NWOEBConductivityOp, NWOViscousTensorOp, ViscousTensorOp, slowEBCO, AMRPoissonOp, EBPoissonOp, ResistivityOp, MFPoissonOp, AMRNodeOp, MultilevelLinearOp< T >, PoissonOp4, NewPoissonOp, and NewPoissonOp4.
Referenced by LinearOp< LevelData< MFCellFAB > >::assignLocal(), and LinearOp< LevelData< MFCellFAB > >::mDotProduct().
|
inlinevirtual |
Reimplemented in AMRPoissonOp.
|
pure virtual |
Increment by scaled amount (a_lhs += a_scale*a_x).
Implemented in EBAMRPoissonOp, NWOEBViscousTensorOp, EBViscousTensorOp, EBConductivityOp, NWOEBConductivityOp, NWOViscousTensorOp, ViscousTensorOp, slowEBCO, AMRPoissonOp, EBPoissonOp, ResistivityOp, MFPoissonOp, MultilevelLinearOp< T >, AMRNodeOp, PoissonOp4, NewPoissonOp, and NewPoissonOp4.
Referenced by LinearOp< LevelData< MFCellFAB > >::mDotProduct().
|
pure virtual |
Set input to a scaled sum (a_lhs = a_a*a_x + a_b*a_y).
Implemented in EBAMRPoissonOp, NWOEBViscousTensorOp, EBViscousTensorOp, EBConductivityOp, NWOEBConductivityOp, NWOViscousTensorOp, ViscousTensorOp, slowEBCO, AMRPoissonOp, EBPoissonOp, ResistivityOp, MFPoissonOp, MultilevelLinearOp< T >, AMRNodeOp, PoissonOp4, NewPoissonOp, and NewPoissonOp4.
Referenced by LinearOp< LevelData< MFCellFAB > >::mDotProduct().
|
pure virtual |
Multiply the input by a given scale (a_lhs *= a_scale).
Implemented in EBAMRPoissonOp, NWOEBViscousTensorOp, EBViscousTensorOp, EBConductivityOp, NWOEBConductivityOp, NWOViscousTensorOp, ViscousTensorOp, slowEBCO, AMRPoissonOp, EBPoissonOp, ResistivityOp, MFPoissonOp, MultilevelLinearOp< T >, AMRNodeOp, PoissonOp4, NewPoissonOp, and NewPoissonOp4.
Referenced by LinearOp< LevelData< MFCellFAB > >::mDotProduct().
Return the norm of a_rhs. a_ord == 0 max norm, a_ord == 1 sum(abs(a_rhs)), else, L(a_ord) norm.
Implemented in EBAMRPoissonOp, NWOEBViscousTensorOp, EBViscousTensorOp, EBConductivityOp, NWOEBConductivityOp, NWOViscousTensorOp, ViscousTensorOp, slowEBCO, AMRPoissonOp, EBPoissonOp, MultilevelLinearOp< T >, ResistivityOp, MFPoissonOp, AMRNodeOp, PoissonOp4, NewPoissonOp, and NewPoissonOp4.
Referenced by AMRLevelOp< LevelData< MFCellFAB > >::AMRNorm(), AMRLevelOp< LevelData< MFCellFAB > >::localMaxNorm(), and LinearOp< LevelData< MFCellFAB > >::mDotProduct().
Return dx at this level of refinement
Reimplemented in AMRPoissonOp, NWOViscousTensorOp, ViscousTensorOp, EBAMRPoissonOp, EBConductivityOp, and NWOEBConductivityOp.
Referenced by PetscSolver< LevelData< FArrayBox > >::define().
|
pure virtual |
Set a_lhs to zero.
Implemented in EBAMRPoissonOp, NWOEBViscousTensorOp, EBViscousTensorOp, EBConductivityOp, NWOEBConductivityOp, NWOViscousTensorOp, ViscousTensorOp, slowEBCO, AMRPoissonOp, EBPoissonOp, MultilevelLinearOp< T >, ResistivityOp, MFPoissonOp, AMRNodeOp, PoissonOp4, NewPoissonOp, and NewPoissonOp4.
Referenced by LinearOp< LevelData< MFCellFAB > >::dx(), and AMRLevelOp< LevelData< MFCellFAB > >::zeroCovered().
|
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 >.