releasedExamples/AMRINS/util/VelocityAMRPoissonOp.cpp
/***********************/
// evaluate operator, inhomogeneous C/F boundary conditions
// note that operator applies C/F interpolation and copy bc's
/***********************/
// ---------------------------------------------------------
evaluate operator, inhomogeneous C/F boundary conditions
note that operator applies C/F interpolation and copy bc's
evaluate operator inhomogeneous C / F boundary conditions note that operator applies C / F interpolation and copy bc ' s
void
VelocityAMRPoissonOp::applyOpI(LevelData<FArrayBox>&        a_lhs,
                               const LevelData<FArrayBox>&  a_phi,
                               bool                         a_homogeneous,
                               VelBCHolder&                 a_velBC)
{
  CH_TIME("VelocityAMRPoissonOp::applyOpI");
  LevelData<FArrayBox>& phi = (LevelData<FArrayBox>&)a_phi;
  const DisjointBoxLayout& dbl = a_lhs.disjointBoxLayout();
  DataIterator dit = phi.dataIterator();
  {
    CH_TIME("apply Op BC's");
    a_velBC.applyBCs(phi, dbl,
                     m_domain, m_dx,
                     a_homogeneous);
  }
  if (s_exchangeMode == 0)
    phi.exchange(phi.interval(), m_exchangeCopier);
  else if (s_exchangeMode == 1)
    phi.exchangeNoOverlap(m_exchangeCopier);
  else
    MayDay::Error("exchangeMode");
  for (dit.begin(); dit.ok(); ++dit)
    {
      const Box& region = dbl[dit];
      FORT_OPERATORLAP(CHF_FRA(a_lhs[dit]),
                       CHF_CONST_FRA(phi[dit]),
                       CHF_BOX(region),
                       CHF_CONST_REAL(m_dx),
                       CHF_CONST_REAL(m_alpha),
                       CHF_CONST_REAL(m_beta));
    }
}
void VelocityAMRPoissonOp :: applyOpI ( LevelData < FArrayBox > & a_lhs , const LevelData < FArrayBox > & a_phi , bool a_homogeneous , VelBCHolder & a_velBC ) { CH_TIME ( " " ) ; LevelData < FArrayBox > & phi = ( LevelData < FArrayBox > & ) a_phi ; const DisjointBoxLayout & dbl = a_lhs . disjointBoxLayout ( ) ; DataIterator dit = phi . dataIterator ( ) ; { CH_TIME ( " " ) ; a_velBC . applyBCs ( phi , dbl , m_domain , m_dx , a_homogeneous ) ; } if ( s_exchangeMode == 0 ) phi . exchange ( phi . interval ( ) , m_exchangeCopier ) ; else if ( s_exchangeMode == 1 ) phi . exchangeNoOverlap ( m_exchangeCopier ) ; else MayDay :: Error ( " " ) ; for ( dit . begin ( ) ; dit . ok ( ) ; ++ dit ) { const Box & region = dbl [ dit ] ; FORT_OPERATORLAP ( CHF_FRA ( a_lhs [ dit ] ) , CHF_CONST_FRA ( phi [ dit ] ) , CHF_BOX ( region ) , CHF_CONST_REAL ( m_dx ) , CHF_CONST_REAL ( m_alpha ) , CHF_CONST_REAL ( m_beta ) ) ; } }
evaluate operator, inhomogeneous C/F boundary conditions
note that operator applies C/F interpolation and copy bc's
evaluate operator inhomogeneous C / F boundary conditions note that operator applies C / F interpolation and copy bc ' s