119 Commits

Author SHA1 Message Date
Dario Coscia
2b870bc704 Update PULL_REQUEST_TEMPLATE.md
Some checks failed
Master Cleaner / runner / black (push) Has been cancelled
2025-04-17 10:48:32 +02:00
Dario Coscia
5fe671b90e rm py3.8, add 3.13 2025-04-17 10:48:32 +02:00
Dario Coscia
e1863d9318 Update PINNInterface Inheritance (#542) 2025-04-17 10:48:32 +02:00
Filippo Olivo
88b27605f1 Ignore .DS_Store files (#547) 2025-04-17 10:48:32 +02:00
Dario Coscia
bcac3a386b Fix label_tensor.py doc (#543) 2025-04-17 10:48:32 +02:00
Dario Coscia
1bb3c125ac Refactoring solvers (#541)
* Refactoring solvers

* Simplify logic compile
* Improve and update doc
* Create SupervisedSolverInterface
* Specialize SupervisedSolver and ReducedOrderModelSolver
* Create EnsembleSolverInterface + EnsembleSupervisedSolver
* Create tests ensemble solvers

* formatter

* codacy

* fix issues + speedup test
2025-04-17 10:48:32 +02:00
Giovanni Canali
fa6fda0bd5 Improve differential operators (#528)
* Improve grad logic and fix issues

* Add operators' fast versions

* Fix bug in laplacian + new tests + restructuring

Co-authored-by: Dario Coscia <dariocos99@gmail.com>

* fix advection bug

---------

Co-authored-by: Dario Coscia <dariocos99@gmail.com>
2025-04-17 10:48:32 +02:00
Filippo Olivo
938bdeb421 Self-loops management in KNNGraph and RadiusGraph (#522)
* Add self-loop option to RadiusGraph and KNNGraph
2025-04-17 10:48:32 +02:00
Filippo Olivo
a1f98764d3 Fix __getitem__ in LabelTensor (#546)
* Fix LabelTensor
* Cleaning label_tensor.py

---------

Co-authored-by: Dario Coscia <93731561+dario-coscia@users.noreply.github.com>
2025-04-17 10:48:32 +02:00
Dario Coscia
e250e3f5f7 Update MultiSolverInterface (#520) 2025-04-17 10:48:32 +02:00
github-actions[bot]
578c5bc2f4 export tutorials changed in 5aec5f5 (#540) 2025-04-17 10:48:32 +02:00
Dario Coscia
3684782fb5 Update tutorial_exporter.yml (#537)
fixing bug introduced in #531 workflow on push
2025-04-17 10:48:32 +02:00
Dario Coscia
545e6a3ea2 update workflow + pyproject tut dependencies (#531) 2025-04-17 10:48:32 +02:00
Giovanni Canali
3958e35fdd add scheduler step for multisolvers (#526) 2025-04-17 10:48:32 +02:00
Giovanni Canali
6d39e2fa98 fix labels management in operators (#524)
* fix bug in laplace labels

* fix label management and add test
2025-04-17 10:48:32 +02:00
Filippo Olivo
80c257da4d Bug fix and add additional tests for Dataset and DataModule (#517) 2025-04-17 10:48:32 +02:00
Nicola Demo
79a7199985 manual trigger for exporter 2025-04-17 10:48:32 +02:00
Nicola Demo
c226c9be19 fix black dependency 2025-04-17 10:48:32 +02:00
FilippoOlivo
a02c3386f6 Fix README 2025-04-17 10:48:32 +02:00
Nicola Demo
e084f85386 Fix pod_block.py 2025-04-17 10:48:32 +02:00
Dario Coscia
c9cb8bf201 update doc 2025-04-17 10:48:32 +02:00
Nicola Demo
7a5f156870 Fix tester.yml coverage 2025-04-17 10:48:32 +02:00
Nicola Demo
9e6d5d5929 update github actions 2025-04-17 10:48:32 +02:00
Nicola Demo
f95408838a fix versioning for toml file 2025-04-17 10:48:32 +02:00
Dario Coscia
b0dd952440 renaming 2025-04-17 10:48:32 +02:00
Giuseppe Alessio D'Inverno
01aeb17673 Neural Tangent Kernel integration + typo fix (#505)
* NTK weighting + typo fixing
* black code formatter + .rst docs

---------

Co-authored-by: Dario Coscia <dariocos99@gmail.com>
2025-04-17 10:48:32 +02:00
FilippoOlivo
ff191c9611 Remove useless line in sphinx config file 2025-04-17 10:48:32 +02:00
FilippoOlivo
e90be726da Minor fix 2025-04-17 10:48:32 +02:00
FilippoOlivo
b92f39aead Add docstring for repeat in DataModule 2025-04-17 10:48:32 +02:00
Dario Coscia
2a933a81ff update versioning sphinx 2025-04-17 10:48:32 +02:00
Dario Coscia
56bb4ab810 modify doc workflows 2025-04-17 10:48:32 +02:00
Dario Coscia
a5c7e41d01 update workflow file 2025-04-17 10:48:32 +02:00
Dario Coscia
b4c30eeb16 modify conf.py 2025-04-17 10:48:32 +02:00
Dario Coscia
054cfb496e automodule loss + update doc workflow 2025-04-17 10:48:32 +02:00
Dario Coscia
ec83b52174 docs->doc in testing_doc.yml 2025-04-17 10:48:32 +02:00
Dario Coscia
3153bb7426 doc test workflow update 2025-04-17 10:48:32 +02:00
Dario Coscia
f70a23c076 formatting 2025-04-17 10:48:32 +02:00
github-actions[bot]
9b825845f9 export tutorials changed in 762dc7f (#500)
Co-authored-by: dario-coscia <dario-coscia@users.noreply.github.com>
2025-04-17 10:48:32 +02:00
Dario Coscia
8cafe7556e update tut11 2025-04-17 10:48:32 +02:00
Dario Coscia
94e49b4699 update datamodule doc 2025-04-17 10:48:32 +02:00
Dario Coscia
2a21cff4fb adding layout.html template 2025-04-17 10:48:32 +02:00
Dario Coscia
2c21978879 format code 2025-04-17 10:48:32 +02:00
Dario Coscia
19084426e9 update cite/team 2025-04-17 10:48:32 +02:00
Dario Coscia
58f8bb4e1a update contributing 2025-04-17 10:48:32 +02:00
Dario Coscia
01ea27d405 modify automatic batching doc 2025-04-17 10:48:32 +02:00
Dario Coscia
ea21754d53 formatting 2025-04-17 10:48:32 +02:00
Dario Coscia
480140dd31 update doc 2025-04-17 10:48:31 +02:00
github-actions[bot]
ae1fd2680f export tutorials changed in c161138 (#498)
Co-authored-by: dario-coscia <dario-coscia@users.noreply.github.com>
2025-04-17 10:48:31 +02:00
Dario Coscia
fa402b3565 trigger workflow tutorials 2025-04-17 10:48:31 +02:00
Dario Coscia
39ceeb82c1 add workflow_dispatch 2025-04-17 10:48:31 +02:00
Dario Coscia
0913f98ab3 remove tutorials html 2025-04-17 10:48:31 +02:00
Dario Coscia
5a6fe31b10 update html dir 2025-04-17 10:48:31 +02:00
Dario Coscia
115c4a4e9f update workflow, rm tutorial 4 data 2025-04-17 10:48:31 +02:00
FilippoOlivo
1224449452 Remove MNIST data from tutorial 4 2025-04-17 10:48:31 +02:00
Dario Coscia
3ff9f0c9a2 Automatize Tutorials html, py files creation (#496)
* workflow to export tutorials

---------
2025-04-17 10:48:31 +02:00
giovanni
8dfc9d19db standardize module docstring 2025-04-17 10:48:31 +02:00
Dario Coscia
8cfee0d1bc modify poisson inv 2025-04-17 10:48:31 +02:00
giovanni
28d24f3f41 fix doc model part 2 2025-04-17 10:48:31 +02:00
FilippoOlivo
194f5d24c4 Fix rendering and codacy 2025-04-17 10:48:31 +02:00
FilippoOlivo
436b227809 Fix conditions rendering 2025-04-17 10:48:31 +02:00
giovanni
10a22fee6f fix doc model part 1 2025-04-17 10:48:31 +02:00
FilippoOlivo
cf2825241e Black formatting 2025-04-17 10:48:31 +02:00
FilippoOlivo
bd65d4b0f7 Fix rendering LT 2025-04-17 10:48:31 +02:00
FilippoOlivo
feb6ca952a Fix rendering graph 2025-04-17 10:48:31 +02:00
FilippoOlivo
a3081cc09f Tmp fixes 2025-04-17 10:48:31 +02:00
giovanni
e780671fd0 black formatter 2025-04-17 10:48:31 +02:00
giovanni
76f5be85ea fix rendering part 2 2025-04-17 10:48:31 +02:00
giovanni
3d842cb9ec fix rendering part 1 2025-04-17 10:48:31 +02:00
giovanni
5e6aa61592 fix doc solver 2025-04-17 10:48:31 +02:00
Dario Coscia
fd2b50fc06 updating rst 2025-04-17 10:48:31 +02:00
giovanni
fad38b2983 fix pinn doc 2025-04-17 10:48:31 +02:00
Dario Coscia
2bf0b625ad update rst 2025-04-17 10:48:31 +02:00
FilippoOlivo
08de548e34 Improve doc condition 2025-04-17 10:48:31 +02:00
FilippoOlivo
b9b25e7b4a Fix doc data 2025-04-17 10:48:31 +02:00
Dario Coscia
0408f2564c update rsts 2025-04-17 10:48:31 +02:00
Dario Coscia
65d9c06514 adaptive_functions rst 2025-04-17 10:48:31 +02:00
Dario Coscia
905097880a start refactoring 2025-04-17 10:48:31 +02:00
giovanni
89a6b39bd1 fix problem doc 2025-04-17 10:48:31 +02:00
giovanni
47cd46bb4a fix optim doc 2025-04-17 10:48:31 +02:00
giovanni
6883763949 fix utils and trainer doc 2025-04-17 10:48:31 +02:00
FilippoOlivo
b23c0f186a Black formatting 2025-04-17 10:48:31 +02:00
FilippoOlivo
b010d1169c Additional fix in collector 2025-04-17 10:48:31 +02:00
FilippoOlivo
8a3c169ffd Additional fix in condition 2025-04-17 10:48:31 +02:00
giovanni
972fa2101d fix operator doc 2025-04-17 10:48:31 +02:00
Filippo Olivo
8ed5ffb70a Update collector.py 2025-04-17 10:48:31 +02:00
Filippo Olivo
ed03cac960 Update collector.py 2025-04-17 10:48:31 +02:00
giovanni
da1ac90b99 fix doc loss and codacy 2025-04-17 10:48:31 +02:00
FilippoOlivo
2c9e980c7f Fix codacy 2025-04-17 10:48:31 +02:00
giovanni
f420b09960 fix equation doc 2025-04-17 10:48:31 +02:00
giovanni
06e6c4763d fix doc domain 2025-04-17 10:48:31 +02:00
FilippoOlivo
a76c1cda96 Black formatting 2025-04-17 10:48:31 +02:00
FilippoOlivo
033d36c5a8 Other fixes 2025-04-17 10:48:31 +02:00
FilippoOlivo
d857b47002 Fix doc 2025-04-17 10:48:31 +02:00
FilippoOlivo
3db9b3b940 Fix doc data 2025-04-17 10:48:31 +02:00
FilippoOlivo
ee874464b8 Fix doc condition 2025-04-17 10:48:31 +02:00
giovanni
9bf85da740 beginning of domain doc 2025-04-17 10:48:31 +02:00
FilippoOlivo
c6c2361899 Minor update 2025-04-17 10:48:31 +02:00
FilippoOlivo
2cbc57ccbe Black formatting collector 2025-04-17 10:48:31 +02:00
FilippoOlivo
6291689b6a Doc collector 2025-04-17 10:48:31 +02:00
FilippoOlivo
2b65f387e8 Black formatting 2025-04-17 10:48:31 +02:00
FilippoOlivo
e7998b629b Update doc LT 2025-04-17 10:48:31 +02:00
FilippoOlivo
d3629b2b54 Update doc data 2025-04-17 10:48:31 +02:00
FilippoOlivo
3e02bb3773 Update doc condition 2025-04-17 10:48:31 +02:00
FilippoOlivo
72ce6edaa7 Doc data 2025-04-17 10:48:31 +02:00
FilippoOlivo
3fd12669bb Codacy fix on condition 2025-04-17 10:48:31 +02:00
FilippoOlivo
5d68dfe6f3 Black formatting on condition 2025-04-17 10:48:31 +02:00
FilippoOlivo
0a1963b204 Small fixes in conditions 2025-04-17 10:48:31 +02:00
FilippoOlivo
be0e39a050 Doc conditions 2025-04-17 10:48:31 +02:00
FilippoOlivo
92bb04fafe Black formatting on LabelTensor 2025-04-17 10:48:31 +02:00
FilippoOlivo
c99157d98a Doc LabelTensor 2025-04-17 10:48:31 +02:00
FilippoOlivo
7b00b80ecb Documentation and docstring graph and data 2025-04-17 10:48:31 +02:00
Dario Coscia
86222b3ac6 Update Tutorials 0.2 (#490) 2025-04-17 10:48:31 +02:00
Nicola Demo
03be447e02 Create SECURITY.md (#489) 2025-04-17 10:48:31 +02:00
Nicola Demo
0bf293e48f Create PULL_REQUEST_TEMPLATE.md (#488) 2025-04-17 10:48:31 +02:00
Nicola Demo
8bbdabca0d Create CODE_OF_CONDUCT.md (#487) 2025-04-17 10:48:31 +02:00
Nicola Demo
991ea74adf Update CONTRIBUTING.md (#486) 2025-04-17 10:48:31 +02:00
Dario Coscia
9dab6380f8 Update callbacks and tests (#482)
---------

Co-authored-by: giovanni <giovanni.canali98@yahoo.it>
2025-04-17 10:48:31 +02:00
Filippo Olivo
18d178ab3a Restore .pylintrc (#483) 2025-04-17 10:48:31 +02:00
Matteo Bertocchi
bd9b49530a Update tutorials (#463)
---------

Co-authored-by: Dario Coscia <93731561+dario-coscia@users.noreply.github.com>
2025-04-17 10:46:56 +02:00
392 changed files with 129824 additions and 13016 deletions

12
.github/PULL_REQUEST_TEMPLATE.md vendored Normal file
View File

@@ -0,0 +1,12 @@
## 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 projects [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

View File

@@ -1,19 +0,0 @@
name: Black Formatter (PR Check)
on:
pull_request:
branches:
- "**" # Run on pull requests for all branches
jobs:
linter:
name: runner / black
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run Black formatter (check mode)
uses: psf/black@stable
with:
options: "--check -l 80"
src: "./pina"

View File

@@ -1,35 +0,0 @@
name: "Coverage Deploy to Codacy"
on:
push:
branches:
- master
jobs:
test_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install Python dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install .[test]
- name: Test with pytest
env:
CODACY_API_TOKEN: ${{ secrets.CODACY_API_TOKEN }}
shell: bash
run: |
python3 -m pytest --cov-report term --cov-report xml:cobertura.xml --cov=pina
curl -s https://coverage.codacy.com/get.sh -o CodacyCoverageReporter.sh
chmod +x CodacyCoverageReporter.sh
./CodacyCoverageReporter.sh report -r cobertura.xml -t $CODACY_API_TOKEN

View File

@@ -1,18 +0,0 @@
name: Releases
on:
push:
tags:
- '*'
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v2
- uses: ncipollo/release-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}

58
.github/workflows/deployer.yml vendored Normal file
View File

@@ -0,0 +1,58 @@
name: "Deployer"
on:
push:
tags:
- "*"
jobs:
docs: #######################################################################
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Python dependencies
run: python3 -m pip install .[doc]
- name: Build Documentation
run: |
make html
working-directory: docs/
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
#deploy_key: ${{ secrets.DEPLOY_PRIVATE_KEY }}
publish_dir: ./docs/build/html
allow_empty_commit: true
release_github: #############################################################
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: ncipollo/release-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
pypi: #######################################################################
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install build
run: >-
python -m pip install build --user
- name: Build a binary wheel and a source tarball
run: >-
python -m build --sdist --wheel --outdir dist/ .
- name: Publish distribution to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}

View File

@@ -1,23 +0,0 @@
on: [push]
jobs:
paper:
runs-on: ubuntu-latest
name: Paper Draft
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build draft PDF
uses: openjournals/openjournals-draft-action@master
with:
journal: joss
# This should be the path to the paper within your repo.
paper-path: joss/paper.md
- name: Upload
uses: actions/upload-artifact@v1
with:
name: paper
# This is the output path where Pandoc will write the compiled
# PDF. Note, this should be the same directory as the input
# paper.md
path: joss/paper.pdf

View File

@@ -1,4 +1,4 @@
name: Black Formatter
name: Master Cleaner
on:
push:
@@ -6,15 +6,14 @@ on:
- master
jobs:
linter:
formatter:
name: runner / black
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: psf/black@stable
with:
options: "-l 80"
src: "./pina"
- name: Create Pull Request

View File

@@ -1,4 +1,4 @@
name: Monthly Automated Tag
name: "Monthly Tagger"
on:
schedule:
@@ -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
@@ -30,7 +30,7 @@ jobs:
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
token: ${{ secrets.NDEMO_PAT_TOKEN }}

View File

@@ -1,31 +0,0 @@
name: "PYPI Publish"
on:
push:
tags:
- "*"
jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Install build
run: >-
python -m pip install build --user
- name: Build a binary wheel and a source tarball
run: >-
python -m build --sdist --wheel --outdir dist/ .
- name: Publish distribution to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}

View File

@@ -1,26 +0,0 @@
name: "Documentation Deploy"
on:
push:
tags:
- "*"
jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Create the new documentation
uses: ammaraskar/sphinx-action@7.4.7
with:
pre-build-command: "python3 -m pip install .[docs]"
docs-folder: "docs/"
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
#deploy_key: ${{ secrets.DEPLOY_PRIVATE_KEY }}
publish_dir: ./docs/build/html
allow_empty_commit: true

78
.github/workflows/tester.yml vendored Normal file
View File

@@ -0,0 +1,78 @@
name: "Testing Pull Request"
on:
pull_request:
branches:
- "master"
- "dev"
jobs:
unittests: #################################################################
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-latest, macos-latest, ubuntu-latest]
python-version: [3.9, '3.10', '3.11', '3.12', '3.13']
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Python dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install .[test]
- name: Test with pytest
run: |
python3 -m pytest
linter: ####################################################################
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run Black formatter (check mode)
uses: psf/black@stable
with:
src: "./pina"
testdocs: ##################################################################
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Python dependencies
run: python3 -m pip install .[doc]
- name: Build Documentation
run: |
make html SPHINXOPTS+='-W'
working-directory: docs/
coverage: ##################################################################
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Python dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install .[test]
- name: Generate coverage report
run: |
python3 -m pytest --cov-report term --cov-report xml:cobertura.xml --cov=pina
- name: Produce the coverage report
uses: insightsengineering/coverage-action@v2
with:
path: ./cobertura.xml
threshold: 80.123
fail: true
publish: true
coverage-summary-title: "Code Coverage Summary"

View File

@@ -1,33 +0,0 @@
name: Test Sphinx Documentation Build
on:
push:
branches:
- "master"
paths:
- 'docs/**'
pull_request:
branches:
- "master"
paths:
- 'docs/**'
jobs:
docs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python
uses: ammaraskar/sphinx-action@7.4.7
with:
pre-build-command: "python3 -m pip install .[docs]"
docs-folder: "docs/"
- name: Build Sphinx documentation
run: |
cd docs
make html

View File

@@ -1,34 +0,0 @@
name: "Testing Pull Request"
on:
pull_request:
branches:
- "master"
- "0.2"
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-latest, macos-latest, ubuntu-latest]
python-version: [3.8, 3.9, '3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Python dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install .[test]
- name: Test with pytest
run: |
python3 -m pytest

140
.github/workflows/tutorial_exporter.yml vendored Normal file
View File

@@ -0,0 +1,140 @@
name: "Export Tutorials"
on:
workflow_dispatch:
push:
branches:
- "dev"
- "master"
paths:
- 'tutorials/**/*.ipynb'
jobs:
# run on push
export_tutorials_on_push:
if: ${{ github.event_name == 'push' }}
permissions: write-all
runs-on: ubuntu-latest
env:
TUTORIAL_TIMEOUT: 1200s
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Install dependencies
run: |
# Dependencies for tutorials
python3 -m pip install --upgrade pip .[tutorial] black[jupyter]
- name: Setup FFmpeg
uses: FedericoCarboni/setup-ffmpeg@v2
- id: files
uses: jitterbit/get-changed-files@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
format: space-delimited
- name: Configure git
run: |
git config user.name "github-actions[bot]"
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
- name: Run formatter
run: black tutorials/
- name: Export tutorials to .py and .html
run: |
set -x
for file in ${{ steps.files.outputs.all }}; do
if [[ $file == *.ipynb ]]; then
filename=$(basename $file)
pyfilename=$(echo ${filename%?????})py
timeout --signal=SIGKILL $TUTORIAL_TIMEOUT python -Xfrozen_modules=off -m jupyter nbconvert $file --to python --output $pyfilename --output-dir=$(dirname $file)
htmlfilename=$(echo ${filename%?????} | sed -e 's/-//g')html
htmldir="docs/source"/$(echo ${file%??????????????} | sed -e 's/-//g')
timeout --signal=SIGKILL $TUTORIAL_TIMEOUT python -Xfrozen_modules=off -m jupyter nbconvert --execute $file --to html --output $htmlfilename --output-dir=$htmldir
fi
done
set +x
- uses: benjlevesque/short-sha@v2.1
id: short-sha
- name: Remove unwanted files
run: |
rm -rf build/ tutorials/tutorial4/data/
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5.0.2
with:
labels: maintenance
title: Export tutorial changed in ${{ steps.short-sha.outputs.sha }}
branch: export-tutorial-${{ steps.short-sha.outputs.sha }}
base: ${{ github.head_ref }}
commit-message: export tutorials changed in ${{ steps.short-sha.outputs.sha }}
delete-branch: true
# run on workflow_dispatch
export_tutorials_workflow_dispatch:
if: ${{ github.event_name == 'workflow_dispatch' }}
permissions: write-all
runs-on: ubuntu-latest
env:
TUTORIAL_TIMEOUT: 1200s
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip .[tutorial] black[jupyter]
- name: Setup FFmpeg
uses: FedericoCarboni/setup-ffmpeg@v2
- name: Configure git
run: |
git config user.name "github-actions[bot]"
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
- name: Run formatter
run: black tutorials/
- name: Export all tutorials to .py and .html
run: |
set -x
# Find all .ipynb files in the tutorials directory
for file in $(find tutorials -type f -name "*.ipynb"); do
filename=$(basename $file)
pyfilename="${filename%.ipynb}.py"
timeout --signal=SIGKILL $TUTORIAL_TIMEOUT python -Xfrozen_modules=off -m jupyter nbconvert $file --to python --output $pyfilename --output-dir=$(dirname $file)
htmlfilename="${filename%.ipynb}.html"
htmldir="docs/source"/$(dirname $file)
timeout --signal=SIGKILL $TUTORIAL_TIMEOUT python -Xfrozen_modules=off -m jupyter nbconvert --execute $file --to html --output $htmlfilename --output-dir=$htmldir
done
set +x
- uses: benjlevesque/short-sha@v2.1
id: short-sha
- name: Remove unwanted files
run: |
rm -rf build/ tutorials/tutorial4/data/
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5.0.2
with:
labels: maintenance
title: Export tutorial changed in ${{ steps.short-sha.outputs.sha }}
branch: export-tutorial-${{ steps.short-sha.outputs.sha }}
base: ${{ github.head_ref }}
commit-message: export tutorials changed in ${{ steps.short-sha.outputs.sha }}
delete-branch: true

9
.gitignore vendored
View File

@@ -139,3 +139,12 @@ cython_debug/
# Lightning logs dir
**lightning_logs
# Tutorial logs dir
**tutorial_logs
# tmp dir
**tmp*
# Avoid add of DS_Store files
**.DS_Store

View File

@@ -214,6 +214,7 @@ logging-modules=logging
[FORMAT]
# Expected format of line ending, e.g. empty (any line ending), LF or CRLF.
expected-line-ending-format=
@@ -249,8 +250,6 @@ single-line-if-stmt=no
[BASIC]
# Allow redefinition of input builtins
allowed-redefined-builtins=input
# Naming hint for argument names
argument-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
@@ -402,7 +401,7 @@ max-returns=6
max-statements=50
# Minimum number of public methods for a class (see R0903).
min-public-methods=0
min-public-methods=2
[CLASSES]

128
CODE_OF_CONDUCT.md Normal file
View File

@@ -0,0 +1,128 @@
# Contributor Covenant Code of Conduct
## Our Pledge
We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.
We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.
## Our Standards
Examples of behavior that contributes to a positive environment for our
community include:
* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community
Examples of unacceptable behavior include:
* The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Enforcement Responsibilities
Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.
Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.
## Scope
This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
pina.mathlab@gmail.com.
All complaints will be reviewed and investigated promptly and fairly.
All community leaders are obligated to respect the privacy and security of the
reporter of any incident.
## Enforcement Guidelines
Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:
### 1. Correction
**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.
**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.
### 2. Warning
**Community Impact**: A violation through a single incident or series
of actions.
**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.
### 3. Temporary Ban
**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.
**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.
### 4. Permanent Ban
**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.
**Consequence**: A permanent ban from any sort of public interaction within
the community.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).
[homepage]: https://www.contributor-covenant.org
For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.

View File

@@ -1,40 +1,94 @@
## How to contribute
We'd love to accept your patches and contributions to this project. There are just a few small guidelines you need to follow.
# Contributing to PINA
### Submitting a patch
First off, thanks for taking the time to contribute to **PINA**! 🎉 Your help makes the project better for everyone. This document outlines the process for contributing, reporting issues, suggesting features, and submitting pull requests.
1. It's generally best to start by opening a new issue describing the bug or
feature you're intending to fix. Even if you think it's relatively minor,
it's helpful to know what people are working on. Mention in the initial
issue that you are planning to work on that bug or feature so that it can
be assigned to you.
---
2. Follow the normal process of [forking][] the project, and setup a new
branch to work in. It's important that each group of changes be done in
separate branches in order to ensure that a pull request only includes the
commits related to that bug or feature.
## Table of Contents
3. To ensure properly formatted code, please make sure to use 4
spaces to indent the code. The easy way is to run on your bash the provided
script: ./code_formatter.sh. You should also run [pylint][] over your code.
It's not strictly necessary that your code be completely "lint-free",
but this will help you find common style issues.
1. [How to Contribute](#how-to-contribute)
2. [Reporting Bugs](#reporting-bugs)
3. [Suggesting Enhancements](#suggesting-enhancements)
4. [Pull Request Process](#pull-request-process)
5. [Code Style & Guidelines](#code-style--guidelines)
6. [Community Standards](#community-standards)
4. Any significant changes should almost always be accompanied by tests. The
project already has good test coverage, so look at some of the existing
tests if you're unsure how to go about it. We're using [coveralls][] that
is an invaluable tools for seeing which parts of your code aren't being
exercised by your tests.
---
5. Do your best to have [well-formed commit messages][] for each change.
This provides consistency throughout the project, and ensures that commit
messages are able to be formatted properly by various git tools.
## How to Contribute
6. Finally, push the commits to your fork and submit a [pull request][]. Please,
remember to rebase properly in order to maintain a clean, linear git history.
You can contribute in several ways:
- Reporting bugs
- Suggesting features/enhancements
- Submitting fixes or improvements via Pull Requests (PRs)
- Improving documentation
[forking]: https://help.github.com/articles/fork-a-repo
[pylint]: https://www.pylint.org/
[coveralls]: https://coveralls.io
[well-formed commit messages]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
[pull request]: https://help.github.com/articles/creating-a-pull-request
We encourage all contributions, big or small!
---
## Reporting Bugs
If you find a bug, please open an [issue](https://github.com/mathLab/PINA/issues) and include:
- A clear and descriptive title
- Steps to reproduce the problem
- What you expected to happen
- What actually happened
- Any relevant logs, screenshots, or error messages
- Environment info (OS, Python version, dependencies, etc.)
---
## Suggesting Enhancements
We welcome new ideas! If you have an idea to improve PINA:
1. Check the [issue tracker](https://github.com/mathLab/PINA/issues) or the [discussions](https://github.com/mathLab/PINA/discussions) to see if someone has already suggested it.
2. If not, open a new issue describing:
- The enhancement you'd like
- Why it would be useful
- Any ideas on how to implement it (optional but helpful)
3. If you are not sure about (something of) the enhancement, we suggest to open a discussion to collaborate on it with the PINA community
---
## Pull Request Process
Before submitting a PR:
1. Ensure theres an open issue related to your contribution (or create one).
2. [Fork](https://help.github.com/articles/fork-a-repo) the repository and create a new branch from `master`:
```bash
git checkout -b feature/my-feature
```
3. Make your changes:
- Write clear, concise, and well-documented code
- Add or update tests where appropriate
- Update documentation if necessary
4. Verify your changes by running tests:
```bash
pytest
```
5. Properly format your code. If you want save time, simply run:
```bash
bash code_formatter.sh
```
7. Submit a [pull request](https://help.github.com/articles/creating-a-pull-request) with a clear explanation of your changes and reference the related issue if applicable.
### Pull Request Checklist
- [ ] Code follows the projects style guidelines
- [ ] Tests have been added or updated
- [ ] Documentation has been updated if necessary
- [ ] Pull request is linked to an open issue (if applicable)
---
## Code Style & Guidelines
- Follow PEP8 for Python code.
- Use descriptive commit messages (e.g. `Fix parser crash on empty input`).
- Write clear docstrings for public classes, methods, and functions.
- Keep functions small and focused; do one thing and do it well.
---
## Community Standards
By participating in this project, you agree to abide by our Code of Conduct. We are committed to maintaining a welcoming and inclusive community.

View File

@@ -195,12 +195,20 @@ class Poisson(SpatialProblem):
laplacian_u = laplacian(output_, input_, components=['u'], d=['x', 'y'])
return laplacian_u - force_term
domains = {
'g1': CartesianDomain({'x': [0, 1], 'y': 1}),
'g2': CartesianDomain({'x': [0, 1], 'y': 0}),
'g3': CartesianDomain({'x': 1, 'y': [0, 1]}),
'g4': CartesianDomain({'x': 0, 'y': [0, 1]}),
'D': CartesianDomain({'x': [0, 1], 'y': [0, 1]})
}
conditions = {
'gamma1': Condition(location=CartesianDomain({'x': [0, 1], 'y': 1}), equation=FixedValue(0.)),
'gamma2': Condition(location=CartesianDomain({'x': [0, 1], 'y': 0}), equation=FixedValue(0.)),
'gamma3': Condition(location=CartesianDomain({'x': 1, 'y': [0, 1]}), equation=FixedValue(0.)),
'gamma4': Condition(location=CartesianDomain({'x': 0, 'y': [0, 1]}), equation=FixedValue(0.)),
'D': Condition(location=CartesianDomain({'x': [0, 1], 'y': [0, 1]}), equation=Equation(laplace_equation)),
'gamma1': Condition(domain='g1', equation=FixedValue(0.)),
'gamma2': Condition(domain='g2', equation=FixedValue(0.)),
'gamma3': Condition(domain='g3', equation=FixedValue(0.)),
'gamma4': Condition(domain='g4', equation=FixedValue(0.)),
'D': Condition(domain='D', equation=Equation(laplace_equation)),
}
```
@@ -215,7 +223,8 @@ model = FeedForward(
output_dimensions=len(problem.output_variables),
input_dimensions=len(problem.input_variables)
)
pinn = PINN(problem, model, optimizer_kwargs={'lr':0.006, 'weight_decay':1e-8})
optimizer = TorchOptimizer(torch.optim.Adam, lr=0.006, weight_decay=1e-8)
pinn = PINN(problem, model, optimizer=optimizer)
trainer = Trainer(pinn, max_epochs=1000, accelerator='gpu', enable_model_summary=False, batch_size=8)
# train

18
SECURITY.md Normal file
View File

@@ -0,0 +1,18 @@
# Security Policy
Security and bug fixes are generally provided only for the last minor version. Fixes are released either as part of the next minor version or as an on-demand patch version.
Security fixes are given priority and might be enough to cause a new version to be released.
## Supported Versions
| Version | Supported |
| ------- | ------------------ |
| 0.2 | ✅ |
| 0.1 | ✅ |
## Reporting a Vulnerability
To ensure vulnerability reports reach the maintainers as quickly as possible, the preferred way is to use the ["Report a vulnerability"](https://github.com/mathLab/PINA/security/advisories/new) button under the "Security" tab of the associated GitHub project. This creates a private communication channel between the reporter and the maintainers.

View File

@@ -1,7 +1,7 @@
Cite PINA
==============
If PINA has been significant in your research, and you would like to acknowledge the project in your academic publication,
If **PINA** has been significant in your research, and you would like to acknowledge the project in your academic publication,
we suggest citing the following paper:
*Coscia, D., Ivagnes, A., Demo, N., & Rozza, G. (2023). Physics-Informed Neural networks for Advanced modeling. Journal of Open Source Software, 8(87), 5352.*

View File

@@ -0,0 +1,100 @@
Contributing to PINA
=====================
First off, thanks for taking the time to contribute to **PINA**! 🎉 Your help makes the project better for everyone. This document outlines the process for contributing, reporting issues, suggesting features, and submitting pull requests.
Table of Contents
------------------------
1. `How to Contribute`_
2. `Reporting Bugs`_
3. `Suggesting Enhancements`_
4. `Pull Request Process`_
5. `Code Style & Guidelines`_
6. `Community Standards`_
How to Contribute
------------------------
You can contribute in several ways:
- Reporting bugs
- Suggesting features/enhancements
- Submitting fixes or improvements via Pull Requests (PRs)
- Improving documentation
We encourage all contributions, big or small!
Reporting Bugs
------------------------
If you find a bug, please open an `issue <https://github.com/mathLab/PINA/issues>`_ and include:
- A clear and descriptive title
- Steps to reproduce the problem
- What you expected to happen
- What actually happened
- Any relevant logs, screenshots, or error messages
- Environment info (OS, Python version, dependencies, etc.)
Suggesting Enhancements
------------------------
We welcome new ideas! If you have an idea to improve PINA:
1. Check the `issue tracker <https://github.com/mathLab/PINA/issues>`_ or the `discussions <https://github.com/mathLab/PINA/discussions>`_ to see if someone has already suggested it.
2. If not, open a new issue describing:
- The enhancement you'd like
- Why it would be useful
- Any ideas on how to implement it (optional but helpful)
3. If you are not sure about (something of) the enhancement, we suggest opening a discussion to collaborate on it with the PINA community.
Pull Request Process
------------------------
Before submitting a PR:
1. Ensure theres an open issue related to your contribution (or create one).
2. `Fork <https://help.github.com/articles/fork-a-repo>`_ the repository and create a new branch from ``master``:
.. code-block:: bash
git checkout -b feature/my-feature
3. Make your changes:
- Write clear, concise, and well-documented code
- Add or update tests where appropriate
- Update documentation if necessary
4. Verify your changes by running tests:
.. code-block:: bash
pytest
5. Properly format your code. If you want to save time, simply run:
.. code-block:: bash
bash code_formatter.sh
7. Submit a `pull request <https://help.github.com/articles/creating-a-pull-request>`_ with a clear explanation of your changes and reference the related issue if applicable.
Pull Request Checklist
1. Code follows the projects style guidelines
2. Tests have been added or updated
3. Documentation has been updated if necessary
4. Pull request is linked to an open issue (if applicable)
Code Style & Guidelines
------------------------
- Follow PEP8 for Python code.
- Use descriptive commit messages (e.g. ``Fix parser crash on empty input``).
- Write clear docstrings for public classes, methods, and functions.
- Keep functions small and focused; do one thing and do it well.
Community Standards
------------------------
By participating in this project, you agree to abide by our Code of Conduct. We are committed to maintaining a welcoming and inclusive community.

View File

@@ -11,40 +11,77 @@ The high-level structure of the package is depicted in our API.
The pipeline to solve differential equations with PINA follows just five steps:
1. Define the `Problem`_ the user aim to solve
2. Generate data using built in `Geometries`_, or load high level simulation results as :doc:`LabelTensor <label_tensor>`
1. Define the `Problems`_ the user aim to solve
2. Generate data using built in `Geometrical Domains`_, or load high level simulation results as :doc:`LabelTensor <label_tensor>`
3. Choose or build one or more `Models`_ to solve the problem
4. Choose a solver across PINA available `Solvers`_, or build one using the :doc:`SolverInterface <solvers/solver_interface>`
5. Train the model with the PINA :doc:`Trainer <solvers/solver_interface>`, enhance the train with `Callbacks`_
4. Choose a solver across PINA available `Solvers`_, or build one using the :doc:`SolverInterface <solver/solver_interface>`
5. Train the model with the PINA :doc:`Trainer <solver/solver_interface>`, enhance the train with `Callbacks`_
PINA Features
--------------
Trainer, Dataset and Datamodule
--------------------------------
.. toctree::
:titlesonly:
Trainer <trainer.rst>
Dataset <data/dataset.rst>
DataModule <data/data_module.rst>
Data Types
------------
.. toctree::
:titlesonly:
LabelTensor <label_tensor.rst>
Condition <condition.rst>
Trainer <trainer.rst>
Plotter <plotter.rst>
Graph <graph/graph.rst>
LabelBatch <graph/label_batch.rst>
Graphs Structures
------------------
.. toctree::
:titlesonly:
GraphBuilder <graph/graph_builder.rst>
RadiusGraph <graph/radius_graph.rst>
KNNGraph <graph/knn_graph.rst>
Conditions
-------------
.. toctree::
:titlesonly:
ConditionInterface <condition/condition_interface.rst>
Condition <condition/condition.rst>
DataCondition <condition/data_condition.rst>
DomainEquationCondition <condition/domain_equation_condition.rst>
InputEquationCondition <condition/input_equation_condition.rst>
InputTargetCondition <condition/input_target_condition.rst>
Solvers
--------------
.. toctree::
:titlesonly:
SolverInterface <solvers/solver_interface.rst>
PINNInterface <solvers/basepinn.rst>
PINN <solvers/pinn.rst>
GPINN <solvers/gpinn.rst>
CausalPINN <solvers/causalpinn.rst>
CompetitivePINN <solvers/competitivepinn.rst>
SAPINN <solvers/sapinn.rst>
RBAPINN <solvers/rba_pinn.rst>
Supervised solver <solvers/supervised.rst>
ReducedOrderModelSolver <solvers/rom.rst>
GAROM <solvers/garom.rst>
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>
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>
Models
@@ -54,36 +91,60 @@ Models
:titlesonly:
:maxdepth: 5
Network <models/network.rst>
KernelNeuralOperator <models/base_no.rst>
FeedForward <models/fnn.rst>
MultiFeedForward <models/multifeedforward.rst>
ResidualFeedForward <models/fnn_residual.rst>
Spline <models/spline.rst>
DeepONet <models/deeponet.rst>
MIONet <models/mionet.rst>
FourierIntegralKernel <models/fourier_kernel.rst>
FNO <models/fno.rst>
AveragingNeuralOperator <models/avno.rst>
LowRankNeuralOperator <models/lno.rst>
FeedForward <model/feed_forward.rst>
MultiFeedForward <model/multi_feed_forward.rst>
ResidualFeedForward <model/residual_feed_forward.rst>
Spline <model/spline.rst>
DeepONet <model/deeponet.rst>
MIONet <model/mionet.rst>
KernelNeuralOperator <model/kernel_neural_operator.rst>
FourierIntegralKernel <model/fourier_integral_kernel.rst>
FNO <model/fourier_neural_operator.rst>
AveragingNeuralOperator <model/average_neural_operator.rst>
LowRankNeuralOperator <model/low_rank_neural_operator.rst>
GraphNeuralOperator <model/graph_neural_operator.rst>
GraphNeuralKernel <model/graph_neural_operator_integral_kernel.rst>
Layers
Blocks
-------------
.. toctree::
:titlesonly:
Residual layer <layers/residual.rst>
EnhancedLinear layer <layers/enhanced_linear.rst>
Spectral convolution <layers/spectral.rst>
Fourier layers <layers/fourier.rst>
Averaging layer <layers/avno_layer.rst>
Low Rank layer <layers/lowrank_layer.rst>
Continuous convolution <layers/convolution.rst>
Proper Orthogonal Decomposition <layers/pod.rst>
Periodic Boundary Condition Embedding <layers/pbc_embedding.rst>
Fourier Feature Embedding <layers/fourier_embedding.rst>
Radial Basis Function Interpolation <layers/rbf_layer.rst>
Residual Block <model/block/residual.rst>
EnhancedLinear Block <model/block/enhanced_linear.rst>
Spectral Convolution Block <model/block/spectral.rst>
Fourier Block <model/block/fourier_block.rst>
Averaging Block <model/block/average_neural_operator_block.rst>
Low Rank Block <model/block/low_rank_block.rst>
Graph Neural Operator Block <model/block/gno_block.rst>
Continuous Convolution Interface <model/block/convolution_interface.rst>
Continuous Convolution Block <model/block/convolution.rst>
Orthogonal Block <model/block/orthogonal.rst>
Reduction and Embeddings
--------------------------
.. toctree::
:titlesonly:
Proper Orthogonal Decomposition <model/block/pod_block.rst>
Periodic Boundary Condition Embedding <model/block/pbc_embedding.rst>
Fourier Feature Embedding <model/block/fourier_embedding.rst>
Radial Basis Function Interpolation <model/block/rbf_block.rst>
Optimizers and Schedulers
--------------------------
.. toctree::
:titlesonly:
Optimizer <optim/optimizer_interface.rst>
Scheduler <optim/scheduler_interface.rst>
TorchOptimizer <optim/torch_optimizer.rst>
TorchScheduler <optim/torch_scheduler.rst>
Adaptive Activation Functions
-------------------------------
@@ -91,77 +152,97 @@ Adaptive Activation Functions
.. toctree::
:titlesonly:
Adaptive Function Interface <adaptive_functions/AdaptiveFunctionInterface.rst>
Adaptive ReLU <adaptive_functions/AdaptiveReLU.rst>
Adaptive Sigmoid <adaptive_functions/AdaptiveSigmoid.rst>
Adaptive Tanh <adaptive_functions/AdaptiveTanh.rst>
Adaptive SiLU <adaptive_functions/AdaptiveSiLU.rst>
Adaptive Mish <adaptive_functions/AdaptiveMish.rst>
Adaptive ELU <adaptive_functions/AdaptiveELU.rst>
Adaptive CELU <adaptive_functions/AdaptiveCELU.rst>
Adaptive GELU <adaptive_functions/AdaptiveGELU.rst>
Adaptive Softmin <adaptive_functions/AdaptiveSoftmin.rst>
Adaptive Softmax <adaptive_functions/AdaptiveSoftmax.rst>
Adaptive SIREN <adaptive_functions/AdaptiveSIREN.rst>
Adaptive Exp <adaptive_functions/AdaptiveExp.rst>
Adaptive Function Interface <adaptive_function/AdaptiveActivationFunctionInterface.rst>
Adaptive ReLU <adaptive_function/AdaptiveReLU.rst>
Adaptive Sigmoid <adaptive_function/AdaptiveSigmoid.rst>
Adaptive Tanh <adaptive_function/AdaptiveTanh.rst>
Adaptive SiLU <adaptive_function/AdaptiveSiLU.rst>
Adaptive Mish <adaptive_function/AdaptiveMish.rst>
Adaptive ELU <adaptive_function/AdaptiveELU.rst>
Adaptive CELU <adaptive_function/AdaptiveCELU.rst>
Adaptive GELU <adaptive_function/AdaptiveGELU.rst>
Adaptive Softmin <adaptive_function/AdaptiveSoftmin.rst>
Adaptive Softmax <adaptive_function/AdaptiveSoftmax.rst>
Adaptive SIREN <adaptive_function/AdaptiveSIREN.rst>
Adaptive Exp <adaptive_function/AdaptiveExp.rst>
Equations and Operators
-------------------------
Equations and Differential Operators
---------------------------------------
.. toctree::
:titlesonly:
Equations <equations.rst>
Differential Operators <operators.rst>
EquationInterface <equation/equation_interface.rst>
Equation <equation/equation.rst>
SystemEquation <equation/system_equation.rst>
Equation Factory <equation/equation_factory.rst>
Differential Operators <operator.rst>
Problem
Problems
--------------
.. toctree::
:titlesonly:
AbstractProblem <problem/abstractproblem.rst>
SpatialProblem <problem/spatialproblem.rst>
TimeDependentProblem <problem/timedepproblem.rst>
ParametricProblem <problem/parametricproblem.rst>
AbstractProblem <problem/abstract_problem.rst>
InverseProblem <problem/inverse_problem.rst>
ParametricProblem <problem/parametric_problem.rst>
SpatialProblem <problem/spatial_problem.rst>
TimeDependentProblem <problem/time_dependent_problem.rst>
Geometries
-----------------
Problems Zoo
--------------
.. toctree::
:titlesonly:
Location <geometry/location.rst>
CartesianDomain <geometry/cartesian.rst>
EllipsoidDomain <geometry/ellipsoid.rst>
SimplexDomain <geometry/simplex.rst>
AdvectionProblem <problem/zoo/advection.rst>
AllenCahnProblem <problem/zoo/allen_cahn.rst>
DiffusionReactionProblem <problem/zoo/diffusion_reaction.rst>
HelmholtzProblem <problem/zoo/helmholtz.rst>
InversePoisson2DSquareProblem <problem/zoo/inverse_poisson_2d_square.rst>
Poisson2DSquareProblem <problem/zoo/poisson_2d_square.rst>
SupervisedProblem <problem/zoo/supervised_problem.rst>
Geometry set operations
------------------------
Geometrical Domains
--------------------
.. toctree::
:titlesonly:
OperationInterface <geometry/operation_interface.rst>
Union <geometry/union_domain.rst>
Intersection <geometry/intersection_domain.rst>
Difference <geometry/difference_domain.rst>
Exclusion <geometry/exclusion_domain.rst>
Domain <domain/domain.rst>
CartesianDomain <domain/cartesian.rst>
EllipsoidDomain <domain/ellipsoid.rst>
SimplexDomain <domain/simplex.rst>
Domain Operations
------------------
.. toctree::
:titlesonly:
OperationInterface <domain/operation_interface.rst>
Union <domain/union_domain.rst>
Intersection <domain/intersection_domain.rst>
Difference <domain/difference_domain.rst>
Exclusion <domain/exclusion_domain.rst>
Callbacks
--------------------
-----------
.. toctree::
:titlesonly:
Processing Callbacks <callbacks/processing_callbacks.rst>
Optimizer Callbacks <callbacks/optimizer_callbacks.rst>
Adaptive Refinment Callback <callbacks/adaptive_refinment_callbacks.rst>
Processing callback <callback/processing_callback.rst>
Optimizer callback <callback/optimizer_callback.rst>
Refinment callback <callback/adaptive_refinment_callback.rst>
Weighting callback <callback/linear_weight_update_callback.rst>
Metrics and Losses
--------------------
Losses and Weightings
---------------------
.. toctree::
:titlesonly:
@@ -169,3 +250,6 @@ Metrics and Losses
LossInterface <loss/loss_interface.rst>
LpLoss <loss/lploss.rst>
PowerLoss <loss/powerloss.rst>
WeightingInterface <loss/weighting_interface.rst>
ScalarWeighting <loss/scalar_weighting.rst>
NeuralTangentKernelWeighting <loss/ntk_weighting.rst>

View File

@@ -1,37 +0,0 @@
How to contribute
=================
We'd love to accept your patches and contributions to this project. There are just a few small guidelines you need to follow.
Submitting a patch
------------------
1. It's generally best to start by opening a new issue describing the bug or
feature you're intending to fix. Even if you think it's relatively minor,
it's helpful to know what people are working on. Mention in the initial
issue that you are planning to work on that bug or feature so that it can
be assigned to you.
2. Follow the normal process of forking the project, and setup a new
branch to work in. It's important that each group of changes be done in
separate branches in order to ensure that a pull request only includes the
commits related to that bug or feature.
3. To ensure properly formatted code, please make sure to use 4
spaces to indent the code. The easy way is to run on your bash the provided
script: ./code_formatter.sh. You should also run pylint over your code.
It's not strictly necessary that your code be completely "lint-free",
but this will help you find common style issues.
4. Any significant changes should almost always be accompanied by tests. The
project already has good test coverage, so look at some of the existing
tests if you're unsure how to go about it. We're using coveralls that
is an invaluable tools for seeing which parts of your code aren't being
exercised by your tests.
5. Do your best to have well-formed commit messages for each change.
This provides consistency throughout the project, and ensures that commit
messages are able to be formatted properly by various git tools.
6. Finally, push the commits to your fork and submit a pull request. Please,
remember to rebase properly in order to maintain a clean, linear git history.

View File

@@ -1,46 +0,0 @@
PINA Tutorials
==============
In this folder we collect useful tutorials in order to understand the principles and the potential of **PINA**.
Getting started with PINA
-------------------------
.. toctree::
:maxdepth: 3
:titlesonly:
Introduction to PINA for Physics Informed Neural Networks training <tutorials/tutorial1/tutorial.rst>
Introduction to PINA Equation class <tutorials/tutorial12/tutorial.rst>
PINA and PyTorch Lightning, training tips and visualizations <tutorials/tutorial11/tutorial.rst>
Building custom geometries with PINA Location class <tutorials/tutorial6/tutorial.rst>
Physics Informed Neural Networks
--------------------------------
.. toctree::
:maxdepth: 3
:titlesonly:
Two dimensional Poisson problem using Extra Features Learning<tutorials/tutorial2/tutorial.rst>
Two dimensional Wave problem with hard constraint<tutorials/tutorial3/tutorial.rst>
Resolution of a 2D Poisson inverse problem<tutorials/tutorial7/tutorial.rst>
Periodic Boundary Conditions for Helmotz Equation<tutorials/tutorial9/tutorial.rst>
Multiscale PDE learning with Fourier Feature Network<tutorials/tutorial13/tutorial.rst>
Neural Operator Learning
------------------------
.. toctree::
:maxdepth: 3
:titlesonly:
Two dimensional Darcy flow using the Fourier Neural Operator<tutorials/tutorial5/tutorial.rst>
Time dependent Kuramoto Sivashinsky equation using the Averaging Neural Operator<tutorials/tutorial10/tutorial.rst>
Supervised Learning
-------------------
.. toctree::
:maxdepth: 3
:titlesonly:
Unstructured convolutional autoencoder via continuous convolution<tutorials/tutorial4/tutorial.rst>
POD-RBF and POD-NN for reduced order modeling<tutorials/tutorial8/tutorial.rst>

View File

@@ -0,0 +1,8 @@
AdaptiveActivationFunctionInterface
=======================================
.. currentmodule:: pina.adaptive_function.adaptive_function_interface
.. automodule:: pina.adaptive_function.adaptive_function_interface
:members:
:show-inheritance:

View File

@@ -1,7 +1,7 @@
AdaptiveCELU
============
.. currentmodule:: pina.adaptive_functions.adaptive_func
.. currentmodule:: pina.adaptive_function.adaptive_function
.. autoclass:: AdaptiveCELU
:members:

View File

@@ -1,7 +1,7 @@
AdaptiveELU
===========
.. currentmodule:: pina.adaptive_functions.adaptive_func
.. currentmodule:: pina.adaptive_function.adaptive_function
.. autoclass:: AdaptiveELU
:members:

View File

@@ -1,7 +1,7 @@
AdaptiveExp
===========
.. currentmodule:: pina.adaptive_functions.adaptive_func
.. currentmodule:: pina.adaptive_function.adaptive_function
.. autoclass:: AdaptiveExp
:members:

View File

@@ -1,7 +1,7 @@
AdaptiveGELU
============
.. currentmodule:: pina.adaptive_functions.adaptive_func
.. currentmodule:: pina.adaptive_function.adaptive_function
.. autoclass:: AdaptiveGELU
:members:

View File

@@ -1,7 +1,7 @@
AdaptiveMish
============
.. currentmodule:: pina.adaptive_functions.adaptive_func
.. currentmodule:: pina.adaptive_function.adaptive_function
.. autoclass:: AdaptiveMish
:members:

View File

@@ -1,7 +1,7 @@
AdaptiveReLU
============
.. currentmodule:: pina.adaptive_functions.adaptive_func
.. currentmodule:: pina.adaptive_function.adaptive_function
.. autoclass:: AdaptiveReLU
:members:

View File

@@ -1,7 +1,7 @@
AdaptiveSIREN
=============
.. currentmodule:: pina.adaptive_functions.adaptive_func
.. currentmodule:: pina.adaptive_function.adaptive_function
.. autoclass:: AdaptiveSIREN
:members:

View File

@@ -1,7 +1,7 @@
AdaptiveSiLU
============
.. currentmodule:: pina.adaptive_functions.adaptive_func
.. currentmodule:: pina.adaptive_function.adaptive_function
.. autoclass:: AdaptiveSiLU
:members:

View File

@@ -1,7 +1,7 @@
AdaptiveSigmoid
===============
.. currentmodule:: pina.adaptive_functions.adaptive_func
.. currentmodule:: pina.adaptive_function.adaptive_function
.. autoclass:: AdaptiveSigmoid
:members:

View File

@@ -1,7 +1,7 @@
AdaptiveSoftmax
===============
.. currentmodule:: pina.adaptive_functions.adaptive_func
.. currentmodule:: pina.adaptive_function.adaptive_function
.. autoclass:: AdaptiveSoftmax
:members:

View File

@@ -1,7 +1,7 @@
AdaptiveSoftmin
===============
.. currentmodule:: pina.adaptive_functions.adaptive_func
.. currentmodule:: pina.adaptive_function.adaptive_function
.. autoclass:: AdaptiveSoftmin
:members:

View File

@@ -1,7 +1,7 @@
AdaptiveTanh
============
.. currentmodule:: pina.adaptive_functions.adaptive_func
.. currentmodule:: pina.adaptive_function.adaptive_function
.. autoclass:: AdaptiveTanh
:members:

View File

@@ -1,8 +0,0 @@
AdaptiveActivationFunctionInterface
=======================================
.. currentmodule:: pina.adaptive_functions.adaptive_func_interface
.. automodule:: pina.adaptive_functions.adaptive_func_interface
:members:
:show-inheritance:

View File

@@ -0,0 +1,7 @@
Refinments callbacks
=======================
.. currentmodule:: pina.callback.adaptive_refinement_callback
.. autoclass:: R3Refinement
:members:
:show-inheritance:

View File

@@ -0,0 +1,7 @@
Weighting callbacks
========================
.. currentmodule:: pina.callback.linear_weight_update_callback
.. autoclass:: LinearWeightUpdate
:members:
:show-inheritance:

View File

@@ -1,7 +1,7 @@
Optimizer callbacks
=====================
.. currentmodule:: pina.callbacks.optimizer_callbacks
.. currentmodule:: pina.callback.optimizer_callback
.. autoclass:: SwitchOptimizer
:members:
:show-inheritance:

View File

@@ -1,7 +1,7 @@
Processing callbacks
=======================
.. currentmodule:: pina.callbacks.processing_callbacks
.. currentmodule:: pina.callback.processing_callback
.. autoclass:: MetricTracker
:members:
:show-inheritance:

View File

@@ -1,7 +0,0 @@
Adaptive Refinments callbacks
===============================
.. currentmodule:: pina.callbacks.adaptive_refinment_callbacks
.. autoclass:: R3Refinement
:members:
:show-inheritance:

View File

@@ -1,7 +0,0 @@
Condition
=========
.. currentmodule:: pina.condition
.. autoclass:: Condition
:members:
:show-inheritance:

View File

@@ -0,0 +1,7 @@
Conditions
=============
.. currentmodule:: pina.condition.condition
.. autoclass:: Condition
:members:
:show-inheritance:

View File

@@ -0,0 +1,7 @@
ConditionInterface
======================
.. currentmodule:: pina.condition.condition_interface
.. autoclass:: ConditionInterface
:members:
:show-inheritance:

View File

@@ -0,0 +1,15 @@
Data Conditions
==================
.. currentmodule:: pina.condition.data_condition
.. autoclass:: DataCondition
:members:
:show-inheritance:
.. autoclass:: GraphDataCondition
:members:
:show-inheritance:
.. autoclass:: TensorDataCondition
:members:
:show-inheritance:

View File

@@ -0,0 +1,7 @@
Domain Equation Condition
===========================
.. currentmodule:: pina.condition.domain_equation_condition
.. autoclass:: DomainEquationCondition
:members:
:show-inheritance:

View File

@@ -0,0 +1,15 @@
Input Equation Condition
===========================
.. currentmodule:: pina.condition.input_equation_condition
.. autoclass:: InputEquationCondition
:members:
:show-inheritance:
.. autoclass:: InputTensorEquationCondition
:members:
:show-inheritance:
.. autoclass:: InputGraphEquationCondition
:members:
:show-inheritance:

View File

@@ -0,0 +1,23 @@
Input Target Condition
===========================
.. currentmodule:: pina.condition.input_target_condition
.. autoclass:: InputTargetCondition
:members:
:show-inheritance:
.. autoclass:: TensorInputTensorTargetCondition
:members:
:show-inheritance:
.. autoclass:: TensorInputGraphTargetCondition
:members:
:show-inheritance:
.. autoclass:: GraphInputTensorTargetCondition
:members:
:show-inheritance:
.. autoclass:: GraphInputGraphTargetCondition
:members:
:show-inheritance:

View File

@@ -0,0 +1,15 @@
DataModule
======================
.. currentmodule:: pina.data.data_module
.. autoclass:: Collator
:members:
:show-inheritance:
.. autoclass:: PinaDataModule
:members:
:show-inheritance:
.. autoclass:: PinaSampler
:members:
:show-inheritance:

View File

@@ -0,0 +1,19 @@
Dataset
======================
.. currentmodule:: pina.data.dataset
.. autoclass:: PinaDataset
:members:
:show-inheritance:
.. autoclass:: PinaDatasetFactory
:members:
:show-inheritance:
.. autoclass:: PinaGraphDataset
:members:
:show-inheritance:
.. autoclass:: PinaTensorDataset
:members:
:show-inheritance:

View File

@@ -1,8 +1,8 @@
CartesianDomain
======================
.. currentmodule:: pina.geometry.cartesian
.. currentmodule:: pina.domain.cartesian
.. automodule:: pina.geometry.cartesian
.. automodule:: pina.domain.cartesian
.. autoclass:: CartesianDomain
:members:

View File

@@ -1,8 +1,8 @@
Difference
======================
.. currentmodule:: pina.geometry.difference_domain
.. currentmodule:: pina.domain.difference_domain
.. automodule:: pina.geometry.difference_domain
.. automodule:: pina.domain.difference_domain
.. autoclass:: Difference
:members:

View File

@@ -0,0 +1,9 @@
Domain
===========
.. currentmodule:: pina.domain.domain_interface
.. automodule:: pina.domain.domain_interface
.. autoclass:: DomainInterface
:members:
:show-inheritance:

View File

@@ -1,8 +1,8 @@
EllipsoidDomain
======================
.. currentmodule:: pina.geometry.ellipsoid
.. currentmodule:: pina.domain.ellipsoid
.. automodule:: pina.geometry.ellipsoid
.. automodule:: pina.domain.ellipsoid
.. autoclass:: EllipsoidDomain
:members:

View File

@@ -1,8 +1,8 @@
Exclusion
======================
.. currentmodule:: pina.geometry.exclusion_domain
.. currentmodule:: pina.domain.exclusion_domain
.. automodule:: pina.geometry.exclusion_domain
.. automodule:: pina.domain.exclusion_domain
.. autoclass:: Exclusion
:members:

View File

@@ -1,8 +1,8 @@
Intersection
======================
.. currentmodule:: pina.geometry.intersection_domain
.. currentmodule:: pina.domain.intersection_domain
.. automodule:: pina.geometry.intersection_domain
.. automodule:: pina.domain.intersection_domain
.. autoclass:: Intersection
:members:

View File

@@ -1,8 +1,8 @@
OperationInterface
======================
.. currentmodule:: pina.geometry.operation_interface
.. currentmodule:: pina.domain.operation_interface
.. automodule:: pina.geometry.operation_interface
.. automodule:: pina.domain.operation_interface
.. autoclass:: OperationInterface
:members:

View File

@@ -1,8 +1,8 @@
SimplexDomain
======================
.. currentmodule:: pina.geometry.simplex
.. currentmodule:: pina.domain.simplex
.. automodule:: pina.geometry.simplex
.. automodule:: pina.domain.simplex
.. autoclass:: SimplexDomain
:members:

View File

@@ -1,8 +1,8 @@
Union
======================
.. currentmodule:: pina.geometry.union_domain
.. currentmodule:: pina.domain.union_domain
.. automodule:: pina.geometry.union_domain
.. automodule:: pina.domain.union_domain
.. autoclass:: Union
:members:

View File

@@ -0,0 +1,7 @@
Equation
==========
.. currentmodule:: pina.equation.equation
.. autoclass:: Equation
:members:
:show-inheritance:

View File

@@ -0,0 +1,19 @@
Equation Factory
==================
.. currentmodule:: pina.equation.equation_factory
.. autoclass:: FixedValue
:members:
:show-inheritance:
.. autoclass:: FixedGradient
:members:
:show-inheritance:
.. autoclass:: FixedFlux
:members:
:show-inheritance:
.. autoclass:: Laplace
:members:
:show-inheritance:

View File

@@ -0,0 +1,7 @@
Equation Interface
====================
.. currentmodule:: pina.equation.equation_interface
.. autoclass:: EquationInterface
:members:
:show-inheritance:

View File

@@ -0,0 +1,7 @@
System Equation
=================
.. currentmodule:: pina.equation.system_equation
.. autoclass:: SystemEquation
:members:
:show-inheritance:

View File

@@ -1,42 +0,0 @@
Equations
==========
Equations are used in PINA to make easy the training. During problem definition
each `equation` passed to a `Condition` object must be an `Equation` or `SystemEquation`.
An `Equation` is simply a wrapper over callable python functions, while `SystemEquation` is
a wrapper arounf a list of callable python functions. We provide a wide rage of already implemented
equations to ease the code writing, such as `FixedValue`, `Laplace`, and many more.
.. currentmodule:: pina.equation.equation_interface
.. autoclass:: EquationInterface
:members:
:show-inheritance:
.. currentmodule:: pina.equation.equation
.. autoclass:: Equation
:members:
:show-inheritance:
.. currentmodule:: pina.equation.system_equation
.. autoclass:: SystemEquation
:members:
:show-inheritance:
.. currentmodule:: pina.equation.equation_factory
.. autoclass:: FixedValue
:members:
:show-inheritance:
.. autoclass:: FixedGradient
:members:
:show-inheritance:
.. autoclass:: FixedFlux
:members:
:show-inheritance:
.. autoclass:: Laplace
:members:
:show-inheritance:

View File

@@ -1,9 +0,0 @@
Location
====================
.. currentmodule:: pina.geometry.location
.. automodule:: pina.geometry.location
.. autoclass:: Location
:members:
:show-inheritance:

View File

@@ -0,0 +1,9 @@
Graph
===========
.. currentmodule:: pina.graph
.. autoclass:: Graph
:members:
:private-members:
:show-inheritance:

View File

@@ -0,0 +1,9 @@
GraphBuilder
==============
.. currentmodule:: pina.graph
.. autoclass:: GraphBuilder
:members:
:private-members:
:show-inheritance:

View File

@@ -0,0 +1,9 @@
KNNGraph
===========
.. currentmodule:: pina.graph
.. autoclass:: KNNGraph
:members:
:private-members:
:show-inheritance:

View File

@@ -0,0 +1,9 @@
LabelBatch
===========
.. currentmodule:: pina.graph
.. autoclass:: LabelBatch
:members:
:private-members:
:show-inheritance:

View File

@@ -0,0 +1,9 @@
RadiusGraph
=============
.. currentmodule:: pina.graph
.. autoclass:: RadiusGraph
:members:
:private-members:
:show-inheritance:

View File

@@ -1,8 +0,0 @@
Averaging layers
====================
.. currentmodule:: pina.model.layers.avno_layer
.. autoclass:: AVNOBlock
:members:
:show-inheritance:
:noindex:

View File

@@ -1,8 +0,0 @@
Continuous convolution
=========================
.. currentmodule:: pina.model.layers.convolution_2d
.. autoclass:: ContinuousConvBlock
:members:
:show-inheritance:
:noindex:

View File

@@ -1,8 +0,0 @@
EnhancedLinear
=================
.. currentmodule:: pina.model.layers.residual
.. autoclass:: EnhancedLinear
:members:
:show-inheritance:
:noindex:

View File

@@ -1,8 +0,0 @@
Low Rank layer
====================
.. currentmodule:: pina.model.layers.lowrank_layer
.. autoclass:: LowRankBlock
:members:
:show-inheritance:
:noindex:

View File

@@ -1,7 +0,0 @@
PODBlock
======================
.. currentmodule:: pina.model.layers.pod
.. autoclass:: PODBlock
:members:
:show-inheritance:

View File

@@ -1,7 +0,0 @@
RBFBlock
======================
.. currentmodule:: pina.model.layers.rbf_layer
.. autoclass:: RBFBlock
:members:
:show-inheritance:

View File

@@ -1,8 +1,8 @@
LpLoss
LossInterface
===============
.. currentmodule:: pina.loss
.. currentmodule:: pina.loss.loss_interface
.. automodule:: pina.loss
.. automodule:: pina.loss.loss_interface
.. autoclass:: LossInterface
:members:

View File

@@ -1,9 +1,6 @@
LpLoss
===============
.. currentmodule:: pina.loss
.. automodule:: pina.loss
:no-index:
.. currentmodule:: pina.loss.lp_loss
.. autoclass:: LpLoss
:members:

View File

@@ -0,0 +1,9 @@
NeuralTangentKernelWeighting
=============================
.. currentmodule:: pina.loss.ntk_weighting
.. automodule:: pina.loss.ntk_weighting
.. autoclass:: NeuralTangentKernelWeighting
:members:
:show-inheritance:

View File

@@ -1,9 +1,6 @@
PowerLoss
====================
.. currentmodule:: pina.loss
.. automodule:: pina.loss
:no-index:
.. currentmodule:: pina.loss.power_loss
.. autoclass:: PowerLoss
:members:

View File

@@ -0,0 +1,9 @@
ScalarWeighting
===================
.. currentmodule:: pina.loss.scalar_weighting
.. automodule:: pina.loss.scalar_weighting
.. autoclass:: ScalarWeighting
:members:
:show-inheritance:

View File

@@ -0,0 +1,9 @@
WeightingInterface
===================
.. currentmodule:: pina.loss.weighting_interface
.. automodule:: pina.loss.weighting_interface
.. autoclass:: WeightingInterface
:members:
:show-inheritance:

View File

@@ -1,6 +1,6 @@
Averaging Neural Operator
==============================
.. currentmodule:: pina.model.avno
.. currentmodule:: pina.model.average_neural_operator
.. autoclass:: AveragingNeuralOperator
:members:

View File

@@ -0,0 +1,8 @@
Averaging Neural Operator Block
==================================
.. currentmodule:: pina.model.block.average_neural_operator_block
.. autoclass:: AVNOBlock
:members:
:show-inheritance:
:noindex:

View File

@@ -0,0 +1,8 @@
Continuous Convolution Block
===============================
.. currentmodule:: pina.model.block.convolution_2d
.. autoclass:: ContinuousConvBlock
:members:
:show-inheritance:
:noindex:

View File

@@ -0,0 +1,8 @@
Continuous Convolution Interface
==================================
.. currentmodule:: pina.model.block.convolution
.. autoclass:: BaseContinuousConv
:members:
:show-inheritance:
:noindex:

View File

@@ -0,0 +1,8 @@
EnhancedLinear Block
=====================
.. currentmodule:: pina.model.block.residual
.. autoclass:: EnhancedLinear
:members:
:show-inheritance:
:noindex:

View File

@@ -1,6 +1,6 @@
Fourier Layers
===================
.. currentmodule:: pina.model.layers.fourier
Fourier Neural Operator Block
======================================
.. currentmodule:: pina.model.block.fourier_block
.. autoclass:: FourierBlock1D

View File

@@ -1,6 +1,6 @@
Fourier Feature Embedding
=======================================
.. currentmodule:: pina.model.layers.embedding
.. currentmodule:: pina.model.block.embedding
.. autoclass:: FourierFeatureEmbedding
:members:

View File

@@ -0,0 +1,8 @@
Graph Neural Operator Block
===============================
.. currentmodule:: pina.model.block.gno_block
.. autoclass:: GNOBlock
:members:
:show-inheritance:
:noindex:

View File

@@ -0,0 +1,8 @@
Low Rank Neural Operator Block
=================================
.. currentmodule:: pina.model.block.low_rank_block
.. autoclass:: LowRankBlock
:members:
:show-inheritance:
:noindex:

View File

@@ -1,6 +1,6 @@
OrthogonalBlock
Orthogonal Block
======================
.. currentmodule:: pina.model.layers.orthogonal
.. currentmodule:: pina.model.block.orthogonal
.. autoclass:: OrthogonalBlock
:members:

View File

@@ -1,6 +1,6 @@
Periodic Boundary Condition Embedding
=======================================
.. currentmodule:: pina.model.layers.embedding
.. currentmodule:: pina.model.block.embedding
.. autoclass:: PeriodicBoundaryEmbedding
:members:

View File

@@ -0,0 +1,7 @@
Proper Orthogonal Decomposition Block
============================================
.. currentmodule:: pina.model.block.pod_block
.. autoclass:: PODBlock
:members:
:show-inheritance:

View File

@@ -0,0 +1,7 @@
Radias Basis Function Block
=============================
.. currentmodule:: pina.model.block.rbf_block
.. autoclass:: RBFBlock
:members:
:show-inheritance:

View File

@@ -1,6 +1,6 @@
Residual layer
Residual Block
===================
.. currentmodule:: pina.model.layers.residual
.. currentmodule:: pina.model.block.residual
.. autoclass:: ResidualBlock
:members:

Some files were not shown because too many files have changed in this diff Show More