committed by
GitHub
parent
6a4febb33a
commit
78ed2a67a2
13
tutorials/tutorial12/tutorial.ipynb
vendored
13
tutorials/tutorial12/tutorial.ipynb
vendored
@@ -4,7 +4,9 @@
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# Tutorial: The `Equation` Class"
|
||||
"# Tutorial: The `Equation` Class\n",
|
||||
"\n",
|
||||
"[](https://colab.research.google.com/github/mathLab/PINA/blob/master/tutorials/tutorial12/tutorial.ipynb)"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -49,6 +51,15 @@
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"## routine needed to run the notebook on Google Colab\n",
|
||||
"try:\n",
|
||||
" import google.colab\n",
|
||||
" IN_COLAB = True\n",
|
||||
"except:\n",
|
||||
" IN_COLAB = False\n",
|
||||
"if IN_COLAB:\n",
|
||||
" !pip install \"pina-mathlab\"\n",
|
||||
"\n",
|
||||
"#useful imports\n",
|
||||
"from pina.problem import SpatialProblem, TimeDependentProblem\n",
|
||||
"from pina.equation import Equation, FixedValue, FixedGradient, FixedFlux\n",
|
||||
|
||||
11
tutorials/tutorial12/tutorial.py
vendored
11
tutorials/tutorial12/tutorial.py
vendored
@@ -2,6 +2,8 @@
|
||||
# coding: utf-8
|
||||
|
||||
# # Tutorial: The `Equation` Class
|
||||
#
|
||||
# [](https://colab.research.google.com/github/mathLab/PINA/blob/master/tutorials/tutorial12/tutorial.ipynb)
|
||||
|
||||
# In this tutorial, we will show how to use the `Equation` Class in PINA. Specifically, we will see how use the Class and its inherited classes to enforce residuals minimization in PINNs.
|
||||
|
||||
@@ -27,6 +29,15 @@
|
||||
# In[7]:
|
||||
|
||||
|
||||
## routine needed to run the notebook on Google Colab
|
||||
try:
|
||||
import google.colab
|
||||
IN_COLAB = True
|
||||
except:
|
||||
IN_COLAB = False
|
||||
if IN_COLAB:
|
||||
get_ipython().system('pip install "pina-mathlab"')
|
||||
|
||||
#useful imports
|
||||
from pina.problem import SpatialProblem, TimeDependentProblem
|
||||
from pina.equation import Equation, FixedValue, FixedGradient, FixedFlux
|
||||
|
||||
Reference in New Issue
Block a user