-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into dokken/dependabot
- Loading branch information
Showing
3 changed files
with
142 additions
and
59 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
134 changes: 76 additions & 58 deletions
134
playground/rayleigh/JOSS_paper_figures_rayleigh_benchmark.ipynb
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# Reproducing Figures from the JOSS Paper | ||
|
||
This README guides you through setting up the environment using a Docker image and running the code to reproduce the figures included in the paper. The instructions show how to run Jupyter Lab inside the container to visualise the results using the provided notebook. | ||
|
||
#### Prerequisites | ||
|
||
Ensure you have the following software installed on your system: | ||
|
||
1. **Docker**: Used to run the containerised environment with all dependencies pre-installed. | ||
1. **Python 3.x**: Inside the Docker container, we will install necessary Python packages. | ||
|
||
### Step 1: Launch Docker Container | ||
|
||
From the root directory of your cloned repository, run the following command to launch the Docker container and expose the port for Jupyter Lab: | ||
|
||
```bash | ||
docker run -p 8888:8888 --rm -ti -v "$(pwd)":/home/numerix -w /home/numerix <docker-image> | ||
``` | ||
|
||
where <docker-image> is one of | ||
- `kumiori3/numerix:stable-amd64` for an amd64 machine | ||
- `kumiori3/numerix:stable` for an arm machine | ||
- `ghcr.io/fenics/dolfinx/lab:v0.7.2` to use the official dolfinx-lab | ||
|
||
The command above will: | ||
|
||
1. Expose port 8888 for Jupyter Lab. | ||
1. Mount the current working directory ($(pwd)) to the /home/numerix directory inside the container. | ||
1. Set the working directory inside the container to /home/numerix. | ||
|
||
### Step 2: Install the Software | ||
|
||
Once inside the container, install the necessary Python dependencies and the package using the following command: | ||
|
||
```bash | ||
python3 -m pip install . | ||
``` | ||
|
||
This installs the `irrevolutions` package. | ||
|
||
### Step 3: Run Test Cases | ||
|
||
To run the necessary computations and reproduce the figures, navigate to the Rayleigh playground directory and run the provided scripts: | ||
```bash | ||
cd playground/rayleigh | ||
python3 rayleigh.py | ||
python3 rayleigh_parametric.py | ||
``` | ||
|
||
### Step 4: Run Jupyter Lab | ||
|
||
To reproduce the figures usie the provided notebook, running Jupyter Lab inside the container with the following command: | ||
|
||
```bash | ||
jupyter lab --ip 0.0.0.0 --no-browser --allow-root | ||
``` | ||
|
||
Fire up your browser and navigate to `http://localhost:8888` | ||
|
||
### Step 5: Reproduce Figures | ||
|
||
Open the `playground/rayleigh/JOSS_paper_figures_rayleigh_benchmark.ipynb` notebook in Jupyter Lab and execute the cells to reproduce the figures. The notebook will use the results generated by the scripts in Step 3 and provide an interactive environment to visualise the figures. | ||
|
||
If you encounter any issues or need further assistance, feel free to open an issue on the repository. | ||
|