lib/test/EBAMRTools/restart.cpp
/** Essential for restart.
 *  Loads the field data and the VOF data, but not the geometry (which must be
 *  recomputed).
*/
Essential for restart.
Loads the field data and the VOF data, but not the geometry (which must be
recomputed).
Essential for restart . Loads the field data and the VOF data but not the geometry ( which must be recomputed ) .
void
EBRestart::loadHDF( int                                   a_step,
                    int                                   a_ghosts,
                    const EBIndexSpace*                   a_ebIndexSpace,
                    const Vector<LevelData<EBCellFAB>* >& a_ebvector,
                    Vector<DisjointBoxLayout>&            a_grids,
                    const EBRestart::GeomParams&          a_geometry,
                    const EBRestart::InputParams&         a_inputs )
{
#ifdef CH_USE_HDF5
  EBRestart::initEBGrids( a_grids, a_ebvector, a_ebIndexSpace, a_ghosts,
                          a_inputs, a_geometry);
  HDF5Handle handle;
  handle.open(filename(a_step), HDF5Handle::OPEN_RDONLY);
  for ( int lev=0; lev<a_inputs.nlevs; ++lev )
  {
    LevelData<EBCellFAB>& field( *a_ebvector[lev] );
    readCellCentered(handle, lev, a_ebIndexSpace, a_ghosts, &field);
  }
  handle.close();
#endif 
}
void EBRestart :: loadHDF ( int a_step , int a_ghosts , const EBIndexSpace * a_ebIndexSpace , const Vector < LevelData < EBCellFAB > * > & a_ebvector , Vector < DisjointBoxLayout > & a_grids , const EBRestart :: GeomParams & a_geometry , const EBRestart :: InputParams & a_inputs ) { #ifdef CH_USE_HDF5 EBRestart :: initEBGrids ( a_grids , a_ebvector , a_ebIndexSpace , a_ghosts , a_inputs , a_geometry ) ; HDF5Handle handle ; handle . open ( filename ( a_step ) , HDF5Handle :: OPEN_RDONLY ) ; for ( int lev = 0 ; lev < a_inputs . nlevs ; ++ lev ) { LevelData < EBCellFAB > & field ( * a_ebvector [ lev ] ) ; readCellCentered ( handle , lev , a_ebIndexSpace , a_ghosts , & field ) ; } handle . close ( ) ; #endif }
Essential for restart.
Essential for restart .
// CH_USE_HDF5