From 918fefcccabe6a5daa535ea59e303bc5c00e4586 Mon Sep 17 00:00:00 2001 From: Antonio Stanziola Date: Mon, 27 Nov 2023 12:40:23 +0000 Subject: [PATCH] removed unused second outputs from operators --- jwave/acoustics/time_harmonic.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/jwave/acoustics/time_harmonic.py b/jwave/acoustics/time_harmonic.py index 47845c2..ca567e0 100644 --- a/jwave/acoustics/time_harmonic.py +++ b/jwave/acoustics/time_harmonic.py @@ -342,7 +342,7 @@ def body_fun(carry): out_field = _cbs_unnorm_units(out_field, _conversion) - return out_field, None + return out_field @operator @@ -377,7 +377,7 @@ def born_iteration(field: Field, G = homogeneous_helmholtz_green(V1 + src, k0=k0, epsilon=epsilon) V2 = scattering_potential(field - G, k_sq, k0=k0, epsilon=epsilon) - return field - (1j / epsilon) * V2, params + return field - (1j / epsilon) * V2 @operator @@ -401,7 +401,7 @@ def scattering_potential(field: Field, k = k_sq - k0**2 - 1j * epsilon out = field * k - return out, params + return out @operator @@ -430,7 +430,7 @@ def homogeneous_helmholtz_green(field: FourierSeries, u_fft = jnp.fft.fftn(u) Gu_fft = g_fourier * u_fft Gu = jnp.fft.ifftn(Gu_fft) - return field.replace_params(Gu), params + return field.replace_params(Gu) @operator @@ -500,7 +500,7 @@ def direc_exp_term(x, y, z): # Weights of the Rayleigh integral weights = jax.vmap(jax.vmap(direc_exp_term, in_axes=(0, 0, 0)), in_axes=(0, 0, 0))(R[..., 0], R[..., 1], R[..., 2]) - return jnp.sum(weights * pressure.on_grid) * area, None + return jnp.sum(weights * pressure.on_grid) * area @operator @@ -560,7 +560,7 @@ def helm_func(u): )[0] elif method == "bicgstab": out = bicgstab(helm_func, source, guess, tol=tol, maxiter=maxiter)[0] - return -1j * omega * out, None + return -1j * omega * out def helmholtz_solver_verbose(