How to solve non-linear poisson equation given values, not functions?

Hi,
I’m entirely new to this project so please forgive my noob question…
I’ve found nice tutorials on how to solve the non-linear poisson equation on a regular grid (Implementation — FEniCSx tutorial), but I wonder what’s the best way to solve such equation from given raw data rather than functions. So I have the data for f for each grid cell and coefficients q on the all grid cell’s edges (staggered grid).
The use case is the numerical solution of the pressure poisson equation for the projection step of some fluids simulation.

Ah, nevermind… I think I can just use scipy.interpolate.interp2d for that