From 2e8cbb78ef3d7a87ec9fad2f96d49649c48bb59d Mon Sep 17 00:00:00 2001 From: Michele Guerini Rocco Date: Fri, 1 Nov 2024 18:03:50 +0100 Subject: [PATCH] src/gray_core.f90: fix use of uninitialised variable When the beam reflects before entering the boundary the Jones vector (ext, eyt) is still uninitialised, set it at the beginning to avoid raising an exception in debug mode. --- src/gray_core.f90 | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gray_core.f90 b/src/gray_core.f90 index 13a89ce..ebeb3ff 100644 --- a/src/gray_core.f90 +++ b/src/gray_core.f90 @@ -164,6 +164,7 @@ contains ! Set original polarisation psipv(0) = params%antenna%psi chipv(0) = params%antenna%chi + call ellipse_to_field(psipv(0), chipv(0), ext, eyt) ! Error value for the whole simulation error = 0