-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Various changes to pyclaw. Updates to properly handle restarts using …
…hdf5
- Loading branch information
Showing
7 changed files
with
70 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,10 +52,15 @@ def setup(use_petsc=False,iplot=False,htmlplot=False,outdir='./_output',solver_t | |
|
||
if solver_type=='sharpclaw': | ||
solver = pyclaw.SharpClawSolver1D(rs) | ||
solver.time_integrator = 'RK' | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
weslowrie
via email
Author
Contributor
|
||
solver.time_integrator = 'Euler' | ||
solver.a, solver.b, solver.c = a, b, c | ||
solver.cfl_desired = 0.6 | ||
solver.cfl_max = 0.7 | ||
|
||
solver.weno_order = 2 | ||
solver.num_ghost = 2 | ||
solver.lim_type = 1 | ||
|
||
if use_char_decomp: | ||
try: | ||
import sharpclaw1 # Import custom Fortran code | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,7 @@ def configuration(parent_package='',top_path=None): | |
['limiter.f90','philim.f90','flux2.f90','step2ds.f90','step2.f90'],f2py_options=['--quiet']) | ||
|
||
config.add_extension('classic3', | ||
['limiter.f90','philim.f90','flux3.f90','step3ds.f90','step3.f90'],f2py_options=['--quiet'],extra_f90_compile_args=['-fopenmp'],libraries=['gomp']) | ||
['limiter.f90','philim.f90','flux3.f90','step3ds.f90','step3.f90'],f2py_options=['--quiet'],extra_f90_compile_args=['-fopenmp -Warray-bounds -fcheck=all'],libraries=['gomp']) | ||
This comment has been minimized.
Sorry, something went wrong.
mandli
Member
|
||
|
||
return config | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -141,7 +141,7 @@ def step(self,solution,take_one_step,tstart,tend): | |
# Godunov Splitting | ||
if self.source_split == 1: | ||
self.step_source(self,solution.states[0],self.dt) | ||
|
||
return True | ||
|
||
def _check_cfl_settings(self): | ||
|
@@ -684,7 +684,7 @@ def step_hyperbolic(self,solution): | |
if self.dimensional_split: | ||
#Right now only Godunov-dimensional-splitting is implemented. | ||
#Strang-dimensional-splitting could be added following dimsp3.f in Clawpack. | ||
|
||
#""" | ||
This comment has been minimized.
Sorry, something went wrong.
mandli
Member
|
||
q, cfl_x = self.fmod.step3ds(maxm,self.nthreads,self.num_ghost,\ | ||
mx,my,mz,qold,qnew,self.auxbc,dx,dy,dz,self.dt,self._method,\ | ||
self._mthlim,self.aux1,self.aux2,self.aux3,self.work,1,\ | ||
|
@@ -699,6 +699,27 @@ def step_hyperbolic(self,solution): | |
mx,my,mz,q,q,self.auxbc,dx,dy,dz,self.dt,self._method,\ | ||
self._mthlim,self.aux1,self.aux2,self.aux3,self.work,3,\ | ||
self.fwave,rpn3,rpt3,rptt3) | ||
#""" | ||
|
||
""" | ||
#print "No Dim Splitting..." | ||
# No Dimensional Splitting, Similar to SharpClaw | ||
dq = qnew.copy('F') | ||
dq[...] = 0. | ||
dq, cfl_x = self.fmod.step3ds(maxm,self.nthreads,self.num_ghost,\ | ||
mx,my,mz,qold,dq,self.auxbc,dx,dy,dz,self.dt,self._method,\ | ||
self._mthlim,self.aux1,self.aux2,self.aux3,self.work,1,\ | ||
self.fwave,rpn3,rpt3,rptt3) | ||
dq, cfl_y = self.fmod.step3ds(maxm,self.nthreads,self.num_ghost,\ | ||
mx,my,mz,qold,dq,self.auxbc,dx,dy,dz,self.dt,self._method,\ | ||
self._mthlim,self.aux1,self.aux2,self.aux3,self.work,2,\ | ||
self.fwave,rpn3,rpt3,rptt3) | ||
dq, cfl_z = self.fmod.step3ds(maxm,self.nthreads,self.num_ghost,\ | ||
mx,my,mz,qold,dq,self.auxbc,dx,dy,dz,self.dt,self._method,\ | ||
self._mthlim,self.aux1,self.aux2,self.aux3,self.work,3,\ | ||
self.fwave,rpn3,rpt3,rptt3) | ||
self.qbc += dq | ||
""" | ||
|
||
cfl = max(cfl_x,cfl_y,cfl_z) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
What is the reason for this change?