Skip to content

Commit

Permalink
Merge pull request #120 from thetisproject/correction_to_tracer_test
Browse files Browse the repository at this point in the history
Correcting non_lin to use_nonlinear_equations and tighten tolerances
  • Loading branch information
stephankramer authored Jan 22, 2018
2 parents a94c9d5 + cf357a1 commit 4b4eed0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/tracerEq/test_consistency.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,12 @@ def run_tracer_consistency(**model_options):
assert vol3d_rerr < 1e-10, '3D volume is not conserved'
if options.solve_salinity:
salt_int, salt_int_rerr = solver_obj.callbacks['export']['salt_3d mass']()
assert salt_int_rerr < 1e-6, 'salt is not conserved'
assert salt_int_rerr < 1e-9, 'salt is not conserved'
smin, smax, undershoot, overshoot = solver_obj.callbacks['export']['salt_3d overshoot']()
max_abs_overshoot = max(abs(undershoot), abs(overshoot))
overshoot_tol = 1e-10 if warped else 1e-12
if options.use_ale_moving_mesh:
overshoot_tol = 1e-4
overshoot_tol = 1e-6
msg = 'Salt overshoots are too large: {:}'.format(max_abs_overshoot)
assert max_abs_overshoot < overshoot_tol, msg
if options.solve_temperature:
Expand All @@ -140,7 +140,7 @@ def run_tracer_consistency(**model_options):
max_abs_overshoot = max(abs(undershoot), abs(overshoot))
overshoot_tol = 1e-11 if warped else 1e-12
if options.use_ale_moving_mesh:
overshoot_tol = 1e-4
overshoot_tol = 1e-6
msg = 'Temp overshoots are too large: {:}'.format(max_abs_overshoot)
assert max_abs_overshoot < overshoot_tol, msg

Expand Down Expand Up @@ -184,7 +184,7 @@ def test_ale_nonconst_tracer(element_family, meshtype, timestepper_type):
if __name__ == '__main__':
run_tracer_consistency(element_family='dg-dg',
meshtype='regular',
nonlin=True,
use_nonlinear_equations=True,
timestepper_type='LeapFrog',
use_ale_moving_mesh=True,
solve_salinity=True,
Expand Down

0 comments on commit 4b4eed0

Please sign in to comment.