lib/src/EBAMRTools/Correct1D2D.cpp
///
/**
   subtracts off change in solution due to losing flux
   and adds in change in solution due to winning flux.
*/
subtracts off change in solution due to losing flux
and adds in change in solution due to winning flux.
subtracts off change in solution due to losing flux and adds in change in solution due to winning flux .
void
Correct1D2D::
correctSolution(LevelData<EBCellFAB>& a_U)
{
  int isrc = 0;  int idst = 0; int inc = m_nvar;
  for (int idir = 0; idir < SpaceDim; idir++)
    {
      for (SideIterator sit; sit.ok(); ++sit)
        {
          int iloc = index(idir, sit());
          for (DataIterator dit = m_eblg.getDBL().dataIterator(); dit.ok(); ++dit)
            {
              a_U[dit()].plus(m_deltaU1d[iloc][dit()], m_dbl1d[iloc][dit()], isrc, idst, inc);
            }
          Copier copier(m_dbl2d[iloc], a_U.disjointBoxLayout());
          EBAddOpCorr op;
          m_deltaU2d[iloc].copyTo(a_U, copier, op);
        }
    }
}
void Correct1D2D :: correctSolution ( LevelData < EBCellFAB > & a_U ) { int isrc = 0 ; int idst = 0 ; int inc = m_nvar ; for ( int idir = 0 ; idir < SpaceDim ; idir ++ ) { for ( SideIterator sit ; sit . ok ( ) ; ++ sit ) { int iloc = index ( idir , sit ( ) ) ; for ( DataIterator dit = m_eblg . getDBL ( ) . dataIterator ( ) ; dit . ok ( ) ; ++ dit ) { a_U [ dit ( ) ] . plus ( m_deltaU1d [ iloc ] [ dit ( ) ] , m_dbl1d [ iloc ] [ dit ( ) ] , isrc , idst , inc ) ; } Copier copier ( m_dbl2d [ iloc ] , a_U . disjointBoxLayout ( ) ) ; EBAddOpCorr op ; m_deltaU2d [ iloc ] . copyTo ( a_U , copier , op ) ; } } }
subtracts off change in solution due to losing flux
and adds in change in solution due to winning flux.
subtracts off change in solution due to losing flux and adds in change in solution due to winning flux .
//coarse stuff is already on the same layout as a_U //because it was shifted into its own box //the two d change might be coming from different proc---hence the copyto