Skip to content

Commit

Permalink
Merge pull request clawpack#70 from rjleveque/v5.4.0-fvmbook
Browse files Browse the repository at this point in the history
V5.4.0 fvmbook
  • Loading branch information
rjleveque committed Jan 24, 2017
2 parents 2d2ae7a + 30ba8ae commit 084b99b
Show file tree
Hide file tree
Showing 7 changed files with 85 additions and 54 deletions.
32 changes: 16 additions & 16 deletions fvmbook/chap3/acousimple/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,37 +20,37 @@ SETPLOT_FILE = setplot.py # File containing function to set plots
PLOTDIR = _plots # Directory for plots

OVERWRITE ?= True # False ==> make a copy of OUTDIR first
RESTART ?= False # Should = clawdata.restart in setrun

# Environment variable FC should be set to fortran compiler, e.g. gfortran

# Compiler flags can be specified here or set as an environment variable
FFLAGS ?=

# ---------------------------------
# List of sources for this program:
# package sources for this program:
# ---------------------------------

LIB = $(CLAW)/classic/src/1d
include $(CLAW)/classic/src/1d/Makefile.classic_1d

# ---------------------------------------
# package sources specifically to exclude
# (i.e. if a custom replacement source
# under a different name is provided)
# ---------------------------------------

EXCLUDE_MODULES = \

EXCLUDE_SOURCES = \

# ----------------------------------------
# List of custom sources for this program:
# ----------------------------------------
MODULES = \

SOURCES = \
qinit.f \
setprob.f \
$(CLAW)/riemann/src/rp1_acoustics.f90 \
$(CLAW)/classic/src/2d/setaux.f90 \
$(CLAW)/classic/src/1d/bc1.f \
$(CLAW)/classic/src/1d/b4step1.f90 \
$(CLAW)/classic/src/1d/driver.f90 \
$(CLAW)/classic/src/1d/claw1ez.f \
$(CLAW)/classic/src/1d/claw1.f \
$(CLAW)/classic/src/1d/copyq1.f \
$(CLAW)/classic/src/1d/inlinelimiter.f90 \
$(CLAW)/classic/src/1d/opendatafile.f \
$(CLAW)/classic/src/1d/out1.f \
$(CLAW)/classic/src/1d/src1.f90 \
$(CLAW)/classic/src/1d/step1.f90
$(CLAW)/riemann/src/rp1_acoustics.f90

#-------------------------------------------------------------------
# Include Makefile containing standard definitions and make options:
Expand Down
2 changes: 1 addition & 1 deletion fvmbook/chap3/acousimple/setrun.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def setrun(claw_pkg='classic'):
if clawdata.output_style==1:
# Output ntimes frames at equally spaced times up to tfinal:
# Can specify num_output_times = 0 for no output
clawdata.num_output_times = 25
clawdata.num_output_times = 15
clawdata.tfinal = 3.000000
clawdata.output_t0 = True # output at initial (or restart) time?

Expand Down
32 changes: 17 additions & 15 deletions fvmbook/chap6/compareadv/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,35 +20,37 @@ SETPLOT_FILE = setplot.py # File containing function to set plots
PLOTDIR = _plots # Directory for plots

OVERWRITE ?= True # False ==> make a copy of OUTDIR first
RESTART ?= False # Should = clawdata.restart in setrun

# Environment variable FC should be set to fortran compiler, e.g. gfortran

# Compiler flags can be specified here or set as an environment variable
FFLAGS ?=

# ---------------------------------
# List of sources for this program:
# package sources for this program:
# ---------------------------------

include $(CLAW)/classic/src/1d/Makefile.classic_1d

# ---------------------------------------
# package sources specifically to exclude
# (i.e. if a custom replacement source
# under a different name is provided)
# ---------------------------------------

EXCLUDE_MODULES = \

EXCLUDE_SOURCES = \

# ----------------------------------------
# List of custom sources for this program:
# ----------------------------------------
MODULES = \

SOURCES = \
qinit.f \
setprob.f \
$(CLAW)/riemann/src/rp1_advection.f90 \
$(CLAW)/classic/src/1d/setaux.f90 \
$(CLAW)/classic/src/1d/bc1.f \
$(CLAW)/classic/src/1d/b4step1.f90 \
$(CLAW)/classic/src/1d/driver.f90 \
$(CLAW)/classic/src/1d/claw1ez.f \
$(CLAW)/classic/src/1d/claw1.f \
$(CLAW)/classic/src/1d/copyq1.f \
$(CLAW)/classic/src/1d/inlinelimiter.f90 \
$(CLAW)/classic/src/1d/opendatafile.f \
$(CLAW)/classic/src/1d/out1.f \
$(CLAW)/classic/src/1d/src1.f90 \
$(CLAW)/classic/src/1d/step1.f90
$(CLAW)/riemann/src/rp1_advection.f90

