From c99fc0b343ca5711c43d263e31f6090116195dee Mon Sep 17 00:00:00 2001 From: Michele Guerini Rocco Date: Fri, 2 Feb 2024 17:13:34 +0100 Subject: [PATCH] =?UTF-8?q?src/equilibrium.f90:=20set=20q=3D0=20for=20?= =?UTF-8?q?=CF=88>1=20in=20numeric=20case?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/equilibrium.f90 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/equilibrium.f90 b/src/equilibrium.f90 index 9d74a73..d3506c2 100644 --- a/src/equilibrium.f90 +++ b/src/equilibrium.f90 @@ -1195,7 +1195,13 @@ contains case (EQ_EQDSK_FULL, EQ_EQDSK_PARTIAL) ! Numerical data - fq = q_spline%eval(psin) + if (psin < 1) then + fq = q_spline%eval(psin) + else + ! q is undefined or infinite + fq = 0 + end if + end select end function fq