Update Condition notation & domains import in tutorials
This commit is contained in:
16
tutorials/tutorial8/tutorial.ipynb
vendored
16
tutorials/tutorial8/tutorial.ipynb
vendored
@@ -64,7 +64,7 @@
|
||||
"import torch\n",
|
||||
"import pina\n",
|
||||
"\n",
|
||||
"from pina.geometry import CartesianDomain\n",
|
||||
"from pina.domain import CartesianDomain\n",
|
||||
"\n",
|
||||
"from pina.problem import ParametricProblem\n",
|
||||
"from pina.model.layers import PODBlock, RBFBlock\n",
|
||||
@@ -80,7 +80,7 @@
|
||||
"id": "5138afdf-bff6-46bf-b423-a22673190687",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"We exploit the [Smithers](www.github.com/mathLab/Smithers) library to collect the parametric snapshots. In particular, we use the `NavierStokesDataset` class that contains a set of parametric solutions of the Navier-Stokes equations in a 2D L-shape domain. The parameter is the inflow velocity.\n",
|
||||
"We exploit the [Smithers](https://github.com/mathLab/Smithers) library to collect the parametric snapshots. In particular, we use the `NavierStokesDataset` class that contains a set of parametric solutions of the Navier-Stokes equations in a 2D L-shape domain. The parameter is the inflow velocity.\n",
|
||||
"The dataset is composed by 500 snapshots of the velocity (along $x$, $y$, and the magnitude) and pressure fields, and the corresponding parameter values.\n",
|
||||
"\n",
|
||||
"To visually check the snapshots, let's plot also the data points and the reference solution: this is the expected output of our model."
|
||||
@@ -106,6 +106,8 @@
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"!pip install git+https://github.com/mathLab/Smithers.git\n",
|
||||
"import smithers\n",
|
||||
"from smithers.dataset import NavierStokesDataset\n",
|
||||
"dataset = NavierStokesDataset()\n",
|
||||
"\n",
|
||||
@@ -549,14 +551,6 @@
|
||||
" \n",
|
||||
"plt.show()"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "d3758c39",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": []
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
@@ -575,7 +569,7 @@
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.8.8"
|
||||
"version": "3.12.3"
|
||||
},
|
||||
"vscode": {
|
||||
"interpreter": {
|
||||
|
||||
10
tutorials/tutorial8/tutorial.py
vendored
10
tutorials/tutorial8/tutorial.py
vendored
@@ -46,7 +46,7 @@ from pina.solvers import SupervisedSolver
|
||||
print(f'We are using PINA version {pina.__version__}')
|
||||
|
||||
|
||||
# We exploit the [Smithers](www.github.com/mathLab/Smithers) library to collect the parametric snapshots. In particular, we use the `NavierStokesDataset` class that contains a set of parametric solutions of the Navier-Stokes equations in a 2D L-shape domain. The parameter is the inflow velocity.
|
||||
# We exploit the [Smithers](https://github.com/mathLab/Smithers) library to collect the parametric snapshots. In particular, we use the `NavierStokesDataset` class that contains a set of parametric solutions of the Navier-Stokes equations in a 2D L-shape domain. The parameter is the inflow velocity.
|
||||
# The dataset is composed by 500 snapshots of the velocity (along $x$, $y$, and the magnitude) and pressure fields, and the corresponding parameter values.
|
||||
#
|
||||
# To visually check the snapshots, let's plot also the data points and the reference solution: this is the expected output of our model.
|
||||
@@ -54,6 +54,8 @@ print(f'We are using PINA version {pina.__version__}')
|
||||
# In[2]:
|
||||
|
||||
|
||||
get_ipython().system('pip install git+https://github.com/mathLab/Smithers.git')
|
||||
import smithers
|
||||
from smithers.dataset import NavierStokesDataset
|
||||
dataset = NavierStokesDataset()
|
||||
|
||||
@@ -303,9 +305,3 @@ for i, (idx_, rbf_, nn_, rbf_err_, nn_err_) in enumerate(
|
||||
|
||||
plt.show()
|
||||
|
||||
|
||||
# In[ ]:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user