#-------------------------------------------------------------------
# Include Makefile containing standard definitions and make options:
Expand Down
19 changes: 16 additions & 3 deletions fvmbook/chap6/compareadv/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,19 @@ Example [book/chap6/compareadv] to accompany the book
<http://www.clawpack.org/book.html>`_
by R. J. LeVeque.

Converted to Clawpack 5.0 form in 2013.

Try changing clawdata.limiter to test each limiter.

**Note:**

- Periodic boundary conditions are used on a domain of length 1 with advection
velocity u=1.

- The output is set to integer times so the pulse should have propagated one
period each frame.

- Try changing `clawdata.limiter` in `setrun.py` to test each limiter.


**Revision history:**

- Converted to Clawpack 5.0 form in 2013.
- Updated for Clawpack 5.4.0 in January, 2017
31 changes: 16 additions & 15 deletions fvmbook/chap6/wavepacket/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,36 +20,37 @@ SETPLOT_FILE = setplot.py # File containing function to set plots
PLOTDIR = _plots # Directory for plots

OVERWRITE ?= True # False ==> make a copy of OUTDIR first
RESTART ?= False # Should = clawdata.restart in setrun

# Environment variable FC should be set to fortran compiler, e.g. gfortran

# Compiler flags can be specified here or set as an environment variable
FFLAGS ?=

# ---------------------------------
# List of sources for this program:
# package sources for this program:
# ---------------------------------

include $(CLAW)/classic/src/1d/Makefile.classic_1d

# ---------------------------------------
# package sources specifically to exclude
# (i.e. if a custom replacement source
# under a different name is provided)
# ---------------------------------------

EXCLUDE_MODULES = \

EXCLUDE_SOURCES = \

# ----------------------------------------
# List of custom sources for this program:
# ----------------------------------------
MODULES = \

SOURCES = \
qinit.f \
setprob.f \
$(CLAW)/riemann/src/rp1_advection.f90 \
$(CLAW)/classic/src/1d/setaux.f \
$(CLAW)/classic/src/1d/bc1.f \
$(CLAW)/classic/src/1d/b4step1.f \
$(CLAW)/classic/src/1d/driver.f90 \
$(CLAW)/classic/src/1d/claw1ez.f \
$(CLAW)/classic/src/1d/claw1.f \
$(CLAW)/classic/src/1d/copyq1.f \
$(CLAW)/classic/src/1d/inlinelimiter.f90 \
$(CLAW)/classic/src/1d/opendatafile.f \
$(CLAW)/classic/src/1d/out1.f \
$(CLAW)/classic/src/1d/src1.f \
$(CLAW)/classic/src/1d/step1.f90
$(CLAW)/riemann/src/rp1_advection.f90

#-------------------------------------------------------------------
# Include Makefile containing standard definitions and make options:
Expand Down
20 changes: 17 additions & 3 deletions fvmbook/chap6/wavepacket/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,23 @@ Example [book/chap6/wavepacket] to accompany the book
<http://www.clawpack.org/book.html>`_
by R. J. LeVeque.

Converted to Clawpack 5.0 form in 2013.


Advection with wavepacket initial data.

Try changing the order of accuracy in setrun.py.
**Note:**

- Periodic boundary conditions are used on a domain of length 1 with
advection velocity u=1.

- The output is set to integer times so the pulse should have propagated
one period each frame.

- Try changing `clawdata.limiter` in `setrun.py` to test each limiter.

- Set `clawdata.order = 1` for the upwind method.


**Revision history:**

- Converted to Clawpack 5.0 form in 2013.
- Updated for Clawpack 5.4.0 in January, 2017
3 changes: 2 additions & 1 deletion fvmbook/chap6/wavepacket/setrun.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def setrun(claw_pkg='classic'):
# ------------------

# Order of accuracy: 1 => Godunov, 2 => Lax-Wendroff plus limiters
clawdata.order = 1
clawdata.order = 2


# Number of waves in the Riemann solution:
Expand All @@ -183,6 +183,7 @@ def setrun(claw_pkg='classic'):
# 2 or 'superbee' ==> superbee
# 3 or 'vanleer' ==> van Leer
# 4 or 'mc' ==> MC limiter

clawdata.limiter = ['none']

clawdata.use_fwaves = False # True ==> use f-wave version of algorithms
Expand Down

0 comments on commit 084b99b

Please sign in to comment.