# preventing infinite or not effective loops
if (k >= sim_properties.maxFrontItrs and norm > 0.026) or k > 100:
if norm > 10 * sim_properties.tolFractFront or k > 200:
exitstatus = 6
return exitstatus, None
In particular, I'm inclined to blame the magic number0.026, as I can see that, at that point:
k == 25 == sim_properties.maxFrontItrs and
norm == 0.00919...
This results in the code reaching maxFrontItrs, but not exiting as it should.
Script breaks for lack of space to store the norm history for this iteration (since it reserved space for 25 front iterations only)
Context
This example takes 2 hours on debug-mode on gelpc1 to reach the error.
Description
https://github.com/geoEnergyLab-EPFL/pyFrac/blob/pedro/dev/src/time_step/ts_solution.py#L371-L375
0.026
, as I can see that, at that point:k == 25 == sim_properties.maxFrontItrs
andnorm == 0.00919...
maxFrontItrs
, but not exiting as it should.Context
gelpc1
to reach the error.