Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

282 Binder not working with Poetry issue #340

Merged
merged 14 commits into from
Mar 9, 2024
5 changes: 4 additions & 1 deletion examples/Binder/1_Timoshenko_Beam.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@
}
},
"outputs": [],
"source": []
"source": [
"!pip install \"pyelastica[examples,docs]\""
]
},
{
"cell_type": "code",
Expand Down Expand Up @@ -194,6 +196,7 @@
},
"outputs": [],
"source": [
"\n",
"dl = base_length / n_elem\n",
"dt = 0.01 * dl\n",
"timoshenko_sim.dampen(shearable_rod).using(\n",
Expand Down
19 changes: 11 additions & 8 deletions examples/Binder/2_Slithering_Snake.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,15 @@
"To set up the simulation, the first thing you need to do is import the necessary classes. As with the Timoshenko bean, we need to import modules which allow us to more easily construct different simulation systems. We also need to import a rod class, all the necessary forces to be applied, timestepping functions, and callback classes. "
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"!pip install \"pyelastica[examples,docs]\""
]
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -32,13 +41,7 @@
"import numpy as np\n",
"\n",
"# import modules\n",
"from elastica.modules import (\n",
" BaseSystemCollection,\n",
" Constraints,\n",
" Forcing,\n",
" CallBacks,\n",
" Damping,\n",
")\n",
"from elastica.modules import BaseSystemCollection, Constraints, Forcing, CallBacks, Damping\n",
"\n",
"# import rod class, damping and forces to be applied\n",
"from elastica.rod.cosserat_rod import CosseratRod\n",
Expand Down Expand Up @@ -111,7 +114,7 @@
")\n",
"\n",
"# Add rod to the snake system\n",
"snake_sim.append(shearable_rod)"
"snake_sim.append(shearable_rod)\n"
]
},
{
Expand Down
Loading