cfsem 3.0.2__tar.gz → 3.0.3__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.
Files changed (71) hide show
  1. {cfsem-3.0.2 → cfsem-3.0.3}/CHANGELOG.md +7 -0
  2. {cfsem-3.0.2 → cfsem-3.0.3}/PKG-INFO +1 -1
  3. {cfsem-3.0.2 → cfsem-3.0.3}/cfsem/bindings.py +2 -2
  4. {cfsem-3.0.2 → cfsem-3.0.3}/pyproject.toml +1 -1
  5. {cfsem-3.0.2 → cfsem-3.0.3}/uv.lock +1 -1
  6. {cfsem-3.0.2 → cfsem-3.0.3}/.cargo/config.toml +0 -0
  7. {cfsem-3.0.2 → cfsem-3.0.3}/.github/workflows/release_python.yml +0 -0
  8. {cfsem-3.0.2 → cfsem-3.0.3}/.github/workflows/release_rust.yml +0 -0
  9. {cfsem-3.0.2 → cfsem-3.0.3}/.github/workflows/test_python.yml +0 -0
  10. {cfsem-3.0.2 → cfsem-3.0.3}/.github/workflows/test_rust.yml +0 -0
  11. {cfsem-3.0.2 → cfsem-3.0.3}/.gitignore +0 -0
  12. {cfsem-3.0.2 → cfsem-3.0.3}/.readthedocs.yml +0 -0
  13. {cfsem-3.0.2 → cfsem-3.0.3}/CHANGELOG_PYTHON_ARCHIVE.md +0 -0
  14. {cfsem-3.0.2 → cfsem-3.0.3}/CHANGELOG_RUST_ARCHIVE.md +0 -0
  15. {cfsem-3.0.2 → cfsem-3.0.3}/CONTRIBUTING.md +0 -0
  16. {cfsem-3.0.2 → cfsem-3.0.3}/Cargo.lock +0 -0
  17. {cfsem-3.0.2 → cfsem-3.0.3}/Cargo.toml +0 -0
  18. {cfsem-3.0.2 → cfsem-3.0.3}/LICENSE +0 -0
  19. {cfsem-3.0.2 → cfsem-3.0.3}/README.md +0 -0
  20. {cfsem-3.0.2 → cfsem-3.0.3}/benches/circular_filament.rs +0 -0
  21. {cfsem-3.0.2 → cfsem-3.0.3}/benches/linear_filament.rs +0 -0
  22. {cfsem-3.0.2 → cfsem-3.0.3}/benches/point_source.rs +0 -0
  23. {cfsem-3.0.2 → cfsem-3.0.3}/build_docs.sh +0 -0
  24. {cfsem-3.0.2 → cfsem-3.0.3}/cfsem/__init__.py +0 -0
  25. {cfsem-3.0.2 → cfsem-3.0.3}/cfsem/py.typed +0 -0
  26. {cfsem-3.0.2 → cfsem-3.0.3}/cfsem/solenoid_stress/__init__.py +0 -0
  27. {cfsem-3.0.2 → cfsem-3.0.3}/cfsem/solenoid_stress/solenoid_1d.py +0 -0
  28. {cfsem-3.0.2 → cfsem-3.0.3}/cfsem/solenoid_stress/solenoid_handcalc.py +0 -0
  29. {cfsem-3.0.2 → cfsem-3.0.3}/cfsem/solenoid_stress/thick_wall_cylinder_handcalc.py +0 -0
  30. {cfsem-3.0.2 → cfsem-3.0.3}/cfsem/types.py +0 -0
  31. {cfsem-3.0.2 → cfsem-3.0.3}/docs/assets/logo.svg +0 -0
  32. {cfsem-3.0.2 → cfsem-3.0.3}/docs/index.md +0 -0
  33. {cfsem-3.0.2 → cfsem-3.0.3}/docs/javascripts/mathjax.js +0 -0
  34. {cfsem-3.0.2 → cfsem-3.0.3}/docs/python/example_outputs/.placeholder +0 -0
  35. {cfsem-3.0.2 → cfsem-3.0.3}/docs/python/examples.md +0 -0
  36. {cfsem-3.0.2 → cfsem-3.0.3}/docs/python/filament.md +0 -0
  37. {cfsem-3.0.2 → cfsem-3.0.3}/docs/python/flux_density.md +0 -0
  38. {cfsem-3.0.2 → cfsem-3.0.3}/docs/python/force.md +0 -0
  39. {cfsem-3.0.2 → cfsem-3.0.3}/docs/python/grad_shafranov.md +0 -0
  40. {cfsem-3.0.2 → cfsem-3.0.3}/docs/python/inductance.md +0 -0
  41. {cfsem-3.0.2 → cfsem-3.0.3}/docs/python/math.md +0 -0
  42. {cfsem-3.0.2 → cfsem-3.0.3}/docs/python/solenoid_stress.md +0 -0
  43. {cfsem-3.0.2 → cfsem-3.0.3}/docs/python/types.md +0 -0
  44. {cfsem-3.0.2 → cfsem-3.0.3}/docs/python/vector_potential.md +0 -0
  45. {cfsem-3.0.2 → cfsem-3.0.3}/docs/requirements.txt +0 -0
  46. {cfsem-3.0.2 → cfsem-3.0.3}/docs/stylesheets/extra.css +0 -0
  47. {cfsem-3.0.2 → cfsem-3.0.3}/examples/helmholtz.py +0 -0
  48. {cfsem-3.0.2 → cfsem-3.0.3}/examples/inductance.py +0 -0
  49. {cfsem-3.0.2 → cfsem-3.0.3}/katex-header.html +0 -0
  50. {cfsem-3.0.2 → cfsem-3.0.3}/mkdocs.yml +0 -0
  51. {cfsem-3.0.2 → cfsem-3.0.3}/src/lib.rs +0 -0
  52. {cfsem-3.0.2 → cfsem-3.0.3}/src/math.rs +0 -0
  53. {cfsem-3.0.2 → cfsem-3.0.3}/src/mesh.rs +0 -0
  54. {cfsem-3.0.2 → cfsem-3.0.3}/src/physics/biotsavart.rs +0 -0
  55. {cfsem-3.0.2 → cfsem-3.0.3}/src/physics/circular_filament.rs +0 -0
  56. {cfsem-3.0.2 → cfsem-3.0.3}/src/physics/gradshafranov.rs +0 -0
  57. {cfsem-3.0.2 → cfsem-3.0.3}/src/physics/linear_filament.rs +0 -0
  58. {cfsem-3.0.2 → cfsem-3.0.3}/src/physics/mesh_filament.rs +0 -0
  59. {cfsem-3.0.2 → cfsem-3.0.3}/src/physics/mod.rs +0 -0
  60. {cfsem-3.0.2 → cfsem-3.0.3}/src/physics/point_source.rs +0 -0
  61. {cfsem-3.0.2 → cfsem-3.0.3}/src/physics/volumetric.rs +0 -0
  62. {cfsem-3.0.2 → cfsem-3.0.3}/src/python.rs +0 -0
  63. {cfsem-3.0.2 → cfsem-3.0.3}/src/testing.rs +0 -0
  64. {cfsem-3.0.2 → cfsem-3.0.3}/test/__init__.py +0 -0
  65. {cfsem-3.0.2 → cfsem-3.0.3}/test/test_electromagnetics.py +0 -0
  66. {cfsem-3.0.2 → cfsem-3.0.3}/test/test_examples.py +0 -0
  67. {cfsem-3.0.2 → cfsem-3.0.3}/test/test_filaments.py +0 -0
  68. {cfsem-3.0.2 → cfsem-3.0.3}/test/test_funcs.py +0 -0
  69. {cfsem-3.0.2 → cfsem-3.0.3}/test/test_gradshafranov.py +0 -0
  70. {cfsem-3.0.2 → cfsem-3.0.3}/test/test_math.py +0 -0
  71. {cfsem-3.0.2 → cfsem-3.0.3}/test/test_solenoid_stress.py +0 -0
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## 3.0.3 2025-11-06
4
+
5
+ ### Changed
6
+
7
+ * Use ternary instead of or-defaulting for array defaults in dipole functions
8
+ * Eliminates issue with ambiguous truthiness of arrays under some circumstances
9
+
3
10
  ## 3.0.2 2025-11-05
