-
Notifications
You must be signed in to change notification settings - Fork 345
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clarification w.r.t FillBoundary vs. FillPatch #4112
Comments
When you call filpatch (in Fortran or C++), you are allowed to have the destination multifab the same variable as one of the source multifabs. In that case, only ghost cells are filled and no extra copying of valid cells is performed. |
In case, I was not clear in my last comment, it's perfectly fine to define phi_old and phi_new with ghost cells and call
|
Ah, that makes sense - thank you! |
|
That would be fantastic if you could add that, as I believe that I do need it. Thank you so much! |
Hello,
I'm working on an amrcore-based code, taking heavy inspiration from the fortran ADVECTION_F example. In that example, the main scalar (phi) being solved is defined without ghost cells, but at each time step, a phiborder array is defined with ghost cells, and filled from phi data using FillPatch. I think that it makes sense to me: it's efficient and flexible.
I'm interested in another strategy, where phi itself is defined with some ghost cells. At the end of a time step, I can update the interior of phi, but would then need to update the ghost cells. It seems to me that FillBoundary may do that (i.e., focus on updating only the ghost cells while leaving the interior alone), but I'm not too sure how it works. I would expect it to fill ghost cells at a level based on both that level and a coarser level, and involving boundary conditions as well. Yet, the FillBoundary routine doesn't seem to be as rich as the FillPatch routine.
Basically, my question is: is there such a thing as a FillPatch routine which works only on the ghost cells? Or is there something fundamentally problematic with what I'm proposing to do?
Thanks a lot for any guidance on this!
Olivier
The text was updated successfully, but these errors were encountered: