Might be as simple as changing the finite difference nabla, but I doubt it. The array flattening of the input space might make this implementation very tricky. It is also unlikely that the performance gain of accessing and adding the potential directly to the underlying data is not possible with a spherical nabla.
3D and 2D would be nice.
A possible solution would be to accept a potential in spherical/cylindrical coordinates, and supply functionality to transform that to a cartesian grid before passing that to the solver.
Might be as simple as changing the finite difference nabla, but I doubt it. The array flattening of the input space might make this implementation very tricky. It is also unlikely that the performance gain of accessing and adding the potential directly to the underlying data is not possible with a spherical nabla.
3D and 2D would be nice.
A possible solution would be to accept a potential in spherical/cylindrical coordinates, and supply functionality to transform that to a cartesian grid before passing that to the solver.