AMReX-Codes / amrex

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

in the struct AmrCoreFill, how to get the current validbox. #3935

Closed ztdepztdep closed 2 months ago

ztdepztdep commented 4 months ago
struct AmrCoreFill
{   AMREX_GPU_DEVICE
    void operator()(const amrex::IntVect& iv, amrex::Array4<amrex::Real> const& data,
        const int dcomp, const int numcomp,
        amrex::GeometryData const& geom, const amrex::Real time,
        const amrex::BCRec* bcr, const int bcomp,
        const int orig_comp) const

                       const int geoxlo = geom.Domain().smallEnd(0);
            const int geoxhi = geom.Domain().bigEnd(0);
            const int geoylo = geom.Domain().smallEnd(1);
            const int geoyhi = geom.Domain().bigEnd(1);
}
  How to get the current validbox in this struct.           
WeiqunZhang commented 4 months ago

It's not clear what the current validbox means. The thing is that the functor is used to fill not only the domain ghost cells of the original multifabs passed to FillPatch but also the "valid" cells of some internal multifab objects (which have no ghost cells).

What do you need the information for?

ztdepztdep commented 4 months ago

sorry for the confusion. I want to test the current if the current "i,j,k" is at the problem domain boundary.,

WeiqunZhang commented 4 months ago

There is no need to test. The iv argument passed to AmrCoreFill is always outside the domain boundary.

asalmgren commented 2 months ago

@ztdepztdep - Closing this issue due to lack of activity. Please re-open it if there is still a problem.