src/incflo_regrid.cpp
// Remake an existing level using provided BoxArray and DistributionMapping and
// fill with existing fine and coarse data.
// overrides the pure virtual function in AmrCore
Remake an existing level using provided BoxArray and DistributionMapping and
fill with existing fine and coarse data.
overrides the pure virtual function in AmrCore
Remake an existing level using provided BoxArray and DistributionMapping and fill with existing fine and coarse data . overrides the pure virtual function in AmrCore
void incflo::RemakeLevel (int lev, Real time, const BoxArray& ba,
             const DistributionMapping& dm)
{
    BL_PROFILE("incflo::RemakeLevel()");
    if (m_verbose > 0) {
        amrex::Print() << "Remaking level " << lev << std::endl;
    }
#ifdef AMREX_USE_EB
    std::unique_ptr<FabFactory<FArrayBox> > new_fact = makeEBFabFactory(geom[lev], ba, dm,
                                                                        {nghost_eb_basic(),
                                                                         nghost_eb_volume(),
                                                                         nghost_eb_full()},
                                                                        EBSupport::full);
#else
    std::unique_ptr<FabFactory<FArrayBox> > new_fact(new FArrayBoxFactory());
#endif
    std::unique_ptr<LevelData> new_leveldata
        (new LevelData(ba, dm, *new_fact, m_ntrac, nghost_state(),
                       m_advection_type,
                       m_diff_type==DiffusionType::Implicit,
                       use_tensor_correction,
                       m_advect_tracer));
    fillpatch_velocity(lev, time, new_leveldata->velocity, 0);
    fillpatch_density(lev, time, new_leveldata->density, 0);
    if (m_ntrac > 0) {
        fillpatch_tracer(lev, time, new_leveldata->tracer, 0);
    }
    fillpatch_gradp(lev, time, new_leveldata->gp, 0);
    new_leveldata->p_nd.setVal(0.0);
    new_leveldata->p_cc.setVal(0.0);
    m_leveldata[lev] = std::move(new_leveldata);
    m_factory[lev] = std::move(new_fact);
    m_diffusion_tensor_op.reset();
    m_diffusion_scalar_op.reset();
#ifdef AMREX_USE_EB
    macproj.reset(new Hydro::MacProjector(Geom(0,finest_level),
                      MLMG::Location::FaceCentroid,  
                      MLMG::Location::FaceCentroid,  
                      MLMG::Location::CellCenter  ) ); 
#else
    macproj.reset(new Hydro::MacProjector(Geom(0,finest_level)));
#endif
}
void incflo :: RemakeLevel ( int lev , Real time , const BoxArray & ba , const DistributionMapping & dm ) { BL_PROFILE ( " " ) ; if ( m_verbose > 0 ) { amrex :: Print ( ) << " " << lev << std :: endl ; } #ifdef AMREX_USE_EB std :: unique_ptr < FabFactory < FArrayBox > > new_fact = makeEBFabFactory ( geom [ lev ] , ba , dm , { nghost_eb_basic ( ) , nghost_eb_volume ( ) , nghost_eb_full ( ) } , EBSupport :: full ) ; #else std :: unique_ptr < FabFactory < FArrayBox > > new_fact ( new FArrayBoxFactory ( ) ) ; #endif std :: unique_ptr < LevelData > new_leveldata ( new LevelData ( ba , dm , * new_fact , m_ntrac , nghost_state ( ) , m_advection_type , m_diff_type == DiffusionType :: Implicit , use_tensor_correction , m_advect_tracer ) ) ; fillpatch_velocity ( lev , time , new_leveldata -> velocity , 0 ) ; fillpatch_density ( lev , time , new_leveldata -> density , 0 ) ; if ( m_ntrac > 0 ) { fillpatch_tracer ( lev , time , new_leveldata -> tracer , 0 ) ; } fillpatch_gradp ( lev , time , new_leveldata -> gp , 0 ) ; new_leveldata -> p_nd . setVal ( 0.0 ) ; new_leveldata -> p_cc . setVal ( 0.0 ) ; m_leveldata [ lev ] = std :: move ( new_leveldata ) ; m_factory [ lev ] = std :: move ( new_fact ) ; m_diffusion_tensor_op . reset ( ) ; m_diffusion_scalar_op . reset ( ) ; #ifdef AMREX_USE_EB macproj . reset ( new Hydro :: MacProjector ( Geom ( 0 , finest_level ) , MLMG :: Location :: FaceCentroid , MLMG :: Location :: FaceCentroid , MLMG :: Location :: CellCenter ) ) ; #else macproj . reset ( new Hydro :: MacProjector ( Geom ( 0 , finest_level ) ) ) ; #endif }
Remake an existing level using provided BoxArray and DistributionMapping and
fill with existing fine and coarse data.
Remake an existing level using provided BoxArray and DistributionMapping and fill with existing fine and coarse data .
// Location of mac_vec // Location of beta // Location of solution variable phi