ucl-bug / jwave

A JAX-based research framework for differentiable and parallelizable acoustic simulations, on CPU, GPUs and TPUs
GNU Lesser General Public License v3.0
135 stars 21 forks source link

Raise error when `helmholtz_solver` is called with a real field #203

Open astanziola opened 1 year ago

astanziola commented 1 year ago

Describe the bug It does not make sense to call the Helmholtz operator with a real source field, as it is defined on complex fields.

One option would be to convert the field to complex, but this could be confusing, so it is probably better to just raise an error when one attempts to do so.