Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix NaN values in Roche option in CE_analysis #467

Merged
merged 1 commit into from
Sep 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions src/utils/analysis_common_envelope.f90
Original file line number Diff line number Diff line change
Expand Up @@ -1162,8 +1162,19 @@ subroutine roche_lobe_values(time,npart,particlemass,xyzh,vxyzu)
endif
enddo

MRL(iR1T) = MRL(iR1T) / real(nR1T)
MRL(iFBV) = MRL(iFBV) / real(nFB)
if (nR1T == 0) then
MRL(iR1T) = 0
else
MRL(iR1T) = MRL(iR1T) / real(nR1T)
endif

if (nFB == 0) then
MRL(iFBV) = 0
else
MRL(iFBV) = MRL(iFBV) / real(nFB)
endif



MRL(iMRL1) = MRL(iMRL1) + xyzmh_ptmass(4,1)
MRL(iMRL2) = MRL(iMRL2) + xyzmh_ptmass(4,2)
Expand Down