jftools 0.4__tar.gz → 0.4.2__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.
- jftools-0.4.2/.github/workflows/python-package.yml +36 -0
- {jftools-0.4 → jftools-0.4.2}/LICENSE +6 -6
- jftools-0.4.2/PKG-INFO +20 -0
- jftools-0.4/README.rst → jftools-0.4.2/README.md +1 -2
- {jftools-0.4 → jftools-0.4.2}/dev/check_fedvr.ipynb +7 -11
- jftools-0.4.2/dev/test_sil.ipynb +567 -0
- {jftools-0.4 → jftools-0.4.2}/jftools/__init__.py +2 -3
- {jftools-0.4 → jftools-0.4.2}/jftools/fedvr.py +224 -117
- jftools-0.4.2/jftools/interpolate.py +32 -0
- {jftools-0.4 → jftools-0.4.2}/jftools/ipynbimport.py +20 -12
- {jftools-0.4 → jftools-0.4.2}/jftools/myjit.py +6 -3
- {jftools-0.4 → jftools-0.4.2}/jftools/plotting.py +5 -4
- {jftools-0.4 → jftools-0.4.2}/jftools/shade_color.py +9 -8
- {jftools-0.4 → jftools-0.4.2}/jftools/short_iterative_lanczos.py +88 -66
- {jftools-0.4 → jftools-0.4.2}/jftools/tictoc.py +6 -1
- jftools-0.4.2/jftools/unroll_phase.py +31 -0
- jftools-0.4.2/pyproject.toml +28 -0
- jftools-0.4.2/tests/__init__.py +0 -0
- jftools-0.4.2/tests/test_all.py +79 -0
- jftools-0.4/PKG-INFO +0 -7
- jftools-0.4/dev/test_sil.ipynb +0 -912
- jftools-0.4/flit.ini +0 -7
- jftools-0.4/jftools/interpolate.py +0 -25
- jftools-0.4/jftools/unroll_phase.py +0 -25
- jftools-0.4/setup.py +0 -20
- {jftools-0.4 → jftools-0.4.2}/.gitattributes +0 -0
- {jftools-0.4 → jftools-0.4.2}/.gitignore +0 -0
- {jftools-0.4 → jftools-0.4.2}/dev/.gitignore +0 -0
- {jftools-0.4 → jftools-0.4.2}/dev/bench_spmv.ipynb +0 -0
- {jftools-0.4 → jftools-0.4.2}/dev/check_dvr.ipynb +0 -0
- {jftools-0.4 → jftools-0.4.2}/dev/dvrmod.f90 +0 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
|
|
2
|
+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
|
|
3
|
+
|
|
4
|
+
name: Python package
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
push:
|
|
8
|
+
branches: [ "main" ]
|
|
9
|
+
pull_request:
|
|
10
|
+
branches: [ "main" ]
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
build:
|
|
14
|
+
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
strategy:
|
|
17
|
+
fail-fast: false
|
|
18
|
+
matrix:
|
|
19
|
+
python-version: ["3.9", "3.10", "3.11", "3.12"]
|
|
20
|
+
|
|
21
|
+
steps:
|
|
22
|
+
- uses: actions/checkout@v4
|
|
23
|
+
- uses: chartboost/ruff-action@v1
|
|
24
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
25
|
+
uses: actions/setup-python@v5
|
|
26
|
+
with:
|
|
27
|
+
python-version: ${{ matrix.python-version }}
|
|
28
|
+
cache: 'pip'
|
|
29
|
+
- name: Install dependencies
|
|
30
|
+
run: |
|
|
31
|
+
python -m pip install --upgrade pip
|
|
32
|
+
python -m pip install pytest flit
|
|
33
|
+
flit install --only-deps
|
|
34
|
+
- name: Test with pytest
|
|
35
|
+
run: |
|
|
36
|
+
pytest
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
MIT License
|
|
1
|
+
The MIT License (MIT)
|
|
2
2
|
|
|
3
|
-
Copyright (c)
|
|
3
|
+
Copyright (c) 2024 Johannes Feist
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -9,13 +9,13 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
|
9
9
|
copies of the Software, and to permit persons to whom the Software is
|
|
10
10
|
furnished to do so, subject to the following conditions:
|
|
11
11
|
|
|
12
|
-
The above copyright notice and this permission notice shall be included in
|
|
13
|
-
copies or substantial portions of the Software.
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
14
|
|
|
15
15
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
16
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
17
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
18
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
19
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
-
SOFTWARE.
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
jftools-0.4.2/PKG-INFO
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: jftools
|
|
3
|
+
Version: 0.4.2
|
|
4
|
+
Summary: Collection of small useful helper tools for Python by Johannes Feist.
|
|
5
|
+
Author-email: Johannes Feist <johannes.feist@gmail.com>
|
|
6
|
+
Requires-Python: >=3.7
|
|
7
|
+
Description-Content-Type: text/markdown
|
|
8
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
9
|
+
Requires-Dist: numpy >=1.15
|
|
10
|
+
Requires-Dist: scipy >=1.0
|
|
11
|
+
Requires-Dist: numba >=0.49
|
|
12
|
+
Requires-Dist: nbformat >= 5.0
|
|
13
|
+
Requires-Dist: IPython >= 7.0
|
|
14
|
+
Requires-Dist: matplotlib >= 3.0
|
|
15
|
+
Project-URL: Home, https://github.com/jfeist/jftools
|
|
16
|
+
|
|
17
|
+
# JF Tools
|
|
18
|
+
|
|
19
|
+
Collection of small useful helper tools for Python by Johannes Feist.
|
|
20
|
+
|
|
@@ -56,8 +56,7 @@
|
|
|
56
56
|
" plt.axvline(x,ls='--',color='0.4',lw=1,label='FE boundaries' if x==g.regs[0].x[0] else None)\n",
|
|
57
57
|
"plt.plot(xnew,fvals.T)\n",
|
|
58
58
|
"plt.margins(0.03)\n",
|
|
59
|
-
"plt.legend()
|
|
60
|
-
"plt.tight_layout(pad=0)"
|
|
59
|
+
"plt.legend();"
|
|
61
60
|
]
|
|
62
61
|
},
|
|
63
62
|
{
|
|
@@ -123,7 +122,7 @@
|
|
|
123
122
|
" dcn2a = g.dx.dot(dcn)\n",
|
|
124
123
|
" dy2 = g.evaluate_basis(dcn2,xnew)\n",
|
|
125
124
|
" dy2a = g.evaluate_basis(dcn2a,xnew)\n",
|
|
126
|
-
"
|
|
125
|
+
" ax._get_lines.get_next_color()\n",
|
|
127
126
|
" ax.plot(xnew,y,label=r'$f(x)$')\n",
|
|
128
127
|
" ax.plot(xnew,f(xnew),'k--')\n",
|
|
129
128
|
" ax.plot(xnew,dy,label=r\"$f'(x)$\")\n",
|
|
@@ -131,8 +130,7 @@
|
|
|
131
130
|
" ax.plot(xnew,dy2,label=r\"$f''(x)$\")\n",
|
|
132
131
|
" ax.plot(xnew,d2f(xnew),'k--')\n",
|
|
133
132
|
" ax.margins(0.03)\n",
|
|
134
|
-
" ax.legend(fontsize=18)
|
|
135
|
-
"fig.tight_layout()"
|
|
133
|
+
" ax.legend(fontsize=18)"
|
|
136
134
|
]
|
|
137
135
|
},
|
|
138
136
|
{
|
|
@@ -194,14 +192,13 @@
|
|
|
194
192
|
" y = g.evaluate_basis(cn,xnew)\n",
|
|
195
193
|
" dcn = g.dx.dot(cn)\n",
|
|
196
194
|
" dy = g.evaluate_basis(dcn,xnew)\n",
|
|
197
|
-
"
|
|
195
|
+
" ax._get_lines.get_next_color()\n",
|
|
198
196
|
" ax.plot(xnew,y,label=r'$f(x)$')\n",
|
|
199
197
|
" ax.plot(xnew,f(xnew),'k--')\n",
|
|
200
198
|
" ax.plot(xnew,dy,label=r\"$f'(x)$\")\n",
|
|
201
199
|
" ax.plot(xnew,df(xnew),'k--')\n",
|
|
202
200
|
" ax.margins(0.03)\n",
|
|
203
|
-
" ax.legend(fontsize=18)
|
|
204
|
-
"fig.tight_layout()"
|
|
201
|
+
" ax.legend(fontsize=18)"
|
|
205
202
|
]
|
|
206
203
|
},
|
|
207
204
|
{
|
|
@@ -227,8 +224,7 @@
|
|
|
227
224
|
" ax.margins(0.02)\n",
|
|
228
225
|
" ax.legend()\n",
|
|
229
226
|
" ax.set_title(r\"$N_{fun} = %d$, $\\|\\tilde f - f\\|/\\|f\\| = %.3e$\"%(nfun,np.trapz(abs(y-ynew),xnew)/np.trapz(y,xnew)),verticalalignment='bottom')\n",
|
|
230
|
-
" print(np.trapz(y,xnew)-np.sum(cn*np.sqrt(g.wt)))
|
|
231
|
-
"fig.tight_layout(pad=0.5)"
|
|
227
|
+
" print(np.trapz(y,xnew)-np.sum(cn*np.sqrt(g.wt)))"
|
|
232
228
|
]
|
|
233
229
|
}
|
|
234
230
|
],
|
|
@@ -248,7 +244,7 @@
|
|
|
248
244
|
"name": "python",
|
|
249
245
|
"nbconvert_exporter": "python",
|
|
250
246
|
"pygments_lexer": "ipython3",
|
|
251
|
-
"version": "3.
|
|
247
|
+
"version": "3.12.1"
|
|
252
248
|
}
|
|
253
249
|
},
|
|
254
250
|
"nbformat": 4,
|