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

Silence UserWarning: Size of toroidal domain... #183

Open
johnomotani opened this issue Jan 25, 2021 · 1 comment
Open

Silence UserWarning: Size of toroidal domain... #183

johnomotani opened this issue Jan 25, 2021 · 1 comment

Comments

@johnomotani
Copy link
Collaborator

From @ZedThree on Slack:
Is there a way to silence this warning: "UserWarning: Size of toroidal domain as calculated from nzdz (76.8 is not the same as 2pi(ZMAX - ZMIN) (6.283185307179586): using value from dz"?

@johnomotani
Copy link
Collaborator Author

There isn't. Looking at it again, maybe we should remove the warning and trust BOUT++ that if ZMAX was set by the user then dz=2pi(ZMAX-ZMIN)/nz. If I remember right, I added the test when I put in dz instead of always using ZMAX (to support more general cases) as a sanity check. The only time when it might possibly be useful is if someone set all of ZMIN, ZMAX and dz but only set dz by mistake (copying a BOUT.inp from someone else maybe). I'd lean towards removing the warning - it's probably much more common to run when setting dz on purpose (when this warning is just annoying) than to make the particular mistake that it highlights and never notice. It's probably something BOUT++ should check rather than xBOUT, although if all options were written to output and we could check whether an option was set by defaults or by the user then we could make a better version of the check.

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

No branches or pull requests

1 participant