AMReX-Codes / amrex

AMReX: Software Framework for Block Structured AMR
https://amrex-codes.github.io/amrex
Other
546 stars 347 forks source link

what is the meaning of regrid(0, time) in the AmrCoreAdv::timeStepNoSubcycling routine. #4099

Open ztdepztdep opened 2 months ago

ztdepztdep commented 2 months ago

I do not understand why it only regrid level 0 grid in this call no matter the maxlevel i have set.

`// Advance all the levels with the same dt
void
AmrCoreAdv::timeStepNoSubcycling (Real time, int iteration)
{
    if (max_level > 0 && regrid_int > 0)  // We may need to regrid
    {
        if (istep[0] % regrid_int == 0)
        {
            regrid(0, time);
        }
    }
}`
asalmgren commented 2 months ago

That call is not regrudfing level 0 - it is regridding all levels > 0. 0 is the base level

Ann Almgren Senior Scientist; Dept. Head, Applied Mathematics Pronouns: she/her/hers

On Tue, Aug 20, 2024 at 3:35 AM ztdepztdep @.***> wrote:

I do not understand why it only regrid level 0 grid in this call no matter the maxlevel i have set.

// Advance all the levels with the same dt void AmrCoreAdv::timeStepNoSubcycling (Real time, int iteration) { if (max_level > 0 && regrid_int > 0) // We may need to regrid { if (istep[0] % regrid_int == 0) { regrid(0, time); } } }

— Reply to this email directly, view it on GitHub https://github.com/AMReX-Codes/amrex/issues/4099, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACRE6YXDLQ4M4XSAWIJJXADZSMLX3AVCNFSM6AAAAABMZTNLESVHI2DSMVQWIX3LMV43ASLTON2WKOZSGQ3TKMZQGMYDOMQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>