Skip to content

Commit 301a7f8

Browse files
templates (#11)
* templates * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 8a14771 commit 301a7f8

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

.github/TEMPLATES/template.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: Feedback / Bugs / Questions
2+
description: none
3+
body:
4+
- type: textarea
5+
id: Feedback / Bugs / Questions
6+
attributes:
7+
label: Feedback / Bugs / Questions
8+
placeholder: |
9+
For Bugs, if possible reduce to minimal example, post code, and Magpylib version.
10+
validations:
11+
required: true

tests/test_physics.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -323,12 +323,12 @@ def test_force_between_cocentric_loops():
323323
loop2 = magpy.current.Circle(diameter=2*r2, current=i2, position=(0,0,z2))
324324
loop2.meshing=1000
325325
F_num = getFT(loop1, loop2, anchor=(0,0,0))[0,2]
326-
326+
327327
# analytical solution
328328
k2 = 4*r1*r2 / ((r1+r2)**2+(z1-z2)**2)
329329
k = np.sqrt(k2)
330330
pf = magpy.mu_0*i1*i2*(z1-z2)*k / 4 / np.sqrt(r1*r2)
331331
F_ana = pf*( (2-k2)/(1-k2)*ellipe(k**2) - 2*ellipk(k**2) )
332332

333333
assert abs((F_num - F_ana)/(F_num + F_ana)) < 1e-5
334-
334+

tests/test_self_consistency.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ def test_consistency_polyline_circle():
237237
"""
238238

239239
src = magpy.magnet.Sphere(diameter=1, polarization=(1,2,3), position=(0,0,-1))
240-
240+
241241
# circle
242242
loop1 = magpy.current.Circle(diameter=3, current=123)
243243
loop1.meshing=500
@@ -248,7 +248,7 @@ def test_consistency_polyline_circle():
248248
verts = [(rr*np.cos(p), rr*np.sin(p), 0) for p in phis]
249249
loop2 = magpy.current.Polyline(current=ii, vertices=verts)
250250
loop2.meshing=1
251-
251+
252252
F1,T1 = getFT(src, loop1, anchor=(0,0,0))
253253
F2,T2 = getFT(src, loop2, anchor=(0,0,0))
254254
assert abs(np.linalg.norm(F1-F2)/np.linalg.norm(F1+F2)) < 1e-7

0 commit comments

Comments
 (0)