Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 25 additions & 25 deletions tutorials/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,49 +2,49 @@

In this folder we collect useful tutorials in order to understand the principles and the potential of **PINA**. Whether you're just getting started or looking to deepen your understanding, these resources are here to guide you.

The table below provides an overview of each tutorial. All tutorials are also available in HTML in the official [PINA documentation](http://mathlab.github.io/PINA/).
The table below provides an overview of each tutorial. All tutorials are also available in HTML in the official [PINA documentation](http://PINA-org.github.io/PINA/).


## Getting started with PINA

| Description | Tutorial |
|---------------|-----------|
Introductory Tutorial: A Beginner’s Guide to PINA|[[.ipynb](tutorial17/tutorial.ipynb),[.py](tutorial17/tutorial.py),[.html](http://mathlab.github.io/PINA/tutorial17/tutorial.html)]|
How to build a `Problem` in PINA|[[.ipynb](tutorial16/tutorial.ipynb),[.py](tutorial16/tutorial.py),[.html](http://mathlab.github.io/PINA/tutorial16/tutorial.html)]|
Introduction to Solver classes|[[.ipynb](tutorial18/tutorial.ipynb),[.py](tutorial18/tutorial.py),[.html](http://mathlab.github.io/PINA/tutorial18/tutorial.html)]|
Introduction to `Trainer` class|[[.ipynb](tutorial11/tutorial.ipynb),[.py](tutorial11/tutorial.py),[.html](http://mathlab.github.io/PINA/tutorial11/tutorial.html)]|
Data structure for SciML: `Tensor`, `LabelTensor`, `Data` and `Graph` |[[.ipynb](tutorial19/tutorial.ipynb),[.py](tutorial19/tutorial.py),[.html](http://mathlab.github.io/PINA/tutorial19/tutorial.html)]|
Building domains with PINA's BaseDomain class|[[.ipynb](tutorial6/tutorial.ipynb),[.py](tutorial6/tutorial.py),[.html](http://mathlab.github.io/PINA/tutorial6/tutorial.html)]|
Introduction to PINA `Equation` class|[[.ipynb](tutorial12/tutorial.ipynb),[.py](tutorial12/tutorial.py),[.html](http://mathlab.github.io/PINA/tutorial12/tutorial.html)]|
Introductory Tutorial: A Beginner’s Guide to PINA|[[.ipynb](tutorial17/tutorial.ipynb),[.py](tutorial17/tutorial.py),[.html](http://PINA-org.github.io/PINA/tutorial17/tutorial.html)]|
How to build a `Problem` in PINA|[[.ipynb](tutorial16/tutorial.ipynb),[.py](tutorial16/tutorial.py),[.html](http://PINA-org.github.io/PINA/tutorial16/tutorial.html)]|
Introduction to Solver classes|[[.ipynb](tutorial18/tutorial.ipynb),[.py](tutorial18/tutorial.py),[.html](http://PINA-org.github.io/PINA/tutorial18/tutorial.html)]|
Introduction to `Trainer` class|[[.ipynb](tutorial11/tutorial.ipynb),[.py](tutorial11/tutorial.py),[.html](http://PINA-org.github.io/PINA/tutorial11/tutorial.html)]|
Data structure for SciML: `Tensor`, `LabelTensor`, `Data` and `Graph` |[[.ipynb](tutorial19/tutorial.ipynb),[.py](tutorial19/tutorial.py),[.html](http://PINA-org.github.io/PINA/tutorial19/tutorial.html)]|
Building domains with PINA's BaseDomain class|[[.ipynb](tutorial6/tutorial.ipynb),[.py](tutorial6/tutorial.py),[.html](http://PINA-org.github.io/PINA/tutorial6/tutorial.html)]|
Introduction to PINA `Equation` class|[[.ipynb](tutorial12/tutorial.ipynb),[.py](tutorial12/tutorial.py),[.html](http://PINA-org.github.io/PINA/tutorial12/tutorial.html)]|


## Physics Informed Neural Networks
| Description | Tutorial |
|---------------|-----------|
Introductory Tutorial: Physics Informed Neural Networks with PINA |[[.ipynb](tutorial1/tutorial.ipynb),[.py](tutorial1/tutorial.py),[.html](http://mathlab.github.io/PINA/tutorial1/tutorial.html)]|
Enhancing PINNs with Extra Features to solve the Poisson Problem |[[.ipynb](tutorial2/tutorial.ipynb),[.py](tutorial2/tutorial.py),[.html](http://mathlab.github.io/PINA/tutorial2/tutorial.html)]|
Applying Hard Constraints in PINNs to solve the Wave Problem |[[.ipynb](tutorial3/tutorial.ipynb),[.py](tutorial3/tutorial.py),[.html](http://mathlab.github.io/PINA/tutorial3/tutorial.html)]|
Applying Periodic Boundary Conditions in PINNs to solve the Helmholtz Problem |[[.ipynb](tutorial9/tutorial.ipynb),[.py](tutorial9/tutorial.py),[.html](http://mathlab.github.io/PINA/tutorial9/tutorial.html)]|
Inverse Problem Solving with Physics-Informed Neural Network |[[.ipynb](tutorial7/tutorial.ipynb),[.py](tutorial7/tutorial.py),[.html](http://mathlab.github.io/PINA/tutorial7/tutorial.html)]|
Learning Multiscale PDEs Using Fourier Feature Networks|[[.ipynb](tutorial13/tutorial.ipynb),[.py](tutorial13/tutorial.py),[.html](http://mathlab.github.io/PINA/tutorial13/tutorial.html)]|
Learning Bifurcating PDE Solutions with Physics-Informed Deep Ensembles|[[.ipynb](tutorial14/tutorial.ipynb),[.py](tutorial14/tutorial.py),[.html](http://mathlab.github.io/PINA/tutorial14/tutorial.html)]|
Introductory Tutorial: Physics Informed Neural Networks with PINA |[[.ipynb](tutorial1/tutorial.ipynb),[.py](tutorial1/tutorial.py),[.html](http://PINA-org.github.io/PINA/tutorial1/tutorial.html)]|
Enhancing PINNs with Extra Features to solve the Poisson Problem |[[.ipynb](tutorial2/tutorial.ipynb),[.py](tutorial2/tutorial.py),[.html](http://PINA-org.github.io/PINA/tutorial2/tutorial.html)]|
Applying Hard Constraints in PINNs to solve the Wave Problem |[[.ipynb](tutorial3/tutorial.ipynb),[.py](tutorial3/tutorial.py),[.html](http://PINA-org.github.io/PINA/tutorial3/tutorial.html)]|
Applying Periodic Boundary Conditions in PINNs to solve the Helmholtz Problem |[[.ipynb](tutorial9/tutorial.ipynb),[.py](tutorial9/tutorial.py),[.html](http://PINA-org.github.io/PINA/tutorial9/tutorial.html)]|
Inverse Problem Solving with Physics-Informed Neural Network |[[.ipynb](tutorial7/tutorial.ipynb),[.py](tutorial7/tutorial.py),[.html](http://PINA-org.github.io/PINA/tutorial7/tutorial.html)]|
Learning Multiscale PDEs Using Fourier Feature Networks|[[.ipynb](tutorial13/tutorial.ipynb),[.py](tutorial13/tutorial.py),[.html](http://PINA-org.github.io/PINA/tutorial13/tutorial.html)]|
Learning Bifurcating PDE Solutions with Physics-Informed Deep Ensembles|[[.ipynb](tutorial14/tutorial.ipynb),[.py](tutorial14/tutorial.py),[.html](http://PINA-org.github.io/PINA/tutorial14/tutorial.html)]|


## Neural Operator Learning
| Description | Tutorial |
|---------------|-----------|
Introductory Tutorial: Neural Operator Learning with PINA |[[.ipynb](tutorial21/tutorial.ipynb),[.py](tutorial21/tutorial.py),[.html](http://mathlab.github.io/PINA/tutorial21/tutorial.html)]|
Modeling 2D Darcy Flow with the Fourier Neural Operator |[[.ipynb](tutorial5/tutorial.ipynb),[.py](tutorial5/tutorial.py),[.html](http://mathlab.github.io/PINA/tutorial5/tutorial.html)]|
Solving the Kuramoto–Sivashinsky Equation with Averaging Neural Operator |[[.ipynb](tutorial10/tutorial.ipynb),[.py](tutorial10/tutorial.py),[.html](http://mathlab.github.io/PINA/tutorial10/tutorial.html)]|
Advection Equation with data driven DeepONet| [[.ipynb](tutorial24/tutorial.ipynb),[.py](tutorial24/tutorial.py),[.html](http://mathlab.github.io/PINA/tutorial24/tutorial.html)]|
Introductory Tutorial: Neural Operator Learning with PINA |[[.ipynb](tutorial21/tutorial.ipynb),[.py](tutorial21/tutorial.py),[.html](http://PINA-org.github.io/PINA/tutorial21/tutorial.html)]|
Modeling 2D Darcy Flow with the Fourier Neural Operator |[[.ipynb](tutorial5/tutorial.ipynb),[.py](tutorial5/tutorial.py),[.html](http://PINA-org.github.io/PINA/tutorial5/tutorial.html)]|
Solving the Kuramoto–Sivashinsky Equation with Averaging Neural Operator |[[.ipynb](tutorial10/tutorial.ipynb),[.py](tutorial10/tutorial.py),[.html](http://PINA-org.github.io/PINA/tutorial10/tutorial.html)]|
Advection Equation with data driven DeepONet| [[.ipynb](tutorial24/tutorial.ipynb),[.py](tutorial24/tutorial.py),[.html](http://PINA-org.github.io/PINA/tutorial24/tutorial.html)]|


## Supervised Learning
| Description | Tutorial |
|---------------|-----------|
Introductory Tutorial: Supervised Learning with PINA |[[.ipynb](tutorial20/tutorial.ipynb),[.py](tutorial20/tutorial.py),[.html](http://mathlab.github.io/PINA/tutorial20/tutorial.html)]|
Chemical Properties Prediction with Graph Neural Networks |[[.ipynb](tutorial15/tutorial.ipynb),[.py](tutorial15/tutorial.py),[.html](http://mathlab.github.io/PINA/tutorial15/tutorial.html)]|
Reduced Order Model with Graph Neural Networks for Unstructured Domains| [[.ipynb](tutorial22/tutorial.ipynb),[.py](tutorial22/tutorial.py),[.html](http://mathlab.github.io/PINA/tutorial22/tutorial.html)]|
Data-driven System Identification with SINDy| [[.ipynb](tutorial23/tutorial.ipynb),[.py](tutorial23/tutorial.py),[.html](http://mathlab.github.io/PINA/tutorial23/tutorial.html)]|
Unstructured Convolutional Autoencoders with Continuous Convolution |[[.ipynb](tutorial4/tutorial.ipynb),[.py](tutorial4/tutorial.py),[.html](http://mathlab.github.io/PINA/tutorial4/tutorial.html)]|
Reduced Order Modeling with POD-RBF and POD-NN Approaches for Fluid Dynamics| [[.ipynb](tutorial8/tutorial.ipynb),[.py](tutorial8/tutorial.py),[.html](http://mathlab.github.io/PINA/tutorial8/tutorial.html)]|
Introductory Tutorial: Supervised Learning with PINA |[[.ipynb](tutorial20/tutorial.ipynb),[.py](tutorial20/tutorial.py),[.html](http://PINA-org.github.io/PINA/tutorial20/tutorial.html)]|
Chemical Properties Prediction with Graph Neural Networks |[[.ipynb](tutorial15/tutorial.ipynb),[.py](tutorial15/tutorial.py),[.html](http://PINA-org.github.io/PINA/tutorial15/tutorial.html)]|
Reduced Order Model with Graph Neural Networks for Unstructured Domains| [[.ipynb](tutorial22/tutorial.ipynb),[.py](tutorial22/tutorial.py),[.html](http://PINA-org.github.io/PINA/tutorial22/tutorial.html)]|
Data-driven System Identification with SINDy| [[.ipynb](tutorial23/tutorial.ipynb),[.py](tutorial23/tutorial.py),[.html](http://PINA-org.github.io/PINA/tutorial23/tutorial.html)]|
Unstructured Convolutional Autoencoders with Continuous Convolution |[[.ipynb](tutorial4/tutorial.ipynb),[.py](tutorial4/tutorial.py),[.html](http://PINA-org.github.io/PINA/tutorial4/tutorial.html)]|
Reduced Order Modeling with POD-RBF and POD-NN Approaches for Fluid Dynamics| [[.ipynb](tutorial8/tutorial.ipynb),[.py](tutorial8/tutorial.py),[.html](http://PINA-org.github.io/PINA/tutorial8/tutorial.html)]|
4 changes: 2 additions & 2 deletions tutorials/TUTORIAL_GUIDELINES.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ Congratulations on completing the ..., here are a few directions you can explore

3. **...and many more!** — Other suggestions ....

For more resources and tutorials, check out the [PINA Documentation](https://mathlab.github.io/PINA/).
For more resources and tutorials, check out the [PINA Documentation](https://PINA-org.github.io/PINA/).
```

## Writing Style
Expand All @@ -116,7 +116,7 @@ For more resources and tutorials, check out the [PINA Documentation](https://mat

Every tutorial should:
- Be executable from top to bottom.
- Use the `tutorial` requirements in the [`pyproject.toml`](https://github.com/mathLab/PINA/blob/6ed3ca04fee3ae3673d53ea384437ce270f008da/pyproject.toml#L40) file.
- Use the `tutorial` requirements in the [`pyproject.toml`](https://github.com/PINA-org/PINA/blob/6ed3ca04fee3ae3673d53ea384437ce270f008da/pyproject.toml#L40) file.


## Contributing Checklist
Expand Down
16 changes: 8 additions & 8 deletions tutorials/tutorial1/tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
"metadata": {},
"source": [
"# Tutorial: Introductory Tutorial: Physics Informed Neural Networks with PINA \n",
"[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/mathLab/PINA/blob/master/tutorials/tutorial1/tutorial.ipynb)\n",
"[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/PINA-org/PINA/blob/master/tutorials/tutorial1/tutorial.ipynb)\n",
"\n",
"> ##### ⚠️ ***Before starting:***\n",
"> We assume you are already familiar with the concepts covered in the [Getting started with PINA](https://mathlab.github.io/PINA/_tutorial.html#getting-started-with-pina) tutorials. If not, we strongly recommend reviewing them before exploring this advanced topic.\n"
"> We assume you are already familiar with the concepts covered in the [Getting started with PINA](https://PINA-org.github.io/PINA/_tutorial.html#getting-started-with-pina) tutorials. If not, we strongly recommend reviewing them before exploring this advanced topic.\n"
]
},
{
Expand All @@ -19,7 +19,7 @@
"id": "ef4949c9",
"metadata": {},
"source": [
"In this tutorial, we will demonstrate a typical use case of **PINA** for Physics-Informed training. We will cover the basics of training a `PhysicsInformedSingleModelSolver` with PINA, if you want to go further into Physics-Informed solvers look at our dedicated [tutorials](https://mathlab.github.io/PINA/_tutorial.html#physics-informed-neural-networks) on the topic.\n",
"In this tutorial, we will demonstrate a typical use case of **PINA** for Physics-Informed training. We will cover the basics of training a `PhysicsInformedSingleModelSolver` with PINA, if you want to go further into Physics-Informed solvers look at our dedicated [tutorials](https://PINA-org.github.io/PINA/_tutorial.html#physics-informed-neural-networks) on the topic.\n",
"\n",
"Let's start by importing the useful modules:"
]
Expand Down Expand Up @@ -232,13 +232,13 @@
"Once the problem is defined and the data is generated, we can move on to modeling. This process consists of three key steps:\n",
"\n",
"**Choosing a Model**\n",
"- Select a neural network architecture. You can use the model we provide in the `pina.model` module (see [here](https://mathlab.github.io/PINA/_rst/_code.html#models) for a full list), or define a custom PyTorch module (more on this [here](https://pytorch.org/docs/stable/notes/modules.html)).\n",
"- Select a neural network architecture. You can use the model we provide in the `pina.model` module (see [here](https://PINA-org.github.io/PINA/_rst/_code.html#models) for a full list), or define a custom PyTorch module (more on this [here](https://pytorch.org/docs/stable/notes/modules.html)).\n",
"\n",
"**Choosing a Physics-Informed Solver & Defining the Trainer**\n",
"* Use a Physics-Informed solver from `pina.solver` module to solve the problem using the specified model. We have already implemented most State-Of-The-Arte solvers for you, [have a look](https://mathlab.github.io/PINA/_rst/_code.html#solvers) if interested. Today we will use the standard `PhysicsInformedSingleModelSolver` solver.\n",
"* Use a Physics-Informed solver from `pina.solver` module to solve the problem using the specified model. We have already implemented most State-Of-The-Arte solvers for you, [have a look](https://PINA-org.github.io/PINA/_rst/_code.html#solvers) if interested. Today we will use the standard `PhysicsInformedSingleModelSolver` solver.\n",
"\n",
"**Training**\n",
"* Train the model with the [`Trainer`](https://mathlab.github.io/PINA/_rst/trainer.html) class. The Trainer class provides powerful features to enhance model accuracy, optimize training time and memory, and simplify logging and visualization, thanks to PyTorch Lightning's excellent work, see [our dedicated tutorial](https://mathlab.github.io/PINA/tutorial11/tutorial.html) for further details. By default, training metrics (e.g., MSE error) are logged using a lightning logger (CSVLogger). If you prefer manual tracking, use `pina.callback.MetricTracker`.\n",
"* Train the model with the [`Trainer`](https://PINA-org.github.io/PINA/_rst/trainer.html) class. The Trainer class provides powerful features to enhance model accuracy, optimize training time and memory, and simplify logging and visualization, thanks to PyTorch Lightning's excellent work, see [our dedicated tutorial](https://PINA-org.github.io/PINA/tutorial11/tutorial.html) for further details. By default, training metrics (e.g., MSE error) are logged using a lightning logger (CSVLogger). If you prefer manual tracking, use `pina.callback.MetricTracker`.\n",
"\n",
"Let's cover all steps one by one!\n",
"\n",
Expand Down Expand Up @@ -269,7 +269,7 @@
"Then we build the solver. The `PhysicsInformedSingleModelSolver` class needs to be initialized with a `model` and a specific `problem` to be solved. They also take extra arguments, as the optimizer, scheduler, loss type and weighting for the different conditions which are all set to their default values.\n",
"\n",
">##### 💡***Bonus tip:***\n",
"> All physics solvers in PINA can handle both forward and inverse problems without requiring any changes to the model or solver structure! See [our tutorial](https://mathlab.github.io/PINA/tutorial7/tutorial.html) of inverse problems for more infos."
"> All physics solvers in PINA can handle both forward and inverse problems without requiring any changes to the model or solver structure! See [our tutorial](https://PINA-org.github.io/PINA/tutorial7/tutorial.html) of inverse problems for more infos."
]
},
{
Expand Down Expand Up @@ -411,7 +411,7 @@
"\n",
"5. **... and many more!**: The possibilities are vast! Continue experimenting with advanced configurations, solvers, and other features in PINA.\n",
"\n",
"For more resources and tutorials, check out the [PINA Documentation](https://mathlab.github.io/PINA/)."
"For more resources and tutorials, check out the [PINA Documentation](https://PINA-org.github.io/PINA/)."
]
}
],
Expand Down
Loading
Loading