Skip to content

Commit 0c8c8cc

Browse files
dario-cosciaDario Cosciaannaivagnesvalc89Monthly Tag bot
committed
PINN variants addition and Solvers Update (#263)
* gpinn/basepinn new classes, pinn restructure * codacy fix gpinn/basepinn/pinn * inverse problem fix * Causal PINN (#267) * fix GPU training in inverse problem (#283) * Create a `compute_residual` attribute for `PINNInterface` * Modify dataloading in solvers (#286) * Modify PINNInterface by removing _loss_phys, _loss_data * Adding in PINNInterface a variable to track the current condition during training * Modify GPINN,PINN,CausalPINN to match changes in PINNInterface * Competitive Pinn Addition (#288) * fixing after rebase/ fix loss * fixing final issues --------- Co-authored-by: Dario Coscia <[email protected]> * Modify min max formulation to max min for paper consistency * Adding SAPINN solver (#291) * rom solver * fix import --------- Co-authored-by: Dario Coscia <[email protected]> Co-authored-by: Anna Ivagnes <[email protected]> Co-authored-by: valc89 <[email protected]> Co-authored-by: Monthly Tag bot <[email protected]> Co-authored-by: Nicola Demo <[email protected]>
1 parent 0d5ad8f commit 0c8c8cc

29 files changed

+3838
-358
lines changed

docs/source/_rst/_code.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,14 @@ Solvers
3535
:titlesonly:
3636

3737
SolverInterface <solvers/solver_interface.rst>
38+
PINNInterface <solvers/basepinn.rst>
3839
PINN <solvers/pinn.rst>
40+
GPINN <solvers/gpinn.rst>
41+
CausalPINN <solvers/causalpinn.rst>
42+
CompetitivePINN <solvers/competitivepinn.rst>
43+
SAPINN <solvers/sapinn.rst>
3944
Supervised solver <solvers/supervised.rst>
45+
ReducedOrderModelSolver <solvers/rom.rst>
4046
GAROM <solvers/garom.rst>
4147

4248

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
PINNInterface
2+
=================
3+
.. currentmodule:: pina.solvers.pinns.basepinn
4+
5+
.. autoclass:: PINNInterface
6+
:members:
7+
:show-inheritance:
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
CausalPINN
2+
==============
3+
.. currentmodule:: pina.solvers.pinns.causalpinn
4+
5+
.. autoclass:: CausalPINN
6+
:members:
7+
:show-inheritance:
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
CompetitivePINN
2+
=================
3+
.. currentmodule:: pina.solvers.pinns.competitive_pinn
4+
5+
.. autoclass:: CompetitivePINN
6+
:members:
7+
:show-inheritance:

docs/source/_rst/solvers/gpinn.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
GPINN
2+
======
3+
.. currentmodule:: pina.solvers.pinns.gpinn
4+
5+
.. autoclass:: GPINN
6+
:members:
7+
:show-inheritance:

docs/source/_rst/solvers/pinn.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
PINN
22
======
3-
.. currentmodule:: pina.solvers.pinn
3+
.. currentmodule:: pina.solvers.pinns.pinn
44

55
.. autoclass:: PINN
66
:members:

docs/source/_rst/solvers/rom.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
ReducedOrderModelSolver
2+
==========================
3+
.. currentmodule:: pina.solvers.rom
4+
5+
.. autoclass:: ReducedOrderModelSolver
6+
:members:
7+
:show-inheritance:
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
SAPINN
2+
======
3+
.. currentmodule:: pina.solvers.pinns.sapinn
4+
5+
.. autoclass:: SAPINN
6+
:members:
7+
:show-inheritance:

pina/model/avno.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,9 @@ def forward(self, x):
110110
"""
111111
points_tmp = x.extract(self.coordinates_indices)
112112
new_batch = x.extract(self.field_indices)
113-
new_batch = concatenate((new_batch, points_tmp), dim=2)
113+
new_batch = concatenate((new_batch, points_tmp), dim=-1)
114114
new_batch = self._lifting_operator(new_batch)
115115
new_batch = self._integral_kernels(new_batch)
116-
new_batch = concatenate((new_batch, points_tmp), dim=2)
116+
new_batch = concatenate((new_batch, points_tmp), dim=-1)
117117
new_batch = self._projection_operator(new_batch)
118118
return new_batch

pina/solvers/__init__.py

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,19 @@
1-
__all__ = ["PINN", "GAROM", "SupervisedSolver", "SolverInterface"]
1+
__all__ = [
2+
"SolverInterface",
3+
"PINNInterface",
4+
"PINN",
5+
"GPINN",
6+
"CausalPINN",
7+
"CompetitivePINN",
8+
"SAPINN",
9+
"SupervisedSolver",
10+
"ReducedOrderModelSolver",
11+
"GAROM",
12+
]
213

3-
from .garom import GAROM
4-
from .pinn import PINN
5-
from .supervised import SupervisedSolver
614
from .solver import SolverInterface
15+
from .pinns import *
16+
from .supervised import SupervisedSolver
17+
from .rom import ReducedOrderModelSolver
18+
from .garom import GAROM
19+

0 commit comments

Comments
 (0)