usnistgov / fipy

FiPy is a Finite Volume PDE solver written in Python
http://pages.nist.gov/fipy/en/latest
Other
489 stars 148 forks source link

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

Open guyer opened 5 months ago

guyer commented 5 months ago

nx, ny, and nz are cardinal numbers of grid cells. They should not be allowed to be floats or non-positive integers (zero probably needs to be allowed for parallel partitioning).

>>> mesh = fp.Grid1D(nx=0.01, dx=10)
>>> mesh
UniformGrid1D(dx=10, nx=0)