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

issue1002-Setting nx, ny, nz to non-positive integer should generate an error #1083

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

sridhar-mani
Copy link

Tried to correct the issue No.1002.Included validation checks for the inputs.

Setting nx, ny, nz to non-positive integer should generate an error #1002

@guyer
Copy link
Member

guyer commented Nov 20, 2024

Thank you very much for the contribution. As you can see, this PR currently generates a lot of test failures. Most seem to be because of where you do the check. For non-uniform grids, the default value for nx, ny, and nz is None, which fails your checks.

  • I think the correct place to make this check is in _NonuniformNumPts.calcNs() and _UniformNumPts.calcNs().
  • I don't see any need for a try ... except ... block. The check should just fail.
    • If you really don't want the failure, then it should raise a Warning, but definitely not print out an error message.
  • Please remove the addition of .vscode/settings.json. It doesn't seem to have anything to do with this PR. If you'd like to separately propose VSCode settings, please make a separate PR and explain your rationale (I don't use VSCode, so I don't know what makes sense as a project setting vs. a personal setting).

@guyer guyer changed the title Issue No. #1002 issue1002-Setting nx, ny, nz to non-positive integer should generate an error Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants