[math] Replace spatial_dim in `native_call()`
[math] Replace spatial_dim in `native_call()`

Currently the function `f` in `native_call()` must return a tensor with 
the same dimension layout as the `inputs`. This `f` is often a neural 
network. However, in operations such as lifting the dimension from 2D 
observables to 3D geometries, the spatial dimensions will differ. This 
commit enables the support of different output spatial dimensions.
tum-pbs/PhiFlow,tum-pbs/PhiFlow