lib/src/AMRTools/QuadCFInterp.cpp
/***********************/
// does homogeneous coarse/fine interpolation
/***********************/
does homogeneous coarse/fine interpolation
does homogeneous coarse / fine interpolation
void
QuadCFInterp::
homogeneousCFInterp(LevelData<FArrayBox>& a_phif,
                    LevelData<FArrayBox>& a_tanGrad,
                    LayoutData<CFIVS> a_loCFIVS[SpaceDim],
                    LayoutData<CFIVS> a_hiCFIVS[SpaceDim],
                    Real a_dxLevel,
                    Real a_dxCrse,
                    int a_ncomp,
                    LayoutData<TensorFineStencilSet> a_loTanStencilSets[SpaceDim],
                    LayoutData<TensorFineStencilSet> a_hiTanStencilSets[SpaceDim])
{
  a_phif.exchange(a_phif.interval());
  DataIterator dit = a_phif.dataIterator();
  for (dit.begin(); dit.ok(); ++dit)
    {
      const DataIndex& datInd = dit();
      for (int idir = 0; idir < SpaceDim; idir++)
        {
          SideIterator sit;
          for (sit.begin(); sit.ok(); sit.next())
            {
              homogeneousCFInterpPhi(a_phif,datInd,idir,sit(),
                                     a_loCFIVS, a_hiCFIVS,
                                     a_dxLevel, a_dxCrse, a_ncomp);
            }
        }
      for (int idir = 0; idir<SpaceDim; idir++)
        {
          SideIterator sit;
          for (sit.begin(); sit.ok(); sit.next())
            {
              homogeneousCFInterpTanGrad(a_tanGrad, a_phif,
                                         datInd,idir,sit(),
                                         a_dxLevel, a_dxCrse, a_ncomp,
                                         a_loTanStencilSets, a_hiTanStencilSets);
            }
        }
    }
}
void QuadCFInterp :: homogeneousCFInterp ( LevelData < FArrayBox > & a_phif , LevelData < FArrayBox > & a_tanGrad , LayoutData < CFIVS > a_loCFIVS [ SpaceDim ] , LayoutData < CFIVS > a_hiCFIVS [ SpaceDim ] , Real a_dxLevel , Real a_dxCrse , int a_ncomp , LayoutData < TensorFineStencilSet > a_loTanStencilSets [ SpaceDim ] , LayoutData < TensorFineStencilSet > a_hiTanStencilSets [ SpaceDim ] ) { a_phif . exchange ( a_phif . interval ( ) ) ; DataIterator dit = a_phif . dataIterator ( ) ; for ( dit . begin ( ) ; dit . ok ( ) ; ++ dit ) { const DataIndex & datInd = dit ( ) ; for ( int idir = 0 ; idir < SpaceDim ; idir ++ ) { SideIterator sit ; for ( sit . begin ( ) ; sit . ok ( ) ; sit . next ( ) ) { homogeneousCFInterpPhi ( a_phif , datInd , idir , sit ( ) , a_loCFIVS , a_hiCFIVS , a_dxLevel , a_dxCrse , a_ncomp ) ; } } for ( int idir = 0 ; idir < SpaceDim ; idir ++ ) { SideIterator sit ; for ( sit . begin ( ) ; sit . ok ( ) ; sit . next ( ) ) { homogeneousCFInterpTanGrad ( a_tanGrad , a_phif , datInd , idir , sit ( ) , a_dxLevel , a_dxCrse , a_ncomp , a_loTanStencilSets , a_hiTanStencilSets ) ; } } } }
does homogeneous coarse/fine interpolation
does homogeneous coarse / fine interpolation
// need to do this to be sure that tangential derivatives are computed // correctly // first fill in cells for phi // now fill in tangential gradient cells