zwicker-group / py-pde

Python package for solving partial differential equations using finite differences.
https://py-pde.readthedocs.io
MIT License
393 stars 50 forks source link

Separate geometry from grid definition #522

Closed david-zwicker closed 5 months ago

david-zwicker commented 5 months ago

It would be great to separate the definition of the coordinates (and the accompanying coordinate transforms and other details) from the definition of the grid. In particular, the coordinate classes would not need to deal with symmetries, which would be implemented in the grid instead. Different grids using the same coordinate system (like a spherical or polar grid) could use the same coordinate classes then, reducing definitions. It would also clear up how points are specified (with all coordinate values in the coordinate class, but only the with the non-symmetric coordinates in the grid classes). For convenience, the coordinates should probably be available from the grid classes using a convenient, short attribute, like grid.c.

david-zwicker commented 5 months ago

Closed by #527