From e3f64b7ecccc06703198ad959883677bc932b599 Mon Sep 17 00:00:00 2001 From: marcella <40494362+marci73@users.noreply.github.com> Date: Fri, 24 May 2024 12:05:40 +0200 Subject: [PATCH] allow for constant efield with Gaussian envelop (#3429) --- src/efield_utils.F | 3 ++- src/motion/gopt_f_methods.F | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/efield_utils.F b/src/efield_utils.F index aa16a082d0..19476c59ba 100644 --- a/src/efield_utils.F +++ b/src/efield_utils.F @@ -127,10 +127,11 @@ SUBROUTINE make_field(dft_control, field, sim_step, sim_time) c = 137.03599962875_dp field = 0._dp + nu = 0.0_dp nfield = SIZE(dft_control%efield_fields) DO i = 1, nfield efield => dft_control%efield_fields(i)%efield - IF (.NOT. efield%envelop_id == custom_env) nu = c/(efield%wavelength) !in case of a custom efield we do not need nu + IF (.NOT. efield%envelop_id == custom_env .AND. efield%wavelength > EPSILON(0.0_dp)) nu = c/(efield%wavelength) !in case of a custom efield we do not need nu strength = SQRT(efield%strength/(3.50944_dp*10.0_dp**16)) IF (DOT_PRODUCT(efield%polarisation, efield%polarisation) == 0) THEN pol(:) = 1.0_dp/3.0_dp diff --git a/src/motion/gopt_f_methods.F b/src/motion/gopt_f_methods.F index 0e4337e6db..866fa7e960 100644 --- a/src/motion/gopt_f_methods.F +++ b/src/motion/gopt_f_methods.F @@ -621,7 +621,7 @@ SUBROUTINE check_converg(ndf, dr, g, output_unit, conv, gopt_param, max_memory, ELSE WRITE (UNIT=output_unit, FMT="(T2,2A)") & - " Conv. for gradients = ", & + " Conv. for RMS gradients = ", & " NO" END IF IF (PRESENT(pres_diff) .AND. PRESENT(pres_tol)) THEN