committed by
GitHub
parent
6a4febb33a
commit
78ed2a67a2
11
tutorials/tutorial6/tutorial.ipynb
vendored
11
tutorials/tutorial6/tutorial.ipynb
vendored
@@ -7,6 +7,8 @@
|
||||
"source": [
|
||||
"# Tutorial: Building custom geometries with PINA `Location` class\n",
|
||||
"\n",
|
||||
"[](https://colab.research.google.com/github/mathLab/PINA/blob/master/tutorials/tutorial6/tutorial.ipynb)\n",
|
||||
"\n",
|
||||
"In this tutorial we will show how to use geometries in PINA. Specifically, the tutorial will include how to create geometries and how to visualize them. The topics covered are:\n",
|
||||
"\n",
|
||||
"* Creating CartesianDomains and EllipsoidDomains\n",
|
||||
@@ -22,6 +24,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",
|
||||
"import matplotlib.pyplot as plt\n",
|
||||
"from pina.geometry import EllipsoidDomain, Difference, CartesianDomain, Union, SimplexDomain\n",
|
||||
"from pina.label_tensor import LabelTensor\n",
|
||||
|
||||
11
tutorials/tutorial6/tutorial.py
vendored
11
tutorials/tutorial6/tutorial.py
vendored
@@ -3,6 +3,8 @@
|
||||
|
||||
# # Tutorial: Building custom geometries with PINA `Location` class
|
||||
#
|
||||
# [](https://colab.research.google.com/github/mathLab/PINA/blob/master/tutorials/tutorial6/tutorial.ipynb)
|
||||
#
|
||||
# In this tutorial we will show how to use geometries in PINA. Specifically, the tutorial will include how to create geometries and how to visualize them. The topics covered are:
|
||||
#
|
||||
# * Creating CartesianDomains and EllipsoidDomains
|
||||
@@ -14,6 +16,15 @@
|
||||
# In[1]:
|
||||
|
||||
|
||||
## 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"')
|
||||
|
||||
import matplotlib.pyplot as plt
|
||||
from pina.geometry import EllipsoidDomain, Difference, CartesianDomain, Union, SimplexDomain
|
||||
from pina.label_tensor import LabelTensor
|
||||
|
||||
Reference in New Issue
Block a user