Skip to content
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

Remove BC fill routines other than for State_Type #815

Merged
merged 3 commits into from
Mar 15, 2020

Conversation

maximumcats
Copy link
Member

PR summary

This PR removes all boundary fill interfaces other than hypfill and denfill (gravity, rotation, reactions, radiation). The existence of these routines creates substantial maintenance overhead relative to the value they add, since none of the problems actually use them to update the boundaries. As an example of the problem this complexity adds, not all of the routines were addressing inflow boundaries consistently (in particular, some override an inflow boundary to do first-order extrapolation so that there's meaningful data, and some don't, leading to garbage data for e.g. the reactions). The only one of these that a user would be likely to touch was the radiation fill, but we have no problem setups demonstrating this (they all use radiation.lo_bc and radiation.hi_bc instead), and it's also hard to see how a user could have effectively used the radiation fill for a multigroup problem, since you don't come in with information about which group you're in.

PR checklist

  • test suite needs to be run on this PR
  • this PR will change answers in the test suite
  • all functions have docstrings as per the coding conventions
  • the CHANGES file has been updated
  • if appropriate, this change is described in the docs

@zingale
Copy link
Member

zingale commented Mar 15, 2020

for the grav?fill routines, shouldn't it be the case that if we are reflecting, then the normal component of the gravitational acceleration should reflect too? I don't know if we are capturing that.

@maximumcats
Copy link
Member Author

Yes, you are right, and yes we are already capturing that. In development we have:

  set_x_vel_bc(bc,phys_bc);
  desc_lst.setComponent(Gravity_Type,0,"grav_x",bc,BndryFunc(ca_gravxfill));
  set_y_vel_bc(bc,phys_bc);
  desc_lst.setComponent(Gravity_Type,1,"grav_y",bc,BndryFunc(ca_gravyfill));
  set_z_vel_bc(bc,phys_bc);
  desc_lst.setComponent(Gravity_Type,2,"grav_z",bc,BndryFunc(ca_gravzfill));

where x_vel_bc et al. set reflect boundary conditions as appropriate. Then amrex_filccn handles the reflection for us. In the new method this still holds.

@zingale
Copy link
Member

zingale commented Mar 15, 2020

yes, I see. I agree this is a much cleaner way to handle these other fields.

@zingale zingale merged commit 022bdc1 into development Mar 15, 2020
@zingale zingale deleted the clean_bc_interfaces branch March 15, 2020 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants