qmat 0.0.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of qmat might be problematic. Click here for more details.
- qmat-0.0.1/.github/workflows/ci_pipeline.yml +61 -0
- qmat-0.0.1/.github/workflows/publish.yml +26 -0
- qmat-0.0.1/.gitignore +36 -0
- qmat-0.0.1/LICENSE +24 -0
- qmat-0.0.1/PKG-INFO +115 -0
- qmat-0.0.1/README.md +61 -0
- qmat-0.0.1/docs/.readthedocs.yaml +13 -0
- qmat-0.0.1/docs/Makefile +19 -0
- qmat-0.0.1/docs/_static/android-chrome-192x192.png +0 -0
- qmat-0.0.1/docs/_static/android-chrome-512x512.png +0 -0
- qmat-0.0.1/docs/_static/apple-touch-icon.png +0 -0
- qmat-0.0.1/docs/_static/custom.css +76 -0
- qmat-0.0.1/docs/_static/favicon-16x16.png +0 -0
- qmat-0.0.1/docs/_static/favicon-32x32.png +0 -0
- qmat-0.0.1/docs/_static/favicon.ico +0 -0
- qmat-0.0.1/docs/conf.py +153 -0
- qmat-0.0.1/docs/contributing.md +44 -0
- qmat-0.0.1/docs/devdoc/addRK.md +45 -0
- qmat-0.0.1/docs/devdoc/structure.md +177 -0
- qmat-0.0.1/docs/devdoc/testing.md +91 -0
- qmat-0.0.1/docs/devdoc/updateDoc.md +45 -0
- qmat-0.0.1/docs/index.rst +70 -0
- qmat-0.0.1/docs/installation.md +32 -0
- qmat-0.0.1/docs/notebooks/01_qCoeffs.ipynb +358 -0
- qmat-0.0.1/docs/notebooks/02_rk.ipynb +288 -0
- qmat-0.0.1/docs/notebooks/03_qDelta.ipynb +383 -0
- qmat-0.0.1/docs/notebooks/04_sdc.ipynb +363 -0
- qmat-0.0.1/docs/notebooks/11_prolongation.ipynb +78 -0
- qmat-0.0.1/docs/notebooks/12_initialization.ipynb +20 -0
- qmat-0.0.1/docs/notebooks/run.sh +30 -0
- qmat-0.0.1/docs/notebooks.md +46 -0
- qmat-0.0.1/docs/requirements.txt +10 -0
- qmat-0.0.1/docs/sdc_logo.png +0 -0
- qmat-0.0.1/pyproject.toml +69 -0
- qmat-0.0.1/qmat/__init__.py +8 -0
- qmat-0.0.1/qmat/lagrange.py +305 -0
- qmat-0.0.1/qmat/nodes.py +221 -0
- qmat-0.0.1/qmat/qcoeff/__init__.py +134 -0
- qmat-0.0.1/qmat/qcoeff/butcher.py +302 -0
- qmat-0.0.1/qmat/qcoeff/collocation.py +82 -0
- qmat-0.0.1/qmat/qdelta/__init__.py +99 -0
- qmat-0.0.1/qmat/qdelta/algebraic.py +63 -0
- qmat-0.0.1/qmat/qdelta/min.py +216 -0
- qmat-0.0.1/qmat/qdelta/mincoeffs.py +143 -0
- qmat-0.0.1/qmat/qdelta/timestepping.py +87 -0
- qmat-0.0.1/qmat/sdc.py +155 -0
- qmat-0.0.1/qmat/utils.py +91 -0
- qmat-0.0.1/scratch.py +27 -0
- qmat-0.0.1/test.sh +4 -0
- qmat-0.0.1/tests/test_1_nodes.py +77 -0
- qmat-0.0.1/tests/test_2_lagrange.py +76 -0
- qmat-0.0.1/tests/test_qcoeff/__init__.py +1 -0
- qmat-0.0.1/tests/test_qcoeff/test_base.py +80 -0
- qmat-0.0.1/tests/test_qcoeff/test_convergence.py +60 -0
- qmat-0.0.1/tests/test_qdelta/__init__.py +1 -0
- qmat-0.0.1/tests/test_qdelta/test_base.py +96 -0
- qmat-0.0.1/tests/test_qdelta/test_min.py +126 -0
- qmat-0.0.1/tests/test_qdelta/test_timestepping.py +221 -0
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
name: CI pipeline for qmat
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [ "main" ]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
test-code:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
strategy:
|
|
12
|
+
fail-fast: false
|
|
13
|
+
matrix:
|
|
14
|
+
python: ['3.8', '3.9', '3.10', '3.11', '3.12']
|
|
15
|
+
defaults:
|
|
16
|
+
run:
|
|
17
|
+
shell: bash -l {0}
|
|
18
|
+
|
|
19
|
+
steps:
|
|
20
|
+
- uses: actions/checkout@v3
|
|
21
|
+
- name: Set up Python ${{ matrix.python }}
|
|
22
|
+
uses: actions/setup-python@v3
|
|
23
|
+
with:
|
|
24
|
+
python-version: "${{ matrix.python }}"
|
|
25
|
+
- name: Install dependencies
|
|
26
|
+
run: |
|
|
27
|
+
python -m pip install --upgrade pip
|
|
28
|
+
pip install .[test]
|
|
29
|
+
- name: Lint with flake8
|
|
30
|
+
run: |
|
|
31
|
+
# stop if there are Python syntax errors or undefined names
|
|
32
|
+
flake8 ./qmat ./tests --count --select=E9,F63,F7,F82 --show-source --statistics
|
|
33
|
+
- name: Run pytest with coverage
|
|
34
|
+
run: |
|
|
35
|
+
./test.sh
|
|
36
|
+
- name: Upload coverage reports to Codecov
|
|
37
|
+
uses: codecov/codecov-action@v4
|
|
38
|
+
if: github.repository_owner == 'Parallel-in-Time' && matrix.python == '3.11'
|
|
39
|
+
with:
|
|
40
|
+
flags: smart-tests
|
|
41
|
+
verbose: true
|
|
42
|
+
env:
|
|
43
|
+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
|
44
|
+
|
|
45
|
+
test-tutorials:
|
|
46
|
+
runs-on: ubuntu-latest
|
|
47
|
+
|
|
48
|
+
steps:
|
|
49
|
+
- uses: actions/checkout@v3
|
|
50
|
+
- name: Set up Python 3.11
|
|
51
|
+
uses: actions/setup-python@v3
|
|
52
|
+
with:
|
|
53
|
+
python-version: "3.11"
|
|
54
|
+
- name: Install dependencies
|
|
55
|
+
run: |
|
|
56
|
+
python -m pip install --upgrade pip
|
|
57
|
+
pip install .[test]
|
|
58
|
+
- name: Test with pytest-notebook
|
|
59
|
+
run: |
|
|
60
|
+
pytest ./docs/notebooks --nb-test-files -v
|
|
61
|
+
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
name: Publish qmat package 📦 to PyPI
|
|
2
|
+
on:
|
|
3
|
+
workflow_dispatch:
|
|
4
|
+
jobs:
|
|
5
|
+
publish:
|
|
6
|
+
name: Build and publish
|
|
7
|
+
runs-on: ubuntu-latest
|
|
8
|
+
steps:
|
|
9
|
+
- name: Checkout repository
|
|
10
|
+
uses: actions/checkout@v3
|
|
11
|
+
- name: Set up Python 3.11
|
|
12
|
+
uses: actions/setup-python@v3
|
|
13
|
+
with:
|
|
14
|
+
python-version: "3.11"
|
|
15
|
+
- name: Checkout repository
|
|
16
|
+
uses: actions/checkout@v2
|
|
17
|
+
- name: Install dependencies
|
|
18
|
+
run: |
|
|
19
|
+
python -m pip install --upgrade pip
|
|
20
|
+
pip install build
|
|
21
|
+
- name: Build sdist
|
|
22
|
+
run: python -m build --sdist
|
|
23
|
+
- name: Publish to PyPI
|
|
24
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
25
|
+
with:
|
|
26
|
+
password: ${{ secrets.PYPI_API_TOKEN }}
|
qmat-0.0.1/.gitignore
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
*.pyc
|
|
2
|
+
*.swp
|
|
3
|
+
env
|
|
4
|
+
*.egg-info
|
|
5
|
+
build
|
|
6
|
+
|
|
7
|
+
# OSX
|
|
8
|
+
.DS_Store
|
|
9
|
+
.AppleDouble
|
|
10
|
+
.LSOverride
|
|
11
|
+
|
|
12
|
+
# Thumbnails
|
|
13
|
+
._*
|
|
14
|
+
|
|
15
|
+
# Spyder
|
|
16
|
+
.spyproject
|
|
17
|
+
|
|
18
|
+
*.xml
|
|
19
|
+
|
|
20
|
+
# jupyter
|
|
21
|
+
.ipynb_checkpoints
|
|
22
|
+
|
|
23
|
+
# VSCode
|
|
24
|
+
.vscode
|
|
25
|
+
*.cpp
|
|
26
|
+
|
|
27
|
+
# Pytest and coeverage stuff
|
|
28
|
+
.benchmarks
|
|
29
|
+
.pytest_cache
|
|
30
|
+
.coverage*
|
|
31
|
+
htmlcov
|
|
32
|
+
sitecustomize.py
|
|
33
|
+
|
|
34
|
+
# Doc
|
|
35
|
+
docs/_build
|
|
36
|
+
docs/site.webmanifest
|
qmat-0.0.1/LICENSE
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
BSD 2-Clause License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024, Parallel-in-Time (PinT) Algorithms
|
|
4
|
+
|
|
5
|
+
Redistribution and use in source and binary forms, with or without
|
|
6
|
+
modification, are permitted provided that the following conditions are met:
|
|
7
|
+
|
|
8
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
9
|
+
list of conditions and the following disclaimer.
|
|
10
|
+
|
|
11
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
12
|
+
this list of conditions and the following disclaimer in the documentation
|
|
13
|
+
and/or other materials provided with the distribution.
|
|
14
|
+
|
|
15
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
16
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
17
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
18
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
19
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
20
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
21
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
22
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
23
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
24
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
qmat-0.0.1/PKG-INFO
ADDED
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
|
+
Name: qmat
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Summary: Generation of Q-coefficients for Spectral Deferred Corrections (and other time-integration methods ...)
|
|
5
|
+
Project-URL: Homepage, https://github.com/Parallel-in-Time/qmat
|
|
6
|
+
Project-URL: Tracker, https://github.com/Parallel-in-Time/qmat/issues
|
|
7
|
+
Maintainer-email: Thibaut Lunet <thibaut.lunet@tuhh.de>
|
|
8
|
+
License: BSD 2-Clause License
|
|
9
|
+
|
|
10
|
+
Copyright (c) 2024, Parallel-in-Time (PinT) Algorithms
|
|
11
|
+
|
|
12
|
+
Redistribution and use in source and binary forms, with or without
|
|
13
|
+
modification, are permitted provided that the following conditions are met:
|
|
14
|
+
|
|
15
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
16
|
+
list of conditions and the following disclaimer.
|
|
17
|
+
|
|
18
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
19
|
+
this list of conditions and the following disclaimer in the documentation
|
|
20
|
+
and/or other materials provided with the distribution.
|
|
21
|
+
|
|
22
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
23
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
24
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
25
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
26
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
27
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
28
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
29
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
30
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
31
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
32
|
+
License-File: LICENSE
|
|
33
|
+
Classifier: Development Status :: 3 - Alpha
|
|
34
|
+
Classifier: License :: OSI Approved :: BSD License
|
|
35
|
+
Classifier: Programming Language :: Python :: 3
|
|
36
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
37
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
38
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
39
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
40
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
41
|
+
Classifier: Topic :: Scientific/Engineering :: Mathematics
|
|
42
|
+
Requires-Python: >=3.8
|
|
43
|
+
Requires-Dist: numpy
|
|
44
|
+
Requires-Dist: scipy
|
|
45
|
+
Provides-Extra: test
|
|
46
|
+
Requires-Dist: coverage[toml]; extra == 'test'
|
|
47
|
+
Requires-Dist: flake8; extra == 'test'
|
|
48
|
+
Requires-Dist: matplotlib; extra == 'test'
|
|
49
|
+
Requires-Dist: notebook; extra == 'test'
|
|
50
|
+
Requires-Dist: pytest; extra == 'test'
|
|
51
|
+
Requires-Dist: pytest-notebook; extra == 'test'
|
|
52
|
+
Requires-Dist: pytest-timeout; extra == 'test'
|
|
53
|
+
Description-Content-Type: text/markdown
|
|
54
|
+
|
|
55
|
+
# QMat Package
|
|
56
|
+
|
|
57
|
+
[](https://github.com/Parallel-in-Time/qmat/actions/workflows/ci_pipeline.yml)
|
|
58
|
+
[](https://codecov.io/gh/Parallel-in-Time/qmat)
|
|
59
|
+
|
|
60
|
+
`qmat` is a python package to generate matrix coefficients related to Collocation methods, Spectral Deferred Corrections (SDC),
|
|
61
|
+
and more general multi-stages time-integration methods (like Runge-Kutta, etc ...).
|
|
62
|
+
|
|
63
|
+
It allows to generate $Q$-coefficients for multi-stages methods (equivalent to Butcher tables) :
|
|
64
|
+
|
|
65
|
+
$$
|
|
66
|
+
Q\text{-coefficients : }
|
|
67
|
+
\begin{array}
|
|
68
|
+
{c|c}
|
|
69
|
+
\tau & Q \\
|
|
70
|
+
\hline
|
|
71
|
+
& w^\top
|
|
72
|
+
\end{array}
|
|
73
|
+
\quad \Leftrightarrow \quad
|
|
74
|
+
\begin{array}
|
|
75
|
+
{c|c}
|
|
76
|
+
c & A \\
|
|
77
|
+
\hline
|
|
78
|
+
& b^\top
|
|
79
|
+
\end{array}
|
|
80
|
+
\quad\text{(Butcher table)}
|
|
81
|
+
$$
|
|
82
|
+
|
|
83
|
+
and many different **lower-triangular** approximation of the $Q$ matrix, named $Q_\Delta$,
|
|
84
|
+
which are key elements for Spectral Deferred Correction (SDC), or more general Iterated Runge-Kutta Methods.
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
## Installation
|
|
89
|
+
|
|
90
|
+
🛠️ Still in construction, only installation from source is enable yet, see [current instructions ...](./docs/installation.md)
|
|
91
|
+
|
|
92
|
+
## Basic usage
|
|
93
|
+
|
|
94
|
+
📜 _If you are already familiar with those concepts, you can use this package like this :_
|
|
95
|
+
|
|
96
|
+
```python
|
|
97
|
+
from qmat import genQCoeffs, genQDeltaCoeffs
|
|
98
|
+
|
|
99
|
+
# Coefficients or specific collocation method
|
|
100
|
+
nodes, weights, Q = genQCoeffs("Collocation", nNodes=4, nodeType="LEGENDRE", quadType="RADAU-RIGHT")
|
|
101
|
+
|
|
102
|
+
# QDelta matrix from Implicit-Euler based SDC
|
|
103
|
+
QDelta = genQDeltaCoeffs("IE", nodes=nodes)
|
|
104
|
+
|
|
105
|
+
# Butcher table of the classical explicit RK4 method
|
|
106
|
+
c, b, A = genQCoeffs("ERK4")
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
> 🔔 _If you are not familiar with SDC or related methods, and want to learn more about it, checkout the
|
|
110
|
+
> [latest documentation build](https://qmat.readthedocs.io/en/latest/) and
|
|
111
|
+
in particular the [**step by step tutorials**](https://qmat.readthedocs.io/en/latest/notebooks.html)_
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
For any contribution, please checkout out (very cool) [Contribution Guidelines](./docs/contributing.md)
|
|
115
|
+
|
qmat-0.0.1/README.md
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# QMat Package
|
|
2
|
+
|
|
3
|
+
[](https://github.com/Parallel-in-Time/qmat/actions/workflows/ci_pipeline.yml)
|
|
4
|
+
[](https://codecov.io/gh/Parallel-in-Time/qmat)
|
|
5
|
+
|
|
6
|
+
`qmat` is a python package to generate matrix coefficients related to Collocation methods, Spectral Deferred Corrections (SDC),
|
|
7
|
+
and more general multi-stages time-integration methods (like Runge-Kutta, etc ...).
|
|
8
|
+
|
|
9
|
+
It allows to generate $Q$-coefficients for multi-stages methods (equivalent to Butcher tables) :
|
|
10
|
+
|
|
11
|
+
$$
|
|
12
|
+
Q\text{-coefficients : }
|
|
13
|
+
\begin{array}
|
|
14
|
+
{c|c}
|
|
15
|
+
\tau & Q \\
|
|
16
|
+
\hline
|
|
17
|
+
& w^\top
|
|
18
|
+
\end{array}
|
|
19
|
+
\quad \Leftrightarrow \quad
|
|
20
|
+
\begin{array}
|
|
21
|
+
{c|c}
|
|
22
|
+
c & A \\
|
|
23
|
+
\hline
|
|
24
|
+
& b^\top
|
|
25
|
+
\end{array}
|
|
26
|
+
\quad\text{(Butcher table)}
|
|
27
|
+
$$
|
|
28
|
+
|
|
29
|
+
and many different **lower-triangular** approximation of the $Q$ matrix, named $Q_\Delta$,
|
|
30
|
+
which are key elements for Spectral Deferred Correction (SDC), or more general Iterated Runge-Kutta Methods.
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
## Installation
|
|
35
|
+
|
|
36
|
+
🛠️ Still in construction, only installation from source is enable yet, see [current instructions ...](./docs/installation.md)
|
|
37
|
+
|
|
38
|
+
## Basic usage
|
|
39
|
+
|
|
40
|
+
📜 _If you are already familiar with those concepts, you can use this package like this :_
|
|
41
|
+
|
|
42
|
+
```python
|
|
43
|
+
from qmat import genQCoeffs, genQDeltaCoeffs
|
|
44
|
+
|
|
45
|
+
# Coefficients or specific collocation method
|
|
46
|
+
nodes, weights, Q = genQCoeffs("Collocation", nNodes=4, nodeType="LEGENDRE", quadType="RADAU-RIGHT")
|
|
47
|
+
|
|
48
|
+
# QDelta matrix from Implicit-Euler based SDC
|
|
49
|
+
QDelta = genQDeltaCoeffs("IE", nodes=nodes)
|
|
50
|
+
|
|
51
|
+
# Butcher table of the classical explicit RK4 method
|
|
52
|
+
c, b, A = genQCoeffs("ERK4")
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
> 🔔 _If you are not familiar with SDC or related methods, and want to learn more about it, checkout the
|
|
56
|
+
> [latest documentation build](https://qmat.readthedocs.io/en/latest/) and
|
|
57
|
+
in particular the [**step by step tutorials**](https://qmat.readthedocs.io/en/latest/notebooks.html)_
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
For any contribution, please checkout out (very cool) [Contribution Guidelines](./docs/contributing.md)
|
|
61
|
+
|
qmat-0.0.1/docs/Makefile
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Minimal makefile for Sphinx documentation
|
|
2
|
+
|
|
3
|
+
# You can set these variables from the command line.
|
|
4
|
+
SPHINXOPTS =
|
|
5
|
+
SPHINXBUILD = sphinx-build
|
|
6
|
+
SPHINXPROJ = QMat
|
|
7
|
+
SOURCEDIR = .
|
|
8
|
+
BUILDDIR = _build
|
|
9
|
+
|
|
10
|
+
# Put it first so that "make" without argument is like "make help".
|
|
11
|
+
help:
|
|
12
|
+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
|
13
|
+
|
|
14
|
+
.PHONY: help Makefile
|
|
15
|
+
|
|
16
|
+
# Catch-all target: route all unknown targets to Sphinx using the new
|
|
17
|
+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
|
|
18
|
+
%: Makefile
|
|
19
|
+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
.wy-nav-content {
|
|
2
|
+
padding: 1.618em 3.236em;
|
|
3
|
+
height: 100%;
|
|
4
|
+
max-width: 1000px;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
p {
|
|
8
|
+
line-height: 24px;
|
|
9
|
+
font-size: 16px;
|
|
10
|
+
margin: 0 0 12px;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.nbinput, .nboutput {
|
|
14
|
+
margin-bottom: 12px !important;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.nboutput .output_area {
|
|
18
|
+
font-weight: bold;
|
|
19
|
+
color: #8a8a8a;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.rst-content {
|
|
23
|
+
h1, h2, ol, ul {
|
|
24
|
+
margin-bottom: 12px !important;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
blockquote {
|
|
29
|
+
padding: 5px 5px;
|
|
30
|
+
margin: 10px 0 12px 0 !important;
|
|
31
|
+
border-left: 4px solid #dfdfdf;
|
|
32
|
+
background: #eeeeee;
|
|
33
|
+
border-radius: 5px;
|
|
34
|
+
}
|
|
35
|
+
blockquote p {
|
|
36
|
+
margin-bottom: 0;
|
|
37
|
+
}
|
|
38
|
+
blockquote small {
|
|
39
|
+
display: block;
|
|
40
|
+
line-height: 19px;
|
|
41
|
+
color: #999999;
|
|
42
|
+
}
|
|
43
|
+
blockquote small:before {
|
|
44
|
+
content: '\2014 \00A0';
|
|
45
|
+
}
|
|
46
|
+
blockquote.pull-right {
|
|
47
|
+
float: right;
|
|
48
|
+
padding-right: 15px;
|
|
49
|
+
padding-left: 0;
|
|
50
|
+
border-right: 5px solid #eeeeee;
|
|
51
|
+
border-left: 0;
|
|
52
|
+
}
|
|
53
|
+
blockquote.pull-right p,
|
|
54
|
+
blockquote.pull-right small {
|
|
55
|
+
text-align: right;
|
|
56
|
+
}
|
|
57
|
+
blockquote.pull-right small:before {
|
|
58
|
+
content: '';
|
|
59
|
+
}
|
|
60
|
+
blockquote.pull-right small:after {
|
|
61
|
+
content: '\00A0 \2014';
|
|
62
|
+
}
|
|
63
|
+
q:before,
|
|
64
|
+
q:after,
|
|
65
|
+
blockquote:before,
|
|
66
|
+
blockquote:after {
|
|
67
|
+
content: "";
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.rst-content div[class^="highlight"] {
|
|
71
|
+
margin: 1px 0 16px;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
blockquote > div > div[class^="highlight"] {
|
|
75
|
+
margin: 8px 3px !important;
|
|
76
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
qmat-0.0.1/docs/conf.py
ADDED
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
#
|
|
3
|
+
# Configuration file for the Sphinx documentation builder.
|
|
4
|
+
#
|
|
5
|
+
# This file does only contain a selection of the most common options. For a
|
|
6
|
+
# full list see the documentation:
|
|
7
|
+
# http://www.sphinx-doc.org/en/master/config
|
|
8
|
+
|
|
9
|
+
# -- Path setup --------------------------------------------------------------
|
|
10
|
+
|
|
11
|
+
# If extensions (or modules to document with autodoc) are in another directory,
|
|
12
|
+
# add these directories to sys.path here. If the directory is relative to the
|
|
13
|
+
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
|
14
|
+
#
|
|
15
|
+
# import os
|
|
16
|
+
# import sys
|
|
17
|
+
# sys.path.insert(0, os.path.abspath('.'))
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
# -- Project information -----------------------------------------------------
|
|
21
|
+
|
|
22
|
+
project = 'QMat Package'
|
|
23
|
+
copyright = '2024 PinT Community'
|
|
24
|
+
author = 'PinT Community'
|
|
25
|
+
|
|
26
|
+
# The short X.Y version
|
|
27
|
+
version = ''
|
|
28
|
+
# The full version, including alpha/beta/rc tags
|
|
29
|
+
release = ''
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
# -- General configuration ---------------------------------------------------
|
|
33
|
+
|
|
34
|
+
# If your documentation needs a minimal Sphinx version, state it here.
|
|
35
|
+
#
|
|
36
|
+
# needs_sphinx = '1.0'
|
|
37
|
+
|
|
38
|
+
# Add any Sphinx extension module names here, as strings. They can be
|
|
39
|
+
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
|
40
|
+
# ones.
|
|
41
|
+
extensions = [
|
|
42
|
+
'sphinx.ext.mathjax',
|
|
43
|
+
'autoapi.extension',
|
|
44
|
+
'sphinx.ext.viewcode',
|
|
45
|
+
'sphinx.ext.napoleon',
|
|
46
|
+
'sphinx.ext.extlinks',
|
|
47
|
+
'nbsphinx',
|
|
48
|
+
'sphinx_rtd_theme',
|
|
49
|
+
'sphinx_gallery.load_style',
|
|
50
|
+
'sphinxcontrib.video',
|
|
51
|
+
'myst_parser',
|
|
52
|
+
'sphinx_favicon',
|
|
53
|
+
]
|
|
54
|
+
|
|
55
|
+
myst_enable_extensions = [
|
|
56
|
+
"amsmath",
|
|
57
|
+
"dollarmath",
|
|
58
|
+
]
|
|
59
|
+
|
|
60
|
+
favicons = [
|
|
61
|
+
"android-chrome-192x192.png",
|
|
62
|
+
"android-chrome-512x512.png",
|
|
63
|
+
"apple-touch-icon.png",
|
|
64
|
+
"favicon-16x16.png",
|
|
65
|
+
"favicon-32x32.png",
|
|
66
|
+
"favicon.ico",
|
|
67
|
+
]
|
|
68
|
+
|
|
69
|
+
add_module_names = False
|
|
70
|
+
autoapi_type = 'python'
|
|
71
|
+
autoapi_dirs = ['../qmat']
|
|
72
|
+
autoapi_file_patterns = ['*.py']
|
|
73
|
+
autoapi_options = ['members', 'undoc-members']
|
|
74
|
+
autoapi_python_class_content = 'both'
|
|
75
|
+
autoapi_add_toctree_entry = False
|
|
76
|
+
|
|
77
|
+
napoleon_use_param = False
|
|
78
|
+
napoleon_use_keyword = False
|
|
79
|
+
napoleon_use_ivar = True
|
|
80
|
+
|
|
81
|
+
extlinks = {'repo': ('https://github.com/Parallel-in-Time/qmat/tree/main/%s', None)}
|
|
82
|
+
|
|
83
|
+
# Add any paths that contain templates here, relative to this directory.
|
|
84
|
+
templates_path = ['_templates']
|
|
85
|
+
|
|
86
|
+
# The suffix(es) of source filenames.
|
|
87
|
+
source_suffix = ['.rst', '.md']
|
|
88
|
+
|
|
89
|
+
# The master toctree document.
|
|
90
|
+
master_doc = 'index'
|
|
91
|
+
|
|
92
|
+
# The language for content autogenerated by Sphinx. Refer to documentation
|
|
93
|
+
# for a list of supported languages.
|
|
94
|
+
#
|
|
95
|
+
# This is also used if you do content translation via gettext catalogs.
|
|
96
|
+
# Usually you set "language" from the command line for these cases.
|
|
97
|
+
language = 'en'
|
|
98
|
+
|
|
99
|
+
# List of patterns, relative to source directory, that match files and
|
|
100
|
+
# directories to ignore when looking for source files.
|
|
101
|
+
# This pattern also affects html_static_path and html_extra_path .
|
|
102
|
+
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
|
|
103
|
+
|
|
104
|
+
# The name of the Pygments (syntax highlighting) style to use.
|
|
105
|
+
pygments_style = 'default'
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
# -- Options for HTML output -------------------------------------------------
|
|
109
|
+
|
|
110
|
+
# The theme to use for HTML and HTML Help pages. See the documentation for
|
|
111
|
+
# a list of builtin themes.
|
|
112
|
+
#
|
|
113
|
+
html_theme = 'sphinx_rtd_theme'
|
|
114
|
+
html_logo = 'sdc_logo.png'
|
|
115
|
+
|
|
116
|
+
# Theme options are theme-specific and customize the look and feel of a theme
|
|
117
|
+
# further. For a list of options available for each theme, see the
|
|
118
|
+
# documentation.
|
|
119
|
+
#
|
|
120
|
+
html_theme_options = {
|
|
121
|
+
"collapse_navigation": "false"
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
# Add any paths that contain custom static files (such as style sheets) here,
|
|
125
|
+
# relative to this directory. They are copied after the builtin static files,
|
|
126
|
+
# so a file named "default.css" will overwrite the builtin "default.css".
|
|
127
|
+
html_static_path = ['_static']
|
|
128
|
+
html_css_files = [
|
|
129
|
+
'custom.css',
|
|
130
|
+
]
|
|
131
|
+
|
|
132
|
+
# Custom sidebar templates, must be a dictionary that maps document names
|
|
133
|
+
# to template names.
|
|
134
|
+
#
|
|
135
|
+
# The default sidebars (for documents that don't match any pattern) are
|
|
136
|
+
# defined by theme itself. Builtin themes are using these templates by
|
|
137
|
+
# default: ``['localtoc.html', 'relations.html', 'sourcelink.html',
|
|
138
|
+
# 'searchbox.html']``.
|
|
139
|
+
#
|
|
140
|
+
# html_sidebars = {}
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
# -- Options for HTMLHelp output ---------------------------------------------
|
|
144
|
+
|
|
145
|
+
# Output file base name for HTML help builder.
|
|
146
|
+
htmlhelp_basename = 'qmatdoc'
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
# -- Options for nbsphinx galleries
|
|
150
|
+
# Using _images/ is a hack to get relocated images which have been included in the pages
|
|
151
|
+
nbsphinx_thumbnails = {
|
|
152
|
+
|
|
153
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
📜 _Package is currently developed with an open-source philosophy, so any relevant contribution is welcome_
|
|
4
|
+
|
|
5
|
+
## General rules
|
|
6
|
+
|
|
7
|
+
Ideally, your code implementation should be :
|
|
8
|
+
|
|
9
|
+
- _**simple** enough so your grandma can understand it_
|
|
10
|
+
- _**beautiful** enough to make your cousin in art school want to read it_
|
|
11
|
+
- _**efficient** enough such that you spend more time analyzing your plots than coding and running experiments_
|
|
12
|
+
|
|
13
|
+
Of course, that's an ideal goal ... but nothing prevents to aim at the sky when reaching the top of the mountain 🚡
|
|
14
|
+
|
|
15
|
+
Recommended approach is to **fork this repository**, create a new branch in your fork, and open a **pull request** when ready.
|
|
16
|
+
This will automatically trigger the CI pipeline that :
|
|
17
|
+
|
|
18
|
+
1. check linting with `flake8`
|
|
19
|
+
2. run all the tests defined in the `tests` folder, and upload a coverage report to `codecov`
|
|
20
|
+
3. test all the tutorials located in the [notebook folder](https://github.com/Parallel-in-Time/qmat/tree/main/docs/notebooks)
|
|
21
|
+
|
|
22
|
+
Current coverage is at 100%, so no untested line will be accepted 😇.
|
|
23
|
+
|
|
24
|
+
> 📣 Know that no code styling formatter (like `black`, or else ...) will ever be imposed in CI, as long as I'm still breathing !
|
|
25
|
+
|
|
26
|
+
## Base recipes
|
|
27
|
+
|
|
28
|
+
_A few base memo on how to develop this package ..._
|
|
29
|
+
|
|
30
|
+
- [General code structure](./devdoc/structure.md)
|
|
31
|
+
- [Add a Runge-Kutta scheme](./devdoc/addRK.md)
|
|
32
|
+
- [Testing your changes](./devdoc/testing.md)
|
|
33
|
+
- [Update this documentation](./devdoc/updateDoc.md)
|
|
34
|
+
|
|
35
|
+
```{eval-rst}
|
|
36
|
+
.. toctree::
|
|
37
|
+
:maxdepth: 1
|
|
38
|
+
:hidden:
|
|
39
|
+
|
|
40
|
+
devdoc/structure
|
|
41
|
+
devdoc/addRK
|
|
42
|
+
devdoc/testing
|
|
43
|
+
devdoc/updateDoc
|
|
44
|
+
```
|