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

Add test for dam_break problem that uses Python Roe solver. #534

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
9 changes: 7 additions & 2 deletions examples/shallow_1d/dam_break.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,16 @@
from clawpack import riemann
from clawpack.riemann.shallow_roe_with_efix_1D_constants import depth, momentum, num_eqn

def setup(use_petsc=False,kernel_language='Fortran',outdir='./_output',solver_type='classic'):
def setup(use_petsc=False,kernel_language='Fortran',outdir='./_output',
solver_type='classic',disable_output=False):

if use_petsc:
import clawpack.petclaw as pyclaw
else:
from clawpack import pyclaw

if kernel_language =='Python':
rs = riemann.shallow_1D_py.shallow_1D
rs = riemann.shallow_1D_py.shallow_roe_1D
elif kernel_language =='Fortran':
rs = riemann.shallow_roe_with_efix_1D

Expand All @@ -51,6 +52,8 @@ def setup(use_petsc=False,kernel_language='Fortran',outdir='./_output',solver_ty

# Gravitational constant
state.problem_data['grav'] = 1.0
if kernel_language =='Python':
state.problem_data['efix'] = True # Turn on entropy fix

xc = state.grid.x.centers

Expand Down Expand Up @@ -83,6 +86,8 @@ def setup(use_petsc=False,kernel_language='Fortran',outdir='./_output',solver_ty
claw.solver = solver
claw.outdir = outdir
claw.setplot = setplot
if disable_output:
claw.output_format = None

return claw

Expand Down
Loading