-
Notifications
You must be signed in to change notification settings - Fork 129
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
Fixing divergence error with AMR (Issue #617) #625
base: master
Are you sure you want to change the base?
Conversation
Strore the AMR buffer sizes instead of calculating it at every step.
failure from the
|
another error:
|
@tomidakn can you check that my latest suggestion is what is intendend? I had to remind myself of the counter-intuitivie operator precedence rules in C re: bitwise operators and arithmetic operators. Interestingly, ChatGPT 4o-mini gets it wrong: |
It was my mistake and I have to thank the compiler.
I'm afraid I made the same mistake as Chat-GPT. |
Wow, I also didn't appreciate the pgen_compile test much and often blame that it is too picky. But, now I see why we have that! |
retest this on stellar |
see, I didnt just implement these strict tests just to be annoying! 😂 |
This is to fix the divergence error with AMR reported in #617.
When a MeshBlock contacting a finer MeshBlock is refined, the original code refined normal B-fields on the shared face by interpolating the coarser fields, but they do not exactly match the existing finer fields on the already refined neighbor MeshBlock. With this commit, the shared face fields are copied from the finer MeshBlock, hence enforcing the divergence B constraint.
Prerequisite checklist