From 2b62ee1ce2af11862bebd6d03e0a1a44bfb75dad Mon Sep 17 00:00:00 2001 From: David A Minton Date: Tue, 28 Mar 2023 12:21:31 -0400 Subject: [PATCH] Updated snapshot system to use coarray version of nbody_system --- src/swiftest/swiftest_module.f90 | 12 ++++++++---- src/swiftest/swiftest_util.f90 | 4 ++++ 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/swiftest/swiftest_module.f90 b/src/swiftest/swiftest_module.f90 index c4a105644..bb43c40b9 100644 --- a/src/swiftest/swiftest_module.f90 +++ b/src/swiftest/swiftest_module.f90 @@ -1659,11 +1659,15 @@ end subroutine swiftest_util_snapshot_save module subroutine swiftest_util_snapshot_system(self, param, nbody_system, t, arg) implicit none - class(swiftest_storage), intent(inout) :: self !! Swiftest storage object - class(swiftest_parameters), intent(inout) :: param !! Current run configuration parameters + class(swiftest_storage), intent(inout) :: self !! Swiftest storage object + class(swiftest_parameters), intent(inout) :: param !! Current run configuration parameters +#ifdef COARRAY + class(swiftest_nbody_system), intent(inout) :: nbody_system[*] !! Swiftest nbody system object to store +#else class(swiftest_nbody_system), intent(inout) :: nbody_system !! Swiftest nbody system object to store - real(DP), intent(in), optional :: t !! Time of snapshot if different from nbody_system time - character(*), intent(in), optional :: arg !! Optional argument (needed for extended storage type used in encounter snapshots) +#endif + real(DP), intent(in), optional :: t !! Time of snapshot if different from nbody_system time + character(*), intent(in), optional :: arg !! Optional argument (needed for extended storage type used in encounter snapshots) end subroutine swiftest_util_snapshot_system end interface diff --git a/src/swiftest/swiftest_util.f90 b/src/swiftest/swiftest_util.f90 index 0b8f3e0e2..24e98a4ae 100644 --- a/src/swiftest/swiftest_util.f90 +++ b/src/swiftest/swiftest_util.f90 @@ -3067,7 +3067,11 @@ module subroutine swiftest_util_snapshot_system(self, param, nbody_system, t, ar ! Arguments class(swiftest_storage), intent(inout) :: self !! Swiftest storage object class(swiftest_parameters), intent(inout) :: param !! Current run configuration parameters +#ifdef COARRAY + class(swiftest_nbody_system), intent(inout) :: nbody_system[*] !! Swiftest nbody system object to store +#else class(swiftest_nbody_system), intent(inout) :: nbody_system !! Swiftest nbody system object to store +#endif real(DP), intent(in), optional :: t !! Time of snapshot if different from nbody_system time character(*), intent(in), optional :: arg !! Optional argument (needed for extended storage type used in collision snapshots) ! Internals