lib/src/AMRElliptic/LevelTGA.cpp
// in this function, we call the updateSoln function, compute
// the update, then subtract off the extra pieces to return the
// diffusive part of the update
in this function, we call the updateSoln function, compute
the update, then subtract off the extra pieces to return the
diffusive part of the update
in this function we call the updateSoln function compute the update then subtract off the extra pieces to return the diffusive part of the update
void
LevelBackwardEuler::computeDiffusion(LevelData<FArrayBox>& a_diffusiveTerm,
                           LevelData<FArrayBox>& a_phiOld,
                           LevelData<FArrayBox>& a_src,
                           LevelFluxRegister* a_fineFluxRegPtr,
                           LevelFluxRegister* a_crseFluxRegPtr,
                           const LevelData<FArrayBox>* a_crsePhiOldPtr,
                           const LevelData<FArrayBox>* a_crsePhiNewPtr,
                           Real a_oldTime,
                           Real a_crseOldTime,
                           Real a_crseNewTime,
                           Real a_dt,
                           int a_level)
{
  int ncomp = a_phiOld.nComp();
  LevelData<FluxBox>   flux(m_grids[a_level], ncomp,  IntVect::Zero);
  BaseLevelBackwardEuler<LevelData<FArrayBox>, FluxBox, LevelFluxRegister>::computeDiffusion
    (a_diffusiveTerm, a_phiOld, a_src, flux,
     a_fineFluxRegPtr, a_crseFluxRegPtr,
     a_crsePhiOldPtr,  a_crsePhiNewPtr,
     a_oldTime, a_crseOldTime, a_crseNewTime, a_dt,
     a_level);
}
void LevelBackwardEuler :: computeDiffusion ( LevelData < FArrayBox > & a_diffusiveTerm , LevelData < FArrayBox > & a_phiOld , LevelData < FArrayBox > & a_src , LevelFluxRegister * a_fineFluxRegPtr , LevelFluxRegister * a_crseFluxRegPtr , const LevelData < FArrayBox > * a_crsePhiOldPtr , const LevelData < FArrayBox > * a_crsePhiNewPtr , Real a_oldTime , Real a_crseOldTime , Real a_crseNewTime , Real a_dt , int a_level ) { int ncomp = a_phiOld . nComp ( ) ; LevelData < FluxBox > flux ( m_grids [ a_level ] , ncomp , IntVect :: Zero ) ; BaseLevelBackwardEuler < LevelData < FArrayBox > , FluxBox , LevelFluxRegister > :: computeDiffusion ( a_diffusiveTerm , a_phiOld , a_src , flux , a_fineFluxRegPtr , a_crseFluxRegPtr , a_crsePhiOldPtr , a_crsePhiNewPtr , a_oldTime , a_crseOldTime , a_crseNewTime , a_dt , a_level ) ; }
in this function, we call the updateSoln function, compute
the update, then subtract off the extra pieces to return the
diffusive part of the update
in this function we call the updateSoln function compute the update then subtract off the extra pieces to return the diffusive part of the update
// first compute updated solution //the IntVect::Zero is important here.