From 679126518b0ad884e7eefb5bb365eba28e09ec33 Mon Sep 17 00:00:00 2001 From: David Minton Date: Thu, 15 Feb 2024 15:28:35 -0500 Subject: [PATCH] fixed type conversion error that a particular version of gfortran didn't like --- src/swiftest/swiftest_drift.f90 | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/swiftest/swiftest_drift.f90 b/src/swiftest/swiftest_drift.f90 index 41713a2c8..333294b64 100644 --- a/src/swiftest/swiftest_drift.f90 +++ b/src/swiftest/swiftest_drift.f90 @@ -587,13 +587,18 @@ module subroutine swiftest_drift_cb_rotphase_update(self, param, dt) !! !! initial 0 is set at the x-axis !! phase is stored and calculated in radians. Converted to degrees for output - + implicit none ! Arguments class(swiftest_cb), intent(inout) :: self !! Swiftest central body data structure class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters real(DP), intent(in) :: dt !! Stepsize - self%rotphase = MOD(self%rotphase + (.mag. self%rot(:)) * dt * param%TU2S, 2 * PI) ! phase angle calculated in radians and then scaled by 2pi to be unitless + ! Internals + real(DP) :: rotmag + + rotmag = (.mag. self%rot(:)) * dt * param%TU2S + + self%rotphase = MOD(self%rotphase + rotmag, 2 * PI) ! phase angle calculated in radians and then scaled by 2pi to be unitless end subroutine swiftest_drift_cb_rotphase_update