Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating step size control #483

Merged
merged 47 commits into from
Mar 26, 2015
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
ab35bbc
Update variable step-size SSPLMM.
hadjimy Dec 9, 2014
ffed0f7
Make a function to accept/reject step and update code for new step-si…
hadjimy Dec 9, 2014
f59a1b9
Update pyclaw solver to match with changes in sharpclaw solver.
hadjimy Dec 9, 2014
ab16359
Edit how cfl number is updated, so cfl at each step relates with curr…
hadjimy Dec 9, 2014
493c141
Reset local cfl at the beggining of step in classic.
hadjimy Dec 11, 2014
6d5b5fd
Add functions for accept/reject step and new step-size choice for cla…
hadjimy Dec 11, 2014
732d99a
Major edits/corrections in accept/reject step and new step-size setup…
hadjimy Dec 11, 2014
046e929
Correct step-size update at the last RK step.
hadjimy Dec 11, 2014
9f6571d
Improve the way information from previous steps is updated.
hadjimy Dec 15, 2014
93ab5dd
Make LMM tests pass.
ketch Dec 15, 2014
e97bcfe
Update regression data for WC blast test.
ketch Dec 15, 2014
52711c0
Tests passing.
ketch Dec 15, 2014
24a1c94
Remove stored dt and dtFE from registers and create solver lists to s…
hadjimy Dec 16, 2014
419a068
Add a function to set cfl._global_max and correct initialization of g…
hadjimy Dec 17, 2014
5607c44
Remove 'set_global_max' method from cfl.py
hadjimy Jan 11, 2015
9a31120
Refactoring the time integration code.
ketch Jan 11, 2015
798531e
Debugging LMM startup.
ketch Jan 12, 2015
c4e1bda
Cleaning pyclaw solver and moving updating of stored info to accept_r…
hadjimy Jan 14, 2015
573f726
Cleaning pyclaw solver and moving updating of stored info to accept_r…
hadjimy Jan 14, 2015
315e4b9
Use status['numsteps'] instead of step_index.
ketch Jan 14, 2015
852f582
Make self._registers[-1].t = state.t.
hadjimy Jan 27, 2015
2a26711
Fix the way dq_stored stores the function evaluation
hadjimy Feb 3, 2015
5989bf1
Use function evaluation from previous steps in RK and LMM
hadjimy Feb 10, 2015
1d8a23d
Major changes in accept_reject_step and get_dt_new functions
hadjimy Feb 10, 2015
af71cfe
- Rename dt_list and dtFE_list to previous_dt_values and
hadjimy Feb 13, 2015
59669fa
Change self.deltaq to a list.
hadjimy Feb 15, 2015
e0217dd
Use previous function evaluations for SSPLMM43.
hadjimy Feb 17, 2015
336c305
Update nosetests based on recent changes in sharpclaw solvers
hadjimy Feb 17, 2015
ef63f5a
Change deltaq to dq_dt in sharpclaw solvers.
ketch Feb 17, 2015
2a72e9a
Correct step-size choice for starting methods of LMMs.
hadjimy Feb 23, 2015
96223d5
Update nosetests.
hadjimy Feb 23, 2015
690551e
Merge branch 'step-size_control' of git://github.com/hadjimy/pyclaw i…
ketch Feb 24, 2015
bf3b73e
Evaluate dq at beginning of step.
ketch Feb 24, 2015
683061e
Prevent LMM integrators from going past tend.
ketch Feb 24, 2015
2151691
Correct dtFE computation for SSPLMM
hadjimy Mar 8, 2015
13b0589
Minor edits in sharpclaw time-stepping:
hadjimy Mar 8, 2015
ed93f74
Move section that saves self.dq_dt list so that SSPLMM43 converges
hadjimy Mar 9, 2015
da96dc4
- Move additional conditions for 3rd order SSPLMM at the beginning of
hadjimy Mar 9, 2015
0f0e6ca
Refactor and simplify routines for time-stepping control.
hadjimy Mar 21, 2015
027ed22
Make nosetests run.
hadjimy Mar 21, 2015
2dd9d41
combine SSPLMM43 and SSPLMM53 code
ketch Mar 25, 2015
5937ea2
Combine code for all SSPLMM methods.
ketch Mar 25, 2015
d6dd638
clean up comments and reorder if statements in sharpclaw/solver.py
ketch Mar 25, 2015
eb7d715
move step rewinding up into update_saved_values
ketch Mar 25, 2015
3095391
Make SSPLMMs generic for arbitrary number of steps
hadjimy Mar 26, 2015
deb71d0
Update nosetests: include tests for 3rd-order SSPLMM.
hadjimy Mar 26, 2015
7dfd2ed
use solver.lmm_steps as definitive value
ketch Mar 26, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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