releasedExamples/AMRINS/NavierStokes/AMRNavierStokesUtil.cpp
// ---------------------------------------------------------------
// kinda like swapOldAndNewStates, but resets time to a_time
kinda like swapOldAndNewStates, but resets time to a_time
kinda like swapOldAndNewStates but resets time to a_time
void
AMRNavierStokes::resetStates(const Real a_time)
{
  LevelData<FArrayBox>* tempPtr;
  tempPtr = m_vel_new_ptr;
  m_vel_new_ptr = m_vel_old_ptr;
  m_vel_old_ptr = tempPtr;
  tempPtr = m_lambda_new_ptr;
  m_lambda_new_ptr = m_lambda_old_ptr;
  m_lambda_old_ptr = tempPtr;
  CH_assert (m_scal_new.size() == m_scal_old.size());
  for (int comp=0; comp<m_scal_new.size(); comp++)
    {
      tempPtr = m_scal_new[comp];
      m_scal_new[comp] = m_scal_old[comp];
      m_scal_old[comp] = tempPtr;
    }
  time(a_time);
}
void AMRNavierStokes :: resetStates ( const Real a_time ) { LevelData < FArrayBox > * tempPtr ; tempPtr = m_vel_new_ptr ; m_vel_new_ptr = m_vel_old_ptr ; m_vel_old_ptr = tempPtr ; tempPtr = m_lambda_new_ptr ; m_lambda_new_ptr = m_lambda_old_ptr ; m_lambda_old_ptr = tempPtr ; CH_assert ( m_scal_new . size ( ) == m_scal_old . size ( ) ) ; for ( int comp = 0 ; comp < m_scal_new . size ( ) ; comp ++ ) { tempPtr = m_scal_new [ comp ] ; m_scal_new [ comp ] = m_scal_old [ comp ] ; m_scal_old [ comp ] = tempPtr ; } time ( a_time ) ; }
kinda like swapOldAndNewStates, but resets time to a_time
kinda like swapOldAndNewStates but resets time to a_time
// loop over scalar components