Exemplo n.º 1
0
// Set up initial conditions
void ExplosionIBC::initialize(LevelData<FArrayBox>& a_U)
{
  CH_assert(m_isFortranCommonSet == true);
  CH_assert(m_isDefined == true);

  DataIterator dit = a_U.boxLayout().dataIterator();

  // Iterator of all grids in this level
  for (dit.begin(); dit.ok(); ++dit)
  {
    // Storage for current grid
    FArrayBox& U = a_U[dit()];

    // Box of current grid
    Box uBox = U.box();
    uBox &= m_domain;

    // Set up initial condition in this grid
    FORT_EXPLOSIONINITF(CHF_FRA(U),
                        CHF_CONST_REAL(m_dx),
                        CHF_BOX(uBox));
  }
}