Skip to content
Merged
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
13 changes: 12 additions & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1 +1,12 @@
Fixes #ISSUE_NUMBER
## Description
<!-- Provide a standalone description of changes in this PR. -->
<!-- Reference any issues closed by this PR with "closes #1234". -->

This PR fixes #ISSUE_NUMBER. <!-- Possible other comments. -->

## Checklist

- [ ] Code follows the project’s [Code Style Guidelines](https://github.com/mathLab/PINA/blob/master/CONTRIBUTING.md#code-style--guidelines)
- [ ] Tests have been added or updated
- [ ] Documentation has been updated if necessary
- [ ] Pull request is linked to an open issue
2 changes: 1 addition & 1 deletion .github/workflows/monthly-tagger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
matrix:
os: [windows-latest, macos-latest, ubuntu-latest]
python-version: [3.8, 3.9, '3.10', '3.11', '3.12']
python-version: [3.9, '3.10', '3.11', '3.12', '3.13']
steps:
- uses: actions/checkout@v2
- name: Set up Python
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tester.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
fail-fast: false
matrix:
os: [windows-latest, macos-latest, ubuntu-latest]
python-version: [3.8, 3.9, '3.10', '3.11', '3.12']
python-version: [3.9, '3.10', '3.11', '3.12', '3.13']

steps:
- uses: actions/checkout@v4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tutorial_exporter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: 3.9

- name: Install dependencies
run: |
Expand Down Expand Up @@ -91,7 +91,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: 3.9

- name: Install dependencies
run: |
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -145,3 +145,6 @@ cython_debug/

# tmp dir
**tmp*

# Avoid add of DS_Store files
**.DS_Store
386 changes: 149 additions & 237 deletions README.md

Large diffs are not rendered by default.

20 changes: 19 additions & 1 deletion docs/source/_installation.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Installation
============

**PINA** requires requires `numpy`, `matplotlib`, `torch`, `lightning`, `sphinx` (for the documentation) and `pytest` (for local test). The code is tested for Python 3, while compatibility of Python 2 is not guaranteed anymore. It can be installed using `pip` or directly from the source code.
**PINA** requires requires `torch`, `lightning`, `torch_geometric` and `matplotlib`.

Installing via PIP
__________________
Expand Down Expand Up @@ -32,3 +32,21 @@ To install the package just type:
.. code-block:: bash

$ pip install -e .


Install with extra packages
____________________________

To install extra dependencies required to run tests or tutorials directories, please use the following command:

.. code-block:: bash

$ pip install "pina-mathlab[extras]"


Available extras include:

* `dev` for development purpuses, use this if you want to Contribute.
* `test` for running test locally.
* `doc` for building documentation locally.
* `tutorial` for running tutorials
10 changes: 7 additions & 3 deletions docs/source/_rst/_code.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Code Documentation
Welcome to PINA documentation! Here you can find the modules of the package divided in different sections.
The high-level structure of the package is depicted in our API.

.. figure:: ../index_files/API_color.png
.. figure:: ../index_files/PINA_API.png
:alt: PINA application program interface
:align: center
:width: 400
Expand Down Expand Up @@ -68,15 +68,19 @@ Solvers
SolverInterface <solver/solver_interface.rst>
SingleSolverInterface <solver/single_solver_interface.rst>
MultiSolverInterface <solver/multi_solver_interface.rst>
SupervisedSolverInterface <solver/supervised_solver/supervised_solver_interface>
DeepEnsembleSolverInterface <solver/ensemble_solver/ensemble_solver_interface>
PINNInterface <solver/physics_informed_solver/pinn_interface.rst>
PINN <solver/physics_informed_solver/pinn.rst>
GradientPINN <solver/physics_informed_solver/gradient_pinn.rst>
CausalPINN <solver/physics_informed_solver/causal_pinn.rst>
CompetitivePINN <solver/physics_informed_solver/competitive_pinn.rst>
SelfAdaptivePINN <solver/physics_informed_solver/self_adaptive_pinn.rst>
RBAPINN <solver/physics_informed_solver/rba_pinn.rst>
SupervisedSolver <solver/supervised.rst>
ReducedOrderModelSolver <solver/reduced_order_model.rst>
DeepEnsemblePINN <solver/ensemble_solver/ensemble_pinn>
SupervisedSolver <solver/supervised_solver/supervised.rst>
DeepEnsembleSupervisedSolver <solver/ensemble_solver/ensemble_supervised>
ReducedOrderModelSolver <solver/supervised_solver/reduced_order_model.rst>
GAROM <solver/garom.rst>


Expand Down
8 changes: 8 additions & 0 deletions docs/source/_rst/solver/ensemble_solver/ensemble_pinn.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
DeepEnsemblePINN
==================
.. currentmodule:: pina.solver.ensemble_solver.ensemble_pinn

.. autoclass:: DeepEnsemblePINN
:show-inheritance:
:members:

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
DeepEnsembleSolverInterface
=============================
.. currentmodule:: pina.solver.ensemble_solver.ensemble_solver_interface

.. autoclass:: DeepEnsembleSolverInterface
:show-inheritance:
:members:

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
DeepEnsembleSupervisedSolver
=============================
.. currentmodule:: pina.solver.ensemble_solver.ensemble_supervised

.. autoclass:: DeepEnsembleSupervisedSolver
:show-inheritance:
:members:

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ReducedOrderModelSolver
==========================
.. currentmodule:: pina.solver.reduced_order_model
.. currentmodule:: pina.solver.supervised_solver.reduced_order_model

.. autoclass:: ReducedOrderModelSolver
:members:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
SupervisedSolver
===================
.. currentmodule:: pina.solver.supervised
.. currentmodule:: pina.solver.supervised_solver.supervised

.. autoclass:: SupervisedSolver
:members:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
SupervisedSolverInterface
==========================
.. currentmodule:: pina.solver.supervised_solver.supervised_solver_interface

.. autoclass:: SupervisedSolverInterface
:show-inheritance:
:members:

40 changes: 24 additions & 16 deletions docs/source/_tutorial.rst
Original file line number Diff line number Diff line change
@@ -1,35 +1,43 @@
PINA Tutorials
======================
🚀 Welcome to the PINA Tutorials!
==================================


In this folder we collect useful tutorials in order to understand the principles and the potential of **PINA**.
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.

Getting started with PINA
-------------------------

- `Introduction to PINA for Physics Informed Neural Networks training <tutorial1/tutorial.html>`_
- `Introductory Tutorial: A Beginner's Guide to PINA <tutorial17/tutorial.html>`_
- `How to build a Problem in PINA <tutorial16/tutorial.html>`_
- `Introduction to Solver classes <tutorial18/tutorial.html>`_
- `Introduction to Trainer class <tutorial11/tutorial.html>`_
- `Data structure for SciML: Tensor, LabelTensor, Data and Graph <tutorial19/tutorial.html>`_
- `Building geometries with DomainInterface class <tutorial6/tutorial.html>`_
- `Introduction to PINA Equation class <tutorial12/tutorial.html>`_
- `PINA and PyTorch Lightning, training tips and visualizations <tutorial11/tutorial.html>`_
- `Building custom geometries with PINA Location class <tutorial6/tutorial.html>`_


Physics Informed Neural Networks
--------------------------------

- `Two dimensional Poisson problem using Extra Features Learning <tutorial2/tutorial.html>`_
- `Two dimensional Wave problem with hard constraint <tutorial3/tutorial.html>`_
- `Resolution of a 2D Poisson inverse problem <tutorial7/tutorial.html>`_
- `Periodic Boundary Conditions for Helmotz Equation <tutorial9/tutorial.html>`_
- `Multiscale PDE learning with Fourier Feature Network <tutorial13/tutorial.html>`_
- `Introductory Tutorial: Physics Informed Neural Networks with PINA <tutorial1/tutorial.html>`_
- `Enhancing PINNs with Extra Features to solve the Poisson Problem <tutorial2/tutorial.html>`_
- `Applying Hard Constraints in PINNs to solve the Wave Problem <tutorial3/tutorial.html>`_
- `Applying Periodic Boundary Conditions in PINNs to solve the Helmotz Problem <tutorial9/tutorial.html>`_
- `Inverse Problem Solving with Physics-Informed Neural Network <tutorial7/tutorial.html>`_
- `Learning Multiscale PDEs Using Fourier Feature Networks <tutorial13/tutorial.html>`_
- `Learning Bifurcating PDE Solutions with Physics-Informed Deep Ensembles <tutorial14/tutorial.html>`_

Neural Operator Learning
------------------------

- `Two dimensional Darcy flow using the Fourier Neural Operator <tutorial5/tutorial.html>`_
- `Time dependent Kuramoto Sivashinsky equation using the Averaging Neural Operator <tutorial10/tutorial.html>`_
- `Introductory Tutorial: Neural Operator Learning with PINA <tutorial21/tutorial.html>`_
- `Modeling 2D Darcy Flow with the Fourier Neural Operator <tutorial5/tutorial.html>`_
- `Solving the Kuramoto-Sivashinsky Equation with Averaging Neural Operator <tutorial10/tutorial.html>`_

Supervised Learning
-------------------

- `Unstructured convolutional autoencoder via continuous convolution <tutorial4/tutorial.html>`_
- `POD-RBF and POD-NN for reduced order modeling <tutorial8/tutorial.html>`_
- `Introductory Tutorial: Supervised Learning with PINA <tutorial20/tutorial.html>`_
- `Chemical Properties Prediction with Graph Neural Networks <tutorial25/tutorial.html>`_
- `Unstructured Convolutional Autoencoders with Continuous Convolution <tutorial4/tutorial.html>`_
- `Reduced Order Modeling with POD-RBF and POD-NN Approaches for Fluid Dynamics <tutorial8/tutorial.html>`_
31 changes: 16 additions & 15 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
:html_theme.sidebar_secondary.remove:

Welcome to PINAs documentation!
Welcome to PINA's documentation!
=======================================

.. grid:: 6
Expand Down Expand Up @@ -41,35 +41,36 @@ Welcome to PINA’s documentation!
.. grid-item::
:columns: 12 12 8 8

Physics Informed Neural network for Advanced modeling (**PINA**) is
an open-source Python library providing an intuitive interface for
solving differential equations using PINNs, NOs or both together.
**PINA** is an open-source Python library designed to simplify and accelerate
the development of Scientific Machine Learning (SciML) solutions.
Built on top of `PyTorch <https://pytorch.org/>`_, `PyTorch Lightning <https://lightning.ai/docs/pytorch/stable/>`_,
and `PyTorch Geometric <https://pytorch-geometric.readthedocs.io/en/latest/>`_,
PINA provides an intuitive framework for defining, experimenting with,
and solving complex problems using Neural Networks,
Physics-Informed Neural Networks (PINNs), Neural Operators, and more.

Based on `PyTorch <https://pytorch.org/>`_, `PyTorchLightning <https://lightning.ai/docs/pytorch/stable/>`_, and `PyG <https://pytorch-geometric.readthedocs.io/en/latest/>`_, **PINA** offers a simple and intuitive way to formalize a specific (differential) problem
and solve it using neural networks . The approximated solution of a differential equation
can be implemented using PINA in a few lines of code thanks to the intuitive and user-friendly interface.
- **Modular Architecture**: Designed with modularity in mind and relying on powerful yet composable abstractions, PINA allows users to easily plug, replace, or extend components, making experimentation and customization straightforward.


- **Scalable Performance**: With native support for multi-device training, PINA handles large datasets efficiently, offering performance close to hand-crafted implementations with minimal overhead.

- **Highly Flexible**: Whether you're looking for full automation or granular control, PINA adapts to your workflow. High-level abstractions simplify model definition, while expert users can dive deep to fine-tune every aspect of the training and inference process.

For further information or questions about **PINA** contact us by email.




.. grid-item-card:: Contents
:class-title: sd-fs-5
:class-body: sd-pl-4

.. toctree::
:maxdepth: 1

API <_rst/_code>
Tutorial <_tutorial>
Installing <_installation>
Team & Foundings <_team.rst>
API <_rst/_code>
Tutorials <_tutorial>
Cite PINA <_cite.rst>
Contributing <_contributing>
Team & Foundings <_team.rst>
License <_LICENSE.rst>
Cite PINA <_cite.rst>



Expand Down
Binary file removed docs/source/index_files/API_color.png
Binary file not shown.
Binary file added docs/source/index_files/PINA_API.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading