[Bug]: Coordinate systems of variables do not get checked against known #3114
Labels
bug
Something isn't working
difficulty: easy
A good issue for someone new. Can be done in a few hours
priority: medium
To be resolved if time allows
PyBaMM Version
23.5
Python Version
3.9.16
Describe the bug
Currently the coordinate system of a variable is not checked against the known system. This means that if the wrong argument is passed (e.g. due to a typo) it will default to
"cartesian"
without throwing an error.Steps to Reproduce
The MWE would be very lengthy, but basically it can be checked that:
KNOWN_COORD_SYS
is checked is to test meshes for the battery model (i.e. it does not actually check for wrong coordinate systems).finite_volume.py
there is an else statement that means that anything not being cylindrical polar or spherical polar will default to cartesian, seePyBaMM/pybamm/spatial_methods/finite_volume.py
Lines 139 to 150 in fffe650
Relevant log output
No response
The text was updated successfully, but these errors were encountered: