lib/src/AMRTools/QuadCFStencil.cpp
/**
   add fab to the stencil.
   the weight equal to the value of the
   of the fab data at the box
*/
add fab to the stencil.
the weight equal to the value of the
of the fab data at the box
add fab to the stencil . the weight equal to the value of the of the fab data at the box
void
QuadCFStencil::addFabToSten(
                            const BaseFab<Real> & a_fabin,
                            DerivStencil&  a_sten
                            )
{
  CH_assert(isDefined());
  CH_assert(!a_fabin.box().isEmpty());
  CH_assert(a_fabin.nComp() == 1);
  BoxIterator bit(a_fabin.box());
  for (bit.begin(); bit.ok(); ++bit)
    {
      IntVect iv = bit();
      Real weight = a_fabin(iv);
      a_sten.accumulate(iv, weight);
    }
}
void QuadCFStencil :: addFabToSten ( const BaseFab < Real > & a_fabin , DerivStencil & a_sten ) { CH_assert ( isDefined ( ) ) ; CH_assert ( ! a_fabin . box ( ) . isEmpty ( ) ) ; CH_assert ( a_fabin . nComp ( ) == 1 ) ; BoxIterator bit ( a_fabin . box ( ) ) ; for ( bit . begin ( ) ; bit . ok ( ) ; ++ bit ) { IntVect iv = bit ( ) ; Real weight = a_fabin ( iv ) ; a_sten . accumulate ( iv , weight ) ; } }
add fab to the stencil.
add fab to the stencil .