Skip to content
This repository was archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
debugging temp changes
Browse files Browse the repository at this point in the history
  • Loading branch information
anand43 committed Dec 5, 2023
1 parent c94bd9a commit 124e737
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 27 deletions.
43 changes: 16 additions & 27 deletions src/swiftest/swiftest_drift.f90
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,9 @@ pure subroutine swiftest_drift_dan(mu, rx0, ry0, rz0, vx0, vy0, vz0, dt0, iflag)

! For debugging overflow error

if(r0 .ge. 11970204779.00) then
f = 1.0_DP
end if
! if(r0 .ge. 11970204779.00) then
! f = 1.0_DP
! end if

call swiftest_drift_kepu(dt, r0, mu, alpha, u, fp, c1, c2, c3, iflag)
if (iflag == 0) then
Expand Down Expand Up @@ -467,11 +467,6 @@ pure subroutine swiftest_drift_kepu_new(s, dt, r0, mu, alpha, u, fp, c1, c2, c3,
do nc = 0, 6
x = s*s*alpha

! for debugging overflow error
if (abs(x) .ge. HUGE(0.0_DP) .or. x < 0) then
f = 1.0_DP ! "big x"
end if

call swiftest_drift_kepu_stumpff(x, c0, c1, c2, c3)
c1 = c1*s
c2 = c2*s*s
Expand Down Expand Up @@ -564,12 +559,6 @@ pure subroutine swiftest_drift_kepu_stumpff(x, c0, c1, c2, c3)
! Internals
integer(I4B) :: i, n
real(DP) :: xm

! for debugging overflow error
if (abs(x) .ge. HUGE(0.0_DP) .or. x < 0) then
x = x ! "big x"
n = 0
end if

n = 0
xm = 0.1_DP
Expand All @@ -595,23 +584,23 @@ pure subroutine swiftest_drift_kepu_stumpff(x, c0, c1, c2, c3)
end do
end if

! for debugging Floating overflow error
! ! for debugging Floating overflow error

if (abs(c0) .ge. HUGE(0.0_DP)) then
xm = 0.1_DP ! "big c0"
end if
! if (abs(c0) .ge. HUGE(0.0_DP)) then
! xm = 0.1_DP ! "big c0"
! end if

if (abs(c1) .ge. HUGE(0.0_DP)) then
xm = 0.1_DP ! "big c1"
end if
! if (abs(c1) .ge. HUGE(0.0_DP)) then
! xm = 0.1_DP ! "big c1"
! end if

if (abs(c2) .ge. HUGE(0.0_DP)) then
xm = 0.1_DP ! "big c2"
end if
! if (abs(c2) .ge. HUGE(0.0_DP)) then
! xm = 0.1_DP ! "big c2"
! end if

if (abs(c3) .ge. HUGE(0.0_DP)) then
xm = 0.1_DP ! "big c3"
end if
! if (abs(c3) .ge. HUGE(0.0_DP)) then
! xm = 0.1_DP ! "big c3"
! end if


return
Expand Down
1 change: 1 addition & 0 deletions swiftest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ FIND_PROGRAM(CYTHON
NO_CMAKE_FIND_ROOT_PATH
)
MESSAGE(STATUS "Cython executable path: ${CYTHON}")
# MESSAGE(STATUS "LD_LIBRARY_PATH: $ENV{LD_LIBRARY_PATH}")
SET(CYTHON_ARGS "${CMAKE_CURRENT_SOURCE_DIR}/${SWIFTEST_BINDINGS}.pyx" "--output-file" "${CMAKE_CURRENT_BINARY_DIR}/${SWIFTEST_BINDINGS}.c")
STRING(TOUPPER "${CMAKE_BUILD_TYPE}" BT)
IF (BT STREQUAL "DEBUG")
Expand Down

0 comments on commit 124e737

Please sign in to comment.