lib/src/AMRElliptic/NewPoissonOp.cpp
/**************************/
// this preconditioner first initializes phihat to (IA)phihat = rhshat
// (diagonization of L -- A is the matrix version of L)
// then smooths with a couple of passes of levelGSRB
this preconditioner first initializes phihat to (IA)phihat = rhshat
(diagonization of L -- A is the matrix version of L)
then smooths with a couple of passes of levelGSRB
this preconditioner first initializes phihat to ( IA ) phihat = rhshat ( diagonization of L -- A is the matrix version of L ) then smooths with a couple of passes of levelGSRB
void NewPoissonOp::preCond(   FArrayBox& a_phi, const FArrayBox& a_rhs)
{
  Real mult = -m_dx[0]*m_dx[0]/(2.0*SpaceDim);
  Interval comps = a_phi.interval();
  CH_assert(a_phi.nComp() == a_rhs.nComp());
  a_phi.copy(a_rhs.box(), comps,
             a_rhs.box(), a_rhs,
             comps);
  a_phi *= mult;
  relax(a_phi, a_rhs, 2);
}
void NewPoissonOp :: preCond ( FArrayBox & a_phi , const FArrayBox & a_rhs ) { Real mult = - m_dx [ 0 ] * m_dx [ 0 ] / ( 2.0 * SpaceDim ) ; Interval comps = a_phi . interval ( ) ; CH_assert ( a_phi . nComp ( ) == a_rhs . nComp ( ) ) ; a_phi . copy ( a_rhs . box ( ) , comps , a_rhs . box ( ) , a_rhs , comps ) ; a_phi *= mult ; relax ( a_phi , a_rhs , 2 ) ; }
this preconditioner first initializes phihat to (IA)phihat = rhshat
(diagonization of L -- A is the matrix version of L)
then smooths with a couple of passes of levelGSRB
this preconditioner first initializes phihat to ( IA ) phihat = rhshat ( diagonization of L -- A is the matrix version of L ) then smooths with a couple of passes of levelGSRB
// diagonal term of this operator is 4/h/h in 2D, 6/h/h in 3D, // so inverse of this is our initial multiplier