Skip to content

Commit

Permalink
Merge 2428f20 into 40a7249
Browse files Browse the repository at this point in the history
  • Loading branch information
hadjimy committed Dec 16, 2014
2 parents 40a7249 + 2428f20 commit ac62640
Show file tree
Hide file tree
Showing 14 changed files with 1,097 additions and 1,011 deletions.
12 changes: 6 additions & 6 deletions examples/acoustics_1d_homogeneous/test_acoustics.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,23 @@ def acoustics_verify(claw):

from clawpack.pyclaw.util import gen_variants

classic_tests = gen_variants(acoustics_1d.setup, verify_expected(0.00104856594174),
classic_tests = gen_variants(acoustics_1d.setup, verify_expected(0.001049),
kernel_languages=('Python','Fortran'), solver_type='classic', disable_output=True)

ptwise_tests = gen_variants(acoustics_1d.setup, verify_expected(0.00104856594174),
ptwise_tests = gen_variants(acoustics_1d.setup, verify_expected(0.001049),
kernel_languages=('Fortran',), ptwise=True,
solver_type='classic', disable_output=True)


sharp_tests_rk = gen_variants(acoustics_1d.setup, verify_expected(0.000298879563857),
sharp_tests_rk = gen_variants(acoustics_1d.setup, verify_expected(0.000299),
kernel_languages=('Python','Fortran'), solver_type='sharpclaw',
time_integrator='SSP104', disable_output=True)

sharp_tests_lmm = gen_variants(acoustics_1d.setup, verify_expected(0.00227996627104),
sharp_tests_lmm = gen_variants(acoustics_1d.setup, verify_expected(0.00125),
kernel_languages=('Python','Fortran'), solver_type='sharpclaw',
time_integrator='SSPMS32', disable_output=True)
time_integrator='SSPLMM32', disable_output=True)

weno_tests = gen_variants(acoustics_1d.setup, verify_expected(0.000153070447918),
weno_tests = gen_variants(acoustics_1d.setup, verify_expected(0.000153),
kernel_languages=('Fortran',), solver_type='sharpclaw',
time_integrator='SSP104', weno_order=17, disable_output=True)

Expand Down
7 changes: 4 additions & 3 deletions examples/acoustics_2d_homogeneous/acoustics_2d.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,10 @@ def setup(kernel_language='Fortran', use_petsc=False, outdir='./_output',
if solver.time_integrator=='SSP104':
solver.cfl_max = 0.5
solver.cfl_desired = 0.45
elif solver.time_integrator=='SSPMS32':
solver.cfl_max = 0.2
solver.cfl_desired = 0.16
elif solver.time_integrator=='SSPLMM32':
solver.lim_type = 1
solver.cfl_max = 0.25
solver.cfl_desired = 0.24
else:
raise Exception('CFL desired and CFL max have not been provided for the particular time integrator.')

Expand Down
5 changes: 3 additions & 2 deletions examples/acoustics_2d_homogeneous/test_2d_acoustics.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ def verify(claw):
test_pressure = test_q[0,:,:]
thisdir = os.path.dirname(__file__)
expected_pressure = np.loadtxt(os.path.join(thisdir,data_filename))
return check_diff(expected_pressure, test_pressure, reltol=1e-3)
return check_diff(expected_pressure, test_pressure, reltol=1e-3,
delta=claw.solution.grid.delta)
else:
return
return verify
Expand All @@ -36,7 +37,7 @@ def verify(claw):

sharp_tests_lmm = gen_variants(acoustics_2d.setup, verify_data('verify_sharpclaw_lmm.txt'),
kernel_languages=('Fortran',), solver_type='sharpclaw',
time_integrator='SSPMS32', disable_output=True)
time_integrator='SSPLMM32', disable_output=True)

from itertools import chain
for test in chain(classic_tests, ptwise_tests, sharp_tests_rk, sharp_tests_lmm):
Expand Down
200 changes: 100 additions & 100 deletions examples/acoustics_2d_homogeneous/verify_sharpclaw_lmm.txt

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion examples/acoustics_2d_variable/acoustics_2d_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def setup(kernel_language='Fortran', use_petsc=False, outdir='./_output',
elif solver_type=='sharpclaw':
solver=pyclaw.SharpClawSolver2D(riemann.vc_acoustics_2D)
solver.time_integrator=time_integrator
if time_integrator=='SSPMS32':
if time_integrator=='SSPLMM32':
solver.cfl_max = 0.25
solver.cfl_desired = 0.24

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def verify_acoustics(controller, solver_type='classic'):
sharp_tests_lmm = gen_variants(acoustics_2d_interface.setup,
verify_func, lim_type=1,
solver_type='sharpclaw',
time_integrator='SSPMS32',
time_integrator='SSPLMM32',
disable_output=True,
num_cells=(50, 50))

Expand Down
4 changes: 2 additions & 2 deletions examples/advection_1d/test_advection.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ def advection_verify(claw):
kernel_languages=('Python','Fortran'),
solver_type='sharpclaw',time_integrator='SSP104', outdir=None)

sharp_tests_lmm = gen_variants(advection_1d.setup, verify_expected(3.39682948116e-05),
sharp_tests_lmm = gen_variants(advection_1d.setup, verify_expected(1.8937e-05),
kernel_languages=('Python','Fortran'),
solver_type='sharpclaw',time_integrator='SSPMS32', outdir=None)
solver_type='sharpclaw',time_integrator='SSPLMM32', outdir=None)

weno_tests = gen_variants(advection_1d.setup, verify_expected(7.489618e-06),
kernel_languages=('Fortran',), solver_type='sharpclaw',
Expand Down
Loading

0 comments on commit ac62640

Please sign in to comment.