Skip to content

Commit

Permalink
Merge pull request #91 from kumiori/andres-joss-review
Browse files Browse the repository at this point in the history
Andres joss review
  • Loading branch information
kumiori authored Oct 8, 2024
2 parents 52bff2b + 105af20 commit 7b50b02
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 24 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
35 changes: 12 additions & 23 deletions playground/rayleigh/JOSS_paper_figures_rayleigh_benchmark.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,21 @@
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 3,
"metadata": {},
"outputs": [
{
"ename": "ModuleNotFoundError",
"evalue": "No module named 'postprocess'",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mModuleNotFoundError\u001b[0m Traceback (most recent call last)",
"Cell \u001b[0;32mIn[1], line 4\u001b[0m\n\u001b[1;32m 2\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01mnumpy\u001b[39;00m \u001b[38;5;28;01mas\u001b[39;00m \u001b[38;5;21;01mnp\u001b[39;00m\n\u001b[1;32m 3\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01mmatplotlib\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mpyplot\u001b[39;00m \u001b[38;5;28;01mas\u001b[39;00m \u001b[38;5;21;01mplt\u001b[39;00m\n\u001b[0;32m----> 4\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01mpostprocess\u001b[39;00m \u001b[38;5;28;01mas\u001b[39;00m \u001b[38;5;21;01mpp\u001b[39;00m\n\u001b[1;32m 5\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01mos\u001b[39;00m\n\u001b[1;32m 6\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01mglob\u001b[39;00m\n",
"\u001b[0;31mModuleNotFoundError\u001b[0m: No module named 'postprocess'"
]
}
],
"outputs": [],
"source": [
"import sympy as sp\n",
"import numpy as np\n",
"import matplotlib.pyplot as plt\n",
"import irrevolutions.utils.postprocess as pp\n",
"import os\n",
"import glob\n",
"\n",
"from irrevolutions.utils import eigenspace as eig"
]
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 4,
"metadata": {},
"outputs": [
{
Expand All @@ -45,10 +31,10 @@
"\n",
"WARNING:py.warnings:<>:60: SyntaxWarning: invalid escape sequence '\\p'\n",
"\n",
"WARNING:py.warnings:/var/folders/ht/z8sb7wsd1bg0qpmyyfyq2rcm0000gr/T/ipykernel_82316/317953844.py:55: SyntaxWarning: invalid escape sequence '\\#'\n",
"WARNING:py.warnings:/var/folders/ht/z8sb7wsd1bg0qpmyyfyq2rcm0000gr/T/ipykernel_91666/317953844.py:55: SyntaxWarning: invalid escape sequence '\\#'\n",
" plt.annotate(f'\\#{count}', datapoint, textcoords=\"offset points\", xytext=(0, -15), ha='center')\n",
"\n",
"WARNING:py.warnings:/var/folders/ht/z8sb7wsd1bg0qpmyyfyq2rcm0000gr/T/ipykernel_82316/317953844.py:60: SyntaxWarning: invalid escape sequence '\\p'\n",
"WARNING:py.warnings:/var/folders/ht/z8sb7wsd1bg0qpmyyfyq2rcm0000gr/T/ipykernel_91666/317953844.py:60: SyntaxWarning: invalid escape sequence '\\p'\n",
" plt.xlabel('$\\pi^2 a$')\n",
"\n"
]
Expand Down Expand Up @@ -245,7 +231,7 @@
},
{
"cell_type": "code",
"execution_count": 14,
"execution_count": 5,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -1897,7 +1883,7 @@
"successful_points = []\n",
"unsuccessful_points = []\n",
"data_for_plotting = []\n",
"\n",
"non_trivial = []\n",
"\n",
"for subdir, _, _ in os.walk(dirroot):\n",
" parameters = load_parameters(subdir)\n",
Expand All @@ -1912,6 +1898,9 @@
" b = parameters.get('model', {}).get('b')\n",
" c = parameters.get('model', {}).get('c')\n",
"\n",
" if b * c**2 > np.pi**2 * a:\n",
" non_trivial.append(signature)\n",
" \n",
" success_file = os.path.join(subdir, 'mode_shapes_data.npz')\n",
" if os.path.exists(success_file):\n",
" successful_points.append((a, b*c**2))\n",
Expand Down Expand Up @@ -2031,7 +2020,7 @@
],
"metadata": {
"kernelspec": {
"display_name": ".venv",
"display_name": "fenicsx-env",
"language": "python",
"name": "python3"
},
Expand All @@ -2045,7 +2034,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.2"
"version": "3.12.5"
},
"orig_nbformat": 4
},
Expand Down
1 change: 1 addition & 0 deletions playground/rayleigh/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
TODO

0 comments on commit 7b50b02

Please sign in to comment.