From 42fcac07264cc03051a6a3750ae231c5f083439e Mon Sep 17 00:00:00 2001 From: Michele Guerini Rocco Date: Fri, 1 Nov 2024 18:01:35 +0100 Subject: [PATCH] src/gray_tables.f90: fix floating point exception MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Skip ψ=0 when computing the flux surfaces contours. --- src/gray_tables.f90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gray_tables.f90 b/src/gray_tables.f90 index 34488b7..ffe60bc 100644 --- a/src/gray_tables.f90 +++ b/src/gray_tables.f90 @@ -220,7 +220,7 @@ contains if (params%equilibrium%iequil == EQ_VACUUM) return ! Δρ_p for the uniform ρ_p grid - drho_p = 1.0_wp_ / (n_surf - 1) + drho_p = 1.0_wp_ / n_surf ! Guess for first contour reconstruction R_hi = equil%axis(1) @@ -228,7 +228,7 @@ contains z_hi = equil%axis(2) + (equil%z_boundary(2) - equil%axis(2))/10 z_lo = equil%axis(2) - (equil%axis(2) - equil%z_boundary(1))/10 - do i = 0, n_surf - 1 + do i = 1, n_surf - 1 rho_p = i * drho_p psi_n = rho_p**2 call equil%flux_contour(psi_n, R, z, R_hi, z_hi, R_lo, z_lo)