-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'boschresearch:main' into main
- Loading branch information
Showing
26 changed files
with
380 additions
and
224 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: documentation | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | ||
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | ||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: false | ||
|
||
|
||
jobs: | ||
build-docs: | ||
runs-on: [ubuntu-latest] | ||
container: python:3.10-bookworm | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install dependencies | ||
run: | | ||
apt-get update | ||
apt-get -y install xvfb pandoc | ||
python -m pip install --upgrade pip setuptools setuptools_scm wheel | ||
pip install -e .[docs] | ||
pip install -r docs/requirements.txt | ||
- name: Build documentation | ||
run: | | ||
sphinx-build -b html docs/ _site | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v3 | ||
|
||
# Deployment job | ||
deploy-docs: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
if: github.ref_name == 'main' | ||
needs: build-docs | ||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
name: Build and upload to PyPI | ||
|
||
on: | ||
release: | ||
type: [published] | ||
|
||
env: | ||
CIBW_BUILD: cp37-* cp38-* cp39-* cp310-* | ||
CIBW_BEFORE_BUILD: pip install cython | ||
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014 | ||
CIBW_MANYLINUX_I686_IMAGE: manylinux2014 | ||
|
||
jobs: | ||
build_wheels: | ||
name: Build wheels on [ ubuntu-latest ] | ||
runs-on: [ ubuntu-latest ] | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] #, windows-latest] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: actions/setup-python@v2 | ||
name: Install Python | ||
with: | ||
python-version: '3.10' | ||
|
||
- name: Install cibuildwheel | ||
run: | | ||
# python -m pip install cibuildwheel | ||
pip install -U setuptools setuptools_scm wheel | ||
- name: Build wheels | ||
run: | | ||
# python -m cibuildwheel --output-dir wheelhouse | ||
python setup.py bdist_wheel | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
path: ./dist/*.whl | ||
|
||
|
||
build_sdist: | ||
name: Build source distribution | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: actions/setup-python@v2 | ||
name: Install Python | ||
with: | ||
python-version: '3.10' | ||
|
||
- name: Install setuptools | ||
run: | | ||
pip install -U setuptools setuptools_scm wheel | ||
- name: Build sdist | ||
run: python setup.py sdist | ||
|
||
- uses: actions/upload-artifact@v2 | ||
with: | ||
path: dist/*.tar.gz | ||
|
||
upload_pypi: | ||
needs: [build_wheels, build_sdist] | ||
runs-on: ubuntu-latest | ||
if: github.event_name == 'release' && github.event.action == 'published' | ||
steps: | ||
- uses: actions/download-artifact@v2 | ||
with: | ||
name: artifact | ||
path: dist | ||
|
||
- uses: pypa/gh-action-pypi-publish@master | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.upload_pypi }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"path": "../../examples/tutorial/Introduction_Tutorial_PINNs.ipynb" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,43 @@ | ||
========================= | ||
The TorchPhysics Tutorial | ||
========================= | ||
Here one can find all important information and knowledge to get started with the | ||
Here one can find all important information and knowledge to get started with the | ||
software library TorchPhysics. | ||
|
||
In order to make it as easy and user-friendly as possible for all users, | ||
In order to make it as easy and user-friendly as possible for all users, | ||
both complete novices and professionals in Machine Learning and PDEs, to get started, the tutorial | ||
starts with some basics regarding differential equations and neural networks. For more | ||
experienced users, these points can be skipped. | ||
|
||
Afterward, we give a rough overview of different Deep Learning approaches for solving | ||
Afterward, we give a rough overview of different Deep Learning approaches for solving | ||
differential equations, with a focus on PINNs and DeepONet. | ||
|
||
The main and final topic is the use of TorchPhysics. Here we split the tutorial into two parts. | ||
The first part, guides you along some implementations of different small examples, while showing | ||
The first part, guides you along some implementations of different small examples, while showing | ||
all the important aspects and steps to solve a differential equation in TorchPhysics. This tutorial | ||
series is aimed at an audience which is more interested on the direct utilization of the library | ||
series is aimed at an audience which is more interested on the direct utilization of the library | ||
and for getting a fast and small overview of the possibilities. | ||
|
||
To get a deeper understanding of the library, we show in the second part how the library is | ||
To get a deeper understanding of the library, we show in the second part how the library is | ||
internally structured. This series is more aimed for users who plan to add or change functionalities. | ||
|
||
|
||
Basics of Deep Learning and Differential Equations | ||
===================================================== | ||
Will be added in the future. | ||
.. toctree:: | ||
:maxdepth: 1 | ||
:caption: Basics tutorial | ||
|
||
Introduction_Tutorial_PINNs | ||
|
||
Overview of Deep Learning Methods for Differential Equations | ||
============================================================ | ||
Will be added in the future. | ||
|
||
.. toctree:: | ||
:maxdepth: 1 | ||
:caption: Applied tutorial | ||
|
||
Usage of TorchPhysics | ||
===================== | ||
Like mentioned at the beginning, here we explain the aspects of TorchPhysics in more | ||
detail. We split the tutorial into two categories: | ||
applied_tutorial_start | ||
|
||
1) A more applied tutorial to learn TorchPhysics by implementing some examples. | ||
All basics features will be explained. The start can be found here_. | ||
|
||
2) A more in depth tutorial that focuses more on the library architecture. This | ||
tutorial begins on this page_. | ||
.. toctree:: | ||
:maxdepth: 1 | ||
:caption: In depth tutorial | ||
|
||
|
||
.. _here : applied_tutorial_start.html | ||
.. _page : tutorial_start.html | ||
tutorial_start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,6 @@ | |
name = torchphysics | ||
description = PyTorch implementation of Deep Learning methods to solve differential equations | ||
author = Nick Heilenkötter, Tom Freudenberg | ||
version = 1.0.1 | ||
author_email = [email protected], [email protected] | ||
license = Apache-2.0 | ||
long_description = file: README.rst | ||
|
@@ -65,11 +64,11 @@ exclude = | |
[options.extras_require] | ||
# Add here additional requirements for extra features, to install with: | ||
# `pip install torchphysics[all]` like: | ||
all = | ||
all = | ||
trimesh>=3.9.19 | ||
shapely>=1.7.1 | ||
rtree>=0.9.7 | ||
networkx>=2.5.1 | ||
networkx>=2.5.1 | ||
|
||
# Add here test requirements (semicolon/line-separated) | ||
testing = | ||
|
@@ -135,4 +134,4 @@ exclude = | |
# This will be used when updating. Do not change! | ||
version = 4.0.1 | ||
package = torchphysics | ||
extensions = | ||
extensions = |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.