geoclaw icon indicating copy to clipboard operation
geoclaw copied to clipboard

default speed_tolerance - why list of length 6?

Open rjleveque opened this issue 4 years ago • 1 comments

I just noticed that the default flag2refine2.f90 checks not only eta vs. wave_tolerance but also speed against a list of speed_tolerance values based on the level. I had forgotten we do this, which is related to #454.

But my concern at the moment is the default is a list of 6 huge values set in data.py.

Since they are huge, no cell will ever get flagged. But why check this up to 6 times for every cell in flag2refine? Shouldn't the default be a list of length 1? Or better yet of length 0 so this check is never done? That might not read in properly in refinement_module.f90, however, so we shouldn't work to hard on this until we address #454 and incorporate this too.

In the meantime, make it a list of length 1?

rjleveque avatar Jul 18 '20 17:07 rjleveque

If I remember correctly this was a product of some logic that made the coding easier but may have been more expensive than intended. It looks like if speed_tolerance is set to zero length then it will skip that loop entirely. That may be a better solution?

mandli avatar Jul 19 '20 17:07 mandli