AMReX-Fluids / IAMR

A parallel, adaptive mesh refinement (AMR) code that solves the variable-density incompressible Navier-Stokes equations.
https://amrex-fluids.github.io/IAMR/
80 stars 57 forks source link

Fix OOB access on coarsedata in NavierStokesBase::SyncInterp() #105

Closed wyphan closed 2 years ago

wyphan commented 2 years ago

When the CellConstProt_T interpolater enum is in use for NavierStokesBase::SyncInterp(which_interp), the code segfaults with an out-of-bounds error due to accesses on coarsedata using the same grid as finedata. This PR tries to fix that. Tested on CPU (local) using the "bubble" inputfile in Exec/run2d.

WeiqunZhang commented 2 years ago

Need to launch a separate kernel to work on the coarse box, otherwise the results are wrong even on CPU.