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

Refactor/fix boundary condition code #62

Open
mirenradia opened this issue May 24, 2024 · 2 comments
Open

Refactor/fix boundary condition code #62

mirenradia opened this issue May 24, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@mirenradia
Copy link
Member

The boundary condition code is in a bit of a mess. I haven't tested anything beyond Sommerfeld and reflective conditions but I think these may be the only working non-periodic ones.

In the Sommerfeld case, we now apply the condition within the valid domain unlike for GRChombo (where we apply it in the ghost cells exterior to the valid domain). AMReX can handle extrapolating conditions but this is then applied in the exterior ghost cells (we actually do this currently in the Sommerfeld case to avoid NaNs not that it should affect anything). Is this OK or, for consistency, if using mixed BCs, do we need to apply the extrapolation in the same cells as for Sommerfeld? What do you think @KAClough?

The existing code should also be refactored/renamed to make it clear these are separate and in addition to AMReX's boundary condition code.

@mirenradia mirenradia added the enhancement New feature or request label May 24, 2024
@KAClough
Copy link
Member

Yes this is a good point. For the mixed BCs it would need to be consistent. I think it would be nice to have the option to use the AMReX BCs but also I do like being able to have the framework to create our own bespoke ones. So I would say for ours we should consistently apply them within the domain.

@mirenradia
Copy link
Member Author

The problem is that AMReX BCs can't be applied to the RHS which we need to do for static and Sommerfeld BCs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants