Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
b1cb61a
update paper2_examples/acoustics_1d_ex1 for v5.6.1, with better plots…
rjleveque Nov 24, 2019
8483726
update acoustics_1d_ex2 to v5.6.1
rjleveque Dec 21, 2019
f132860
update paper2_examples/acoustics_2d_ex3 for v5.6.1
rjleveque Dec 22, 2019
9123266
update paper2_examples/acoustics_2d_ex4 to v5.6.1
rjleveque Dec 22, 2019
a4fb398
make it easier to change flagging method in 2d examples
rjleveque Dec 22, 2019
9fe5d76
update paper2_examples/README
rjleveque Dec 22, 2019
8b3c17f
move acoustics_1d_ex1 to acoustics_1d_ex1_old
rjleveque Dec 22, 2019
8781667
move acoustics_1d_ex2 acoustics_1d_example1
rjleveque Dec 22, 2019
9a7d2ad
rename acoustics_2d_ex* directories
rjleveque Dec 22, 2019
849ef67
fixed incorrect renaming of directories in acoustics_2d_example3
rjleveque Dec 23, 2019
f4a286d
600 x 800
rjleveque Dec 26, 2019
c4c6164
updates to example3
rjleveque Dec 27, 2019
c0f1dd6
update example2 with errf1 based on LTE
rjleveque Dec 27, 2019
fef44bc
scripts for plots
rjleveque Dec 27, 2019
06eaa83
change rectangle plotted and color scale for adjoint
rjleveque Dec 27, 2019
c7681f5
increase fontsize
rjleveque Dec 27, 2019
64d1bfb
improve some plots
rjleveque Dec 28, 2019
e918ba1
revert back to original errf1 for forward-error flagging
rjleveque Dec 30, 2019
ebf0add
updates to acoustics_2d_example2 for resubmission
rjleveque Dec 31, 2019
650cf00
update some README files
rjleveque Dec 31, 2019
b3a8db4
rename since no longer using acoustics_2d_ex4_old
rjleveque Dec 31, 2019
c443c73
clean up
rjleveque Dec 31, 2019
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
42 changes: 26 additions & 16 deletions paper2_examples/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
The code in this repository supplements a paper that is currently in production.

# Computational Experiments to accompany the paper

## Computational Experiments for the paper Analysis and Performance Evaluation of Adjoint-Guided Adaptive Mesh Refinement Using Clawpack
### "Analysis and Performance Evaluation of Adjoint-Guided Adaptive Mesh Refinement Using Clawpack"

The code in this repository supplements the paper (currently in production): "Analysis and Performance Evaluation of Adjoint-Guided Adaptive Mesh Refinement Using Clawpack."
by Brisa N. Davis and Randall J. LeVeque

This version goes with version 2 of the paper, currently submitted for publication.

Check out the `paper2v1` branch for the version of the code that accompanies the original preprint https://arxiv.org/abs/1810.00927.

This version is updated in the following ways:
- It uses Clawpack v5.6.1, which has the adjoint flagging now built in.
- Example 1 from the original paper has been dropped from v2 of the paper, so the subdirectories have been renamed.

The code is designed to work with the Clawpack 5 software. For more information visit
[the Clawpack webpage](http://www.clawpack.org/ ).
The Clawpack software is open source, and the code is openly available at
Expand All @@ -18,10 +26,10 @@ the use of the adjoint method for guiding adaptive mesh refinement in Clawpack i

* gfortran 5.0.0
* python 2.7.10
* clawpack 5.3.0 : [Clawpack](http://www.clawpack.org/ )
* clawpack 5.6.1 : [Clawpack](http://www.clawpack.org/ )
* git: to clone this repository

Note: Clawpack 5.0 or higher is required, other versions of gfortran and python might work as well.
Note: Later versions of Clawpack should work, other versions of gfortran and python might work as well.

**Operating system.**

Expand All @@ -30,24 +38,24 @@ Note: Clawpack 5.0 or higher is required, other versions of gfortran and python

### Examples Included and Folder Organization

* **acoustics_1d_ex1:** contains the code to run the first one-dimensional variable coefficients
linear acoustics equations example.
* **acoustics_1d_ex1_old:** contains the code to run the first one-dimensional variable coefficients
linear acoustics example from v1 of the paper, not used in v2 of the paper.
The internal folder: **adjoint**, contains the code for the adjoint problem.

* **acoustics_1d_ex2:** contains the code to run the second one-dimensional variable coefficients
linear acoustics equations example.
* **acoustics_1d_example1:** contains the code to run the one-dimensional variable coefficients
linear acoustics example that is Example 1 in v2 of the paper.
The internal folder: **adjoint**, contains the code for the adjoint problem.

* **acoustics_2d_ex1:** contains the code to run the first two-dimensional variable coefficients
linear acoustics equations example.
* **acoustics_2d_example2:** contains the code to run the first two-dimensional variable coefficients
linear acoustics problem that is Example 2 in v2 of the paper.
The internal folder: **adjoint**, contains the code for the adjoint problem.

* **acoustics_2d_ex2:** contains the code to run the second two-dimensional variable coefficients
linear acoustics equations example.
* **acoustics_2d_example3:** contains the code to run the second two-dimensional variable coefficients
linear acoustics problem that is Example 3 in v2 of the paper.
The internal folder: **adjoint**, contains the code for the adjoint problem.

### Running the Code
* **Install Clawpack 5.3.0:**
* **Install Clawpack 5.6.1:**
- Go to: http://www.clawpack.org/installing.html#installation-instructions
- Follow the download and installation intructions in the section: Install all Clawpack packages
- Follow the setup instructions in the section: Set environment variables.
Expand All @@ -60,9 +68,11 @@ The internal folder: **adjoint**, contains the code for the adjoint problem.
- Create a copy of the adjoint repository by running the code:

```
git://github.com/BrisaDavis/adjoint.git
git clone https://github.com/clawpack/adjoint.git
cd adjoint
git checkout paper2v2
```

* **Run the code**

* Go any of the folders and follow the instructions in the README.md in that folder.
* Go any of the folders in `paper2_examples` and follow the instructions in the README.md in that folder.
105 changes: 0 additions & 105 deletions paper2_examples/acoustics_1d_ex1/setplot.py

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ FFLAGS ?=
# package sources for this program:
# ---------------------------------

AMRLIB = $(CLAW)/amrclaw/src/1d_adjoint
include $(AMRLIB)/Makefile.adjoint_amr_1d
AMRLIB = $(CLAW)/amrclaw/src/1d
include $(AMRLIB)/Makefile.amr_1d

# ---------------------------------------
# package sources specifically to exclude
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
This code produces Example 1, the first one-dimensional variable coefficient acoustics example, presented in ''Analysis and Performance Evaluation of Adjoint-Guided Adaptive Mesh Refinement Using Clawpack''.
This code was for the original Example 1, the first one-dimensional variable
coefficient acoustics example, presented in the preprint version of
''Analysis and Performance Evaluation of Adjoint-Guided Adaptive Mesh Refinement Using Clawpack''.

### Folder Organization
* **adjoint:**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,15 @@ subroutine setaux(mbc,mx,xlower,dx,maux,aux)
common /comaux/ Zl, cl, Zr, cr
double precision Zl, cl, Zr, cr

integer i,ii
integer i
double precision xcell

do i=1-mbc,mx+mbc

if (aux(1,i) .eq. NEEDS_TO_BE_SET) then
aux(innerprod_index,i) = 0.d0
endif

xcell = xlower + (i-0.5d0)*dx
if (xcell .lt. 0.0d0) then
aux(1,i) = Zl
Expand All @@ -36,10 +41,5 @@ subroutine setaux(mbc,mx,xlower,dx,maux,aux)
endif
enddo

! Initialize innerproduct to zero.
do ii=1-mbc,mx+mbc
aux(innerprod_index,ii) = 0.d0
enddo

return
end
Loading