releasedExamples/AMRGodunov/srcPolytropic/WaveIBC.cpp
// Set boundary slopes:
//   The boundary slopes in a_dW are already set to one sided difference
//   approximations.  If this function doesn't change them they will be
//   used for the slopes at the boundaries.
Set boundary slopes:
The boundary slopes in a_dW are already set to one sided difference
approximations.  If this function doesn't change them they will be
used for the slopes at the boundaries.
Set boundary slopes : The boundary slopes in a_dW are already set to one sided difference approximations . If this function doesn ' t change them they will be used for the slopes at the boundaries .
void WaveIBC::setBdrySlopes(FArrayBox&       a_dW,
                            const FArrayBox& a_W,
                            const int&       a_dir,
                            const Real&      a_time)
{
  CH_assert(m_isFortranCommonSet == true);
  CH_assert(m_isDefined == true);
  if (!m_domain.isPeriodic(a_dir))
  {
    Box loBox,hiBox,centerBox,domain;
    int hasLo,hasHi;
    Box slopeBox = a_dW.box();
    slopeBox.grow(a_dir,1);
    loHiCenter(loBox,hasLo,hiBox,hasHi,centerBox,domain,
               slopeBox,m_domain,a_dir);
    if ((hasLo != 0) || (hasHi != 0))
    {
      FORT_SLOPEBCSF(CHF_FRA(a_dW),
                     CHF_CONST_FRA(a_W),
                     CHF_CONST_INT(a_dir),
                     CHF_BOX(loBox),
                     CHF_CONST_INT(hasLo),
                     CHF_BOX(hiBox),
                     CHF_CONST_INT(hasHi));
    }
  }
}
void WaveIBC :: setBdrySlopes ( FArrayBox & a_dW , const FArrayBox & a_W , const int & a_dir , const Real & a_time ) { CH_assert ( m_isFortranCommonSet == true ) ; CH_assert ( m_isDefined == true ) ; if ( ! m_domain . isPeriodic ( a_dir ) ) { Box loBox , hiBox , centerBox , domain ; int hasLo , hasHi ; Box slopeBox = a_dW . box ( ) ; slopeBox . grow ( a_dir , 1 ) ; loHiCenter ( loBox , hasLo , hiBox , hasHi , centerBox , domain , slopeBox , m_domain , a_dir ) ; if ( ( hasLo != 0 ) || ( hasHi != 0 ) ) { FORT_SLOPEBCSF ( CHF_FRA ( a_dW ) , CHF_CONST_FRA ( a_W ) , CHF_CONST_INT ( a_dir ) , CHF_BOX ( loBox ) , CHF_CONST_INT ( hasLo ) , CHF_BOX ( hiBox ) , CHF_CONST_INT ( hasHi ) ) ; } } }
Set boundary slopes:
The boundary slopes in a_dW are already set to one sided difference
approximations.
Set boundary slopes : The boundary slopes in a_dW are already set to one sided difference approximations .
// In periodic case, this doesn't do anything // Generate the domain boundary boxes, loBox and hiBox, if there are // domain boundarys there // Set the boundary slopes if necessary