Skip to content

Commit

Permalink
Merge branch 'main' into dokken/dependabot
Browse files Browse the repository at this point in the history
  • Loading branch information
kumiori authored Oct 8, 2024
2 parents 9b9244d + 2588f76 commit 663de5c
Show file tree
Hide file tree
Showing 3 changed files with 142 additions and 59 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/workflow_dolfinx_container.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
jobs:
set-up-computing-environment:
runs-on: ubuntu-latest
container: ghcr.io/fenics/dolfinx/dolfinx:v0.7.2
container: ghcr.io/fenics/dolfinx/lab:v0.7.2

steps:
- name: Checkout repository
Expand Down
134 changes: 76 additions & 58 deletions playground/rayleigh/JOSS_paper_figures_rayleigh_benchmark.ipynb

Large diffs are not rendered by default.

65 changes: 65 additions & 0 deletions playground/rayleigh/README.md
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.

0 comments on commit 663de5c

Please sign in to comment.