diff --git a/src/encounter/encounter_check.f90 b/src/encounter/encounter_check.f90 index 674b7e6cf..9965b2f9d 100644 --- a/src/encounter/encounter_check.f90 +++ b/src/encounter/encounter_check.f90 @@ -1024,9 +1024,11 @@ module subroutine encounter_check_sweep_aabb_single_list(self, n, nenc, index1, call util_index_array(ind_arr, n) allocate(ibeg(SWEEPDIM * n)) allocate(iend(SWEEPDIM * n)) - do dim = 1, SWEEPDIM - ibeg((dim - 1) * n + 1:dim * n) = self%aabb(dim)%ibeg(:) - iend((dim - 1) * n + 1:dim * n) = self%aabb(dim)%iend(:) + do i = 1, n + do dim = 1, SWEEPDIM + ibeg((i - 1) * SWEEPDIM + dim) = self%aabb(dim)%ibeg(i) + iend((i - 1) * SWEEPDIM + dim) = self%aabb(dim)%iend(i) + end do end do ! Sweep the intervals for each of the massive bodies along one dimension diff --git a/src/fraggle/fraggle_io.f90 b/src/fraggle/fraggle_io.f90 index 410592782..6eb1b5ee2 100644 --- a/src/fraggle/fraggle_io.f90 +++ b/src/fraggle/fraggle_io.f90 @@ -61,26 +61,6 @@ module subroutine fraggle_io_log_generate(frag) end subroutine fraggle_io_log_generate - ! module subroutine io_log_one_message(FRAGGLE_LOG_OUT, message) - ! !! author: David A. Minton - ! !! - ! !! Writes a single message to the fraggle log file - ! implicit none - ! ! Arguments - ! character(len=*), intent(in) :: message - ! ! Internals - ! character(STRMAX) :: errmsg - - ! open(unit=LUN, file=FRAGGLE_LOG_OUT, status = 'OLD', position = 'APPEND', form = 'FORMATTED', err = 667, iomsg = errmsg) - ! write(LUN, *) trim(adjustl(message)) - ! close(LUN) - - ! return - ! 667 continue - ! write(*,*) "Error writing Fraggle message to log file: " // trim(adjustl(errmsg)) - ! end subroutine fraggle_io_log_one_message - - module subroutine fraggle_io_log_pl(pl, param) !! author: David A. Minton !! @@ -227,29 +207,4 @@ module subroutine fraggle_io_log_regime(colliders, frag) write(*,*) "Error writing Fraggle regime information to log file: " // trim(adjustl(errmsg)) end subroutine fraggle_io_log_regime - - ! module subroutine fraggle_io_log_start(param) - ! !! author: David A. Minton - ! !! - ! !! Checks to see if the Fraggle log file needs to be replaced if this is a new run, or appended if this is a restarted run - ! implicit none - ! ! Arguments - ! class(swiftest_parameters), intent(in) :: param - ! ! Internals - ! character(STRMAX) :: errmsg - ! logical :: fileExists - - ! inquire(file=FRAGGLE_LOG_OUT, exist=fileExists) - ! if (.not.param%lrestart .or. .not.fileExists) then - ! open(unit=LUN, file=FRAGGLE_LOG_OUT, status="REPLACE", err = 667, iomsg = errmsg) - ! write(LUN, *, err = 667, iomsg = errmsg) "Fraggle logfile" - ! end if - ! close(LUN) - - ! return - - ! 667 continue - ! write(*,*) "Error writing Fraggle log file: " // trim(adjustl(errmsg)) - ! end subroutine fraggle_io_log_start - end submodule s_fraggle_io \ No newline at end of file diff --git a/src/fraggle/fraggle_set.f90 b/src/fraggle/fraggle_set.f90 index 04ab32386..4012eda34 100644 --- a/src/fraggle/fraggle_set.f90 +++ b/src/fraggle/fraggle_set.f90 @@ -198,39 +198,6 @@ module subroutine fraggle_set_coordinate_system(self, colliders) end subroutine fraggle_set_coordinate_system - ! module subroutine symba_set_collresolve_colliders(self, cb, pl, idx) - ! !! author: David A. Minton - ! !! - ! !! Calculate the two-body equivalent values given a set of input collider indices - ! use swiftest_classes, only : swiftest_nbody_system - ! implicit none - ! ! Arguments - ! class(fraggle_colliders), intent(inout) :: self !! Fraggle collider object - ! class(symba_cb), intent(in) :: cb !! Swiftest central body object system object - ! class(symba_pl), intent(in) :: pl !! Swiftest central body object system object - ! integer(I4B), dimension(:), intent(in) :: idx !! Index array of bodies from the pl object to use to calculate a "two-body equivalent" collisional pair - ! ! Internals - ! real(DP), dimension(NDIM, 2) :: mxc, vc - ! real(DP), dimension(NDIM) :: vcom, xcom - - ! associate(colliders => self) - - ! ! Compute orbital angular momentum of pre-impact system - ! xcom(:) = (colliders%mass(1) * colliders%xb(:, 1) + colliders%mass(2) * colliders%xb(:, 2)) / sum(colliders%mass(:)) - ! vcom(:) = (colliders%mass(1) * colliders%vb(:, 1) + colliders%mass(2) * colliders%vb(:, 2)) / sum(colliders%mass(:)) - ! mxc(:, 1) = colliders%mass(1) * (colliders%xb(:, 1) - xcom(:)) - ! mxc(:, 2) = colliders%mass(2) * (colliders%xb(:, 2) - xcom(:)) - ! vc(:, 1) = colliders%vb(:, 1) - vcom(:) - ! vc(:, 2) = colliders%vb(:, 2) - vcom(:) - - ! colliders%L_orbit(:,:) = mxc(:,:) .cross. vc(:,:) - - ! end associate - - ! return - ! end subroutine symbe_set_collresolve_colliders - - module subroutine fraggle_set_natural_scale_factors(self, colliders) !! author: David A. Minton !!