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

updated converged status to self.converged throughout workflow #2963

Merged
Merged
Show file tree
Hide file tree
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
8 changes: 4 additions & 4 deletions tardis/workflows/simple_tardis_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@

def run(self):
"""Run the TARDIS simulation until convergence is reached"""
converged = False
self.converged = False

Check warning on line 448 in tardis/workflows/simple_tardis_workflow.py

View check run for this annotation

Codecov / codecov/patch

tardis/workflows/simple_tardis_workflow.py#L448

Added line #L448 was not covered by tests
while self.completed_iterations < self.total_iterations - 1:
logger.info(
f"\n\tStarting iteration {(self.completed_iterations + 1):d} of {self.total_iterations:d}"
Expand All @@ -466,13 +466,13 @@

self.solve_plasma(estimated_radfield_properties)

converged = self.check_convergence(estimated_values)
self.converged = self.check_convergence(estimated_values)

Check warning on line 469 in tardis/workflows/simple_tardis_workflow.py

View check run for this annotation

Codecov / codecov/patch

tardis/workflows/simple_tardis_workflow.py#L469

Added line #L469 was not covered by tests
self.completed_iterations += 1

if converged and self.convergence_strategy.stop_if_converged:
if self.converged and self.convergence_strategy.stop_if_converged:

Check warning on line 472 in tardis/workflows/simple_tardis_workflow.py

View check run for this annotation

Codecov / codecov/patch

tardis/workflows/simple_tardis_workflow.py#L472

Added line #L472 was not covered by tests
break

if converged:
if self.converged:

Check warning on line 475 in tardis/workflows/simple_tardis_workflow.py

View check run for this annotation

Codecov / codecov/patch

tardis/workflows/simple_tardis_workflow.py#L475

Added line #L475 was not covered by tests
logger.info("\n\tStarting final iteration")
else:
logger.error(
Expand Down
8 changes: 4 additions & 4 deletions tardis/workflows/standard_tardis_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@

def run(self):
"""Run the TARDIS simulation until convergence is reached"""
converged = False
self.converged = False

Check warning on line 209 in tardis/workflows/standard_tardis_workflow.py

View check run for this annotation

Codecov / codecov/patch

tardis/workflows/standard_tardis_workflow.py#L209

Added line #L209 was not covered by tests
while self.completed_iterations < self.total_iterations - 1:
logger.info(
f"\n\tStarting iteration {(self.completed_iterations + 1):d} of {self.total_iterations:d}"
Expand Down Expand Up @@ -237,13 +237,13 @@

self.solve_plasma(estimated_radfield_properties)

converged = self.check_convergence(estimated_values)
self.converged = self.check_convergence(estimated_values)

Check warning on line 240 in tardis/workflows/standard_tardis_workflow.py

View check run for this annotation

Codecov / codecov/patch

tardis/workflows/standard_tardis_workflow.py#L240

Added line #L240 was not covered by tests
self.completed_iterations += 1

if converged and self.convergence_strategy.stop_if_converged:
if self.converged and self.convergence_strategy.stop_if_converged:

Check warning on line 243 in tardis/workflows/standard_tardis_workflow.py

View check run for this annotation

Codecov / codecov/patch

tardis/workflows/standard_tardis_workflow.py#L243

Added line #L243 was not covered by tests
break

if converged:
if self.converged:

Check warning on line 246 in tardis/workflows/standard_tardis_workflow.py

View check run for this annotation

Codecov / codecov/patch

tardis/workflows/standard_tardis_workflow.py#L246

Added line #L246 was not covered by tests
logger.info("\n\tStarting final iteration")
else:
logger.error(
Expand Down
8 changes: 4 additions & 4 deletions tardis/workflows/v_inner_solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@

def run(self):
"""Run the TARDIS simulation until convergence is reached"""
converged = False
self.converged = False

Check warning on line 312 in tardis/workflows/v_inner_solver.py

View check run for this annotation

Codecov / codecov/patch

tardis/workflows/v_inner_solver.py#L312

Added line #L312 was not covered by tests
while self.completed_iterations < self.total_iterations - 1:
logger.info(
f"\n\tStarting iteration {(self.completed_iterations + 1):d} of {self.total_iterations:d}"
Expand All @@ -334,14 +334,14 @@
estimated_values["mask"],
)

converged = self.check_convergence(estimated_values)
self.converged = self.check_convergence(estimated_values)

Check warning on line 337 in tardis/workflows/v_inner_solver.py

View check run for this annotation

Codecov / codecov/patch

tardis/workflows/v_inner_solver.py#L337

Added line #L337 was not covered by tests

self.completed_iterations += 1

if converged and self.convergence_strategy.stop_if_converged:
if self.converged and self.convergence_strategy.stop_if_converged:

Check warning on line 341 in tardis/workflows/v_inner_solver.py

View check run for this annotation

Codecov / codecov/patch

tardis/workflows/v_inner_solver.py#L341

Added line #L341 was not covered by tests
break

if converged:
if self.converged:

Check warning on line 344 in tardis/workflows/v_inner_solver.py

View check run for this annotation

Codecov / codecov/patch

tardis/workflows/v_inner_solver.py#L344

Added line #L344 was not covered by tests
logger.info("\n\tStarting final iteration")
else:
logger.error(
Expand Down
Loading