Skip to content

Commit

Permalink
configurable final time
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilipDeegan committed Jun 13, 2024
1 parent abfa96b commit 821c71e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/functional/harris/harris_2d_lb.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,18 @@

mpl.use("Agg")

FINAL_TIME = os.getenv("PHARE_FINAL_TIME", None)
LOAD_BALANCE = os.getenv("LOAD_BALANCE", "True").lower() in ("true", "1", "t")

cpp = cpp_lib()
startMPI()

cells = (800, 800)
time_step = 0.005
final_time = 50
timestamps = np.arange(0, final_time + time_step, final_time / 5)
final_time = float(FINAL_TIME) if FINAL_TIME else 50
timestamps = [0, final_time] # default
if final_time == 50:
timestamps = np.arange(0, final_time + time_step, final_time / 5)

if cpp.mpi_rank() == 0:
print(LOAD_BALANCE, "diag timestamps:", timestamps)
Expand Down

0 comments on commit 821c71e

Please sign in to comment.