Skip to content

Commit

Permalink
moving attribute CHE_at_initialisation one level up
Browse files Browse the repository at this point in the history
  • Loading branch information
Silvia Toonen committed Aug 4, 2023
1 parent 647ee7c commit 2abe3c8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions TRES.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def main(inner_primary_mass = 1.3|units.MSun, inner_secondary_mass = 0.5|units.M
elif triple_class_object.mass_transfer_at_initialisation == True:
if REPORT_USER_WARNINGS:
print('Choose a different system. There is mass transfer in the given triple at initialization.')
elif stop_at_no_CHE == True and triple_class_object.triple.CHE_at_initialisation == False:
elif stop_at_no_CHE == True and triple_class_object.CHE_at_initialisation == False:
if REPORT_USER_WARNINGS:
print('Choose a different system. No chemically homogeneous evolution at initialization')
else:
Expand Down Expand Up @@ -201,7 +201,7 @@ def main_developer(stars, bins, correct_params, stellar_code, secular_code,
elif triple_class_object.mass_transfer_at_initialisation == True:
if REPORT_USER_WARNINGS:
print('Choose a different system. There is mass transfer in the given triple at initialization.')
elif stop_at_no_CHE == True and triple_class_object.triple.CHE_at_initialisation == False:
elif stop_at_no_CHE == True and triple_class_object.CHE_at_initialisation == False:
if REPORT_USER_WARNINGS:
print('Choose a different system. No chemically homogeneous evolution at initialization')
else:
Expand Down Expand Up @@ -403,7 +403,7 @@ def parse_arguments():
elif triple_class_object.mass_transfer_at_initialisation == True:
if REPORT_USER_WARNINGS:
print('Choose a different system. There is mass transfer in the given triple at initialization.')
elif opt["stop_at_no_CHE"] == True and triple_class_object.triple.CHE_at_initialisation == False:
elif opt["stop_at_no_CHE"] == True and triple_class_object.CHE_at_initialisation == False:
if REPORT_USER_WARNINGS:
print('Choose a different system. No chemically homogeneous evolution at initialization')
else:
Expand Down
4 changes: 2 additions & 2 deletions triple_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def __init__(self, stars, bins, correct_params,
self.dynamical_instability_at_initialisation = False
self.semisecular_regime_at_initialisation = False
self.mass_transfer_at_initialisation = False
self.triple.CHE_at_initialisation = False
self.CHE_at_initialisation = False

self.set_stopping_conditions(stop_at_mass_transfer, stop_at_init_mass_transfer,stop_at_outer_mass_transfer,
stop_at_stable_mass_transfer, stop_at_eccentric_stable_mass_transfer,
Expand All @@ -108,7 +108,7 @@ def __init__(self, stars, bins, correct_params,

self.check_OLOF()
if self.stop_at_no_CHE and (not self.check_CHE()):
self.triple.CHE_at_initialization = False
self.CHE_at_initialization = False
return

if (self.has_donor() or self.has_OLOF_donor()) and (self.stop_at_mass_transfer or self.stop_at_init_mass_transfer):
Expand Down

0 comments on commit 2abe3c8

Please sign in to comment.