-
Notifications
You must be signed in to change notification settings - Fork 75
Update the magnetic energy when enforcing consistency in the interface magnetic field #457
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
base: main
Are you sure you want to change the base?
Conversation
hfhsieh
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ChunYen-Chen @hyschive
Before looking into the details, I would like to ask something:
- Since it's only during initialization that we do not need to update the magnetic energy in
MHD_SameInterfaceB(), I think we can always perform the update, as it should not impact performance. - Should we update the wiki documentation to note this behavior under
MINMOD_MAX_ITER, or consider automatically enablingOPT__SAME_INTERFACE_BwhenMINMOD_MAX_ITER > 0in MHD simulations?
Agreed. I’ll let you know once I’ve updated the code.
I will update the wiki document. |
Agree. How about declaring You can also define a corresponding Also, remember to raise a warning message in |
ad5338b to
aa83e3b
Compare
|
@hfhsieh I’ve updated the PR. Please take a look when you have time—thank you in advance! |
hfhsieh
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. I have added some comments.
|
@hfhsieh Thanks for the review. I have addressed the comments. |
Currently, if
MINMOD_MAX_ITERis enabled to reduce the minmod coefficient in each patch, the output of the magnetic field may become inconsistent due to variations in the minmod coefficient across nearby patches.To address this issue, enabling
OPT__SAME_INTERFACE_Benforces consistency of the magnetic field at patch interfaces. However, in the current implementation, the magnetic energy at the interface is not updated.This PR ensures that magnetic energy is updated when
OPT__SAME_INTERFACE_Bis enabled.