4
11
 
5
12
  ### Changed
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cfsem
3
- Version: 3.0.2
3
+ Version: 3.0.3
4
4
  Classifier: Programming Language :: Rust
5
5
  Classifier: Programming Language :: Python :: Implementation :: CPython
6
6
  Classifier: Programming Language :: Python :: Implementation :: PyPy
@@ -492,7 +492,7 @@ def flux_density_dipole(
492
492
  loc = _3tup_contig(loc)
493
493
  moment = _3tup_contig(moment)
494
494
  xyzp = _3tup_contig(xyzp)
495
- outer_radius = outer_radius or zeros_like(loc[0])
495
+ outer_radius = outer_radius if outer_radius is not None else zeros_like(loc[0])
496
496
  outer_radius = ascontiguousarray(outer_radius).ravel()
497
497
 
498
498
  bx, by, bz = em_flux_density_dipole(loc, moment, xyzp, outer_radius, par) # [T]
@@ -523,7 +523,7 @@ def vector_potential_dipole(
523
523
  loc = _3tup_contig(loc)
524
524
  moment = _3tup_contig(moment)
525
525
  xyzp = _3tup_contig(xyzp)
526
- outer_radius = outer_radius or zeros_like(loc[0])
526
+ outer_radius = outer_radius if outer_radius is not None else zeros_like(loc[0])
527
527
  outer_radius = ascontiguousarray(outer_radius).ravel()
528
528
 
529
529
  ax, ay, az = em_vector_potential_dipole(loc, moment, xyzp, outer_radius, par) # [T]
@@ -4,7 +4,7 @@ build-backend = "maturin"
4
4
 
5
5
  [project]
6
6
  name = "cfsem"
7
- version = "3.0.2"
7
+ version = "3.0.3"
8
8
  description = "Quasi-steady electromagnetics including filamentized approximations, Biot-Savart, and Grad-Shafranov."
9
9
  authors = [{name = "Commonwealth Fusion Systems", email = "jlogan@cfs.energy"}]
10
10
  requires-python = ">=3.10, <3.14"
@@ -48,7 +48,7 @@ wheels = [
48
48
 
49
49
  [[package]]
50
50
  name = "cfsem"
51
- version = "3.0.2"
51
+ version = "3.0.3"
52
52
  source = { editable = "." }
53
53
  dependencies = [
54
54
  { name = "findiff" },
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes