radia 1.3.2__tar.gz → 1.3.4__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 (225) hide show
  1. {radia-1.3.2 → radia-1.3.4}/LICENSE +93 -93
  2. {radia-1.3.2/src/radia.egg-info → radia-1.3.4}/PKG-INFO +16 -19
  3. {radia-1.3.2 → radia-1.3.4}/README.md +15 -18
  4. {radia-1.3.2 → radia-1.3.4}/docs/API_EXTENSIONS.md +110 -21
  5. {radia-1.3.2 → radia-1.3.4}/docs/API_REFERENCE.md +90 -22
  6. {radia-1.3.2 → radia-1.3.4}/docs/CF_BACKGROUND_FIELD_IMPLEMENTATION.md +1 -1
  7. {radia-1.3.2 → radia-1.3.4}/docs/HMATRIX_USER_GUIDE.md +132 -48
  8. {radia-1.3.2 → radia-1.3.4}/docs/MATERIAL_API_IMPLEMENTATION.md +21 -8
  9. {radia-1.3.2 → radia-1.3.4}/docs/NGSOLVE_CF_BACKGROUND_FIELD_DESIGN.md +2 -2
  10. {radia-1.3.2 → radia-1.3.4}/docs/NGSOLVE_INTEGRATION.md +52 -15
  11. {radia-1.3.2 → radia-1.3.4}/docs/NGSOLVE_USAGE_GUIDE.md +65 -14
  12. {radia-1.3.2 → radia-1.3.4}/docs/README.md +68 -68
  13. {radia-1.3.2 → radia-1.3.4}/docs/scripts/README.md +89 -89
  14. radia-1.3.4/examples/NGSolve_Integration/README.md +279 -0
  15. {radia-1.3.2 → radia-1.3.4}/examples/NGSolve_Integration/benchmark_gridfunction_set.py +3 -3
  16. {radia-1.3.2 → radia-1.3.4}/examples/NGSolve_Integration/demo_batch_evaluation.py +183 -183
  17. {radia-1.3.2 → radia-1.3.4}/examples/NGSolve_Integration/demo_field_types.py +6 -6
  18. {radia-1.3.2 → radia-1.3.4}/examples/NGSolve_Integration/example_hmatrix_cache_usage.py +4 -4
  19. radia-1.3.4/examples/NGSolve_Integration/mesh_magnetization_import/RADIA_TETRA_ROOT_CAUSE.md +62 -0
  20. radia-1.3.4/examples/NGSolve_Integration/mesh_magnetization_import/README.md +274 -0
  21. radia-1.3.4/examples/NGSolve_Integration/mesh_magnetization_import/compare_radia_ngsolve_cube.py +191 -0
  22. radia-1.3.4/examples/NGSolve_Integration/mesh_magnetization_import/cube_hex.vtk +601 -0
  23. radia-1.3.4/examples/NGSolve_Integration/mesh_magnetization_import/demo_tetrahedral_methods_comparison.py +91 -0
  24. radia-1.3.4/examples/NGSolve_Integration/mesh_magnetization_import/ngsolve_cube_graded_mesh.vtk +130354 -0
  25. radia-1.3.4/examples/NGSolve_Integration/mesh_magnetization_import/ngsolve_cube_uniform_field.py +242 -0
  26. radia-1.3.4/examples/NGSolve_Integration/mesh_magnetization_import/ngsolve_tet_mesh.vtk +130354 -0
  27. radia-1.3.4/examples/NGSolve_Integration/mesh_magnetization_import/sphere_domain_graded_mesh.vtk +6817 -0
  28. {radia-1.3.2 → radia-1.3.4}/examples/NGSolve_Integration/test_batch_evaluation.py +5 -5
  29. {radia-1.3.2 → radia-1.3.4}/examples/NGSolve_Integration/verify_curl_A_equals_B.py +3 -3
  30. {radia-1.3.2 → radia-1.3.4}/examples/NGSolve_Integration/visualize_field.py +2 -2
  31. {radia-1.3.2 → radia-1.3.4}/examples/README.md +3 -3
  32. {radia-1.3.2 → radia-1.3.4}/examples/background_fields/README.md +434 -434
  33. radia-1.3.2/examples/background_fields/Cubit2Nastran.py → radia-1.3.4/examples/background_fields/cubit_to_nastran.py +59 -59
  34. {radia-1.3.2 → radia-1.3.4}/examples/background_fields/permeability_comparison.py +278 -278
  35. {radia-1.3.2 → radia-1.3.4}/examples/background_fields/quadrupole_analytical.py +218 -218
  36. radia-1.3.4/examples/background_fields/quadrupole_analytical.vtk.vtk +26 -0
  37. {radia-1.3.2 → radia-1.3.4}/examples/background_fields/sphere_in_quadrupole.py +244 -244
  38. {radia-1.3.2 → radia-1.3.4}/examples/background_fields/sphere_nastran_analysis.py +534 -529
  39. {radia-1.3.2 → radia-1.3.4}/examples/complex_coil_geometry/visualize_coils.py +156 -156
  40. radia-1.3.4/examples/electromagnet/README.md +300 -0
  41. radia-1.3.4/examples/electromagnet/Radia_model.vtk +4933 -0
  42. radia-1.3.4/examples/electromagnet/York.vtk +1467 -0
  43. radia-1.3.4/examples/electromagnet/field_distribution.vtk +27350 -0
  44. radia-1.3.4/examples/electromagnet/main_simulation_workflow.py +156 -0
  45. radia-1.3.4/examples/electromagnet/visualize_paraview.py +162 -0
  46. radia-1.3.4/examples/electromagnet/york_cubit_mesh.py +89 -0
  47. radia-1.3.4/examples/magnets/README_CUBE_BENCHMARK.md +331 -0
  48. radia-1.3.4/examples/magnets/cube_benchmark_external_field.py +326 -0
  49. radia-1.3.4/examples/magnets/cube_benchmark_radia.vtk +225 -0
  50. {radia-1.3.2 → radia-1.3.4}/examples/simple_problems/CONVERSION_NOTES.md +186 -186
  51. {radia-1.3.2 → radia-1.3.4}/examples/simple_problems/README.md +134 -134
  52. {radia-1.3.2 → radia-1.3.4}/examples/smco_magnet_array/README.md +282 -282
  53. {radia-1.3.2 → radia-1.3.4}/examples/solver_benchmarks/HMATRIX_FIELD_DESIGN.md +1 -1
  54. {radia-1.3.2 → radia-1.3.4}/examples/solver_benchmarks/HMATRIX_FIELD_DESIGN_SIMPLIFIED.md +7 -7
  55. {radia-1.3.2 → radia-1.3.4}/examples/solver_benchmarks/benchmark_field_evaluation.py +2 -2
  56. {radia-1.3.2 → radia-1.3.4}/pyproject.toml +1 -1
  57. radia-1.3.4/src/python/nastran_mesh_import.py +441 -0
  58. radia-1.3.4/src/python/netgen_mesh_import.py +572 -0
  59. {radia-1.3.2 → radia-1.3.4}/src/python/rad_ngsolve.pyd +0 -0
  60. {radia-1.3.2 → radia-1.3.4}/src/python/radia_field_cached.py +274 -274
  61. radia-1.3.4/src/python/radia_ngsolve.pyd +0 -0
  62. radia-1.3.4/src/python/radia_ngsolve_utils.py +293 -0
  63. radia-1.3.4/src/python/radia_vtk_export.py +221 -0
  64. {radia-1.3.2 → radia-1.3.4/src/radia.egg-info}/PKG-INFO +16 -19
  65. {radia-1.3.2 → radia-1.3.4}/src/radia.egg-info/SOURCES.txt +37 -37
  66. {radia-1.3.2 → radia-1.3.4}/tests/README.md +3 -3
  67. {radia-1.3.2 → radia-1.3.4}/tests/__init__.py +27 -27
  68. {radia-1.3.2 → radia-1.3.4}/tests/benchmarks/benchmark_correct.py +243 -243
  69. {radia-1.3.2 → radia-1.3.4}/tests/benchmarks/benchmark_heavy.py +181 -181
  70. {radia-1.3.2 → radia-1.3.4}/tests/benchmarks/benchmark_openmp.py +248 -248
  71. {radia-1.3.2 → radia-1.3.4}/tests/benchmarks/benchmark_threads.py +141 -141
  72. {radia-1.3.2 → radia-1.3.4}/tests/conftest.py +1 -1
  73. {radia-1.3.2 → radia-1.3.4}/tests/test_all_spaces.py +151 -151
  74. radia-1.3.4/tests/test_background_field_debug.py +187 -0
  75. {radia-1.3.2 → radia-1.3.4}/tests/test_batch_evaluation.py +3 -3
  76. {radia-1.3.2 → radia-1.3.4}/tests/test_cf_direct.py +69 -69
  77. {radia-1.3.2 → radia-1.3.4}/tests/test_convergence_hdiv.py +152 -152
  78. {radia-1.3.2 → radia-1.3.4}/tests/test_curlA_equals_B.py +5 -5
  79. {radia-1.3.2 → radia-1.3.4}/tests/test_curl_A_detailed.py +142 -142
  80. {radia-1.3.2 → radia-1.3.4}/tests/test_far_field_accuracy.py +133 -133
  81. {radia-1.3.2 → radia-1.3.4}/tests/test_fast_preparecache.py +167 -167
  82. {radia-1.3.2 → radia-1.3.4}/tests/test_fast_simple.py +79 -79
  83. {radia-1.3.2 → radia-1.3.4}/tests/test_hcurl_vs_hdiv.py +103 -103
  84. {radia-1.3.2 → radia-1.3.4}/tests/test_hmatrix_cache.py +2 -2
  85. {radia-1.3.2 → radia-1.3.4}/tests/test_hmatrix_cache_simple.py +5 -5
  86. {radia-1.3.2 → radia-1.3.4}/tests/test_l2_norm_debug.py +2 -2
  87. radia-1.3.4/tests/test_memory_allocation_tracking.py +70 -0
  88. {radia-1.3.2 → radia-1.3.4}/tests/test_minimal_cached.py +57 -57
  89. radia-1.3.4/tests/test_moving_magnet_memory.py +250 -0
  90. radia-1.3.4/tests/test_moving_magnet_memory_diagnosis.py +217 -0
  91. {radia-1.3.2 → radia-1.3.4}/tests/test_objbckg_simple.py +56 -56
  92. {radia-1.3.2 → radia-1.3.4}/tests/test_objbckgcf_alone.py +71 -71
  93. {radia-1.3.2 → radia-1.3.4}/tests/test_order1.py +54 -54
  94. {radia-1.3.2 → radia-1.3.4}/tests/test_preparecache_performance.py +111 -111
  95. radia-1.3.4/tests/test_process_memory.py +77 -0
  96. {radia-1.3.2 → radia-1.3.4}/tests/test_python_cached_field.py +200 -200
  97. {radia-1.3.2 → radia-1.3.4}/tests/test_python_cached_simple.py +141 -141
  98. {radia-1.3.2 → radia-1.3.4}/tests/test_rad_ngsolve.py +13 -13
  99. {radia-1.3.2 → radia-1.3.4}/tests/test_rad_ngsolve_diagnostic.py +78 -78
  100. {radia-1.3.2 → radia-1.3.4}/tests/test_rad_ngsolve_function.py +70 -70
  101. {radia-1.3.2 → radia-1.3.4}/tests/test_rad_ngsolve_hmatrix.py +5 -5
  102. radia-1.3.4/tests/test_radia_core_memory.py +110 -0
  103. radia-1.3.4/tests/test_radia_field_computation_memory.py +158 -0
  104. radia-1.3.4/tests/test_radia_ngsolve_longrun.py +120 -0
  105. radia-1.3.4/tests/test_radia_ngsolve_memory_leak.py +130 -0
  106. radia-1.3.4/tests/test_radia_ngsolve_with_cache.py +135 -0
  107. radia-1.3.4/tests/test_radia_only_memory.py +206 -0
  108. {radia-1.3.2 → radia-1.3.4}/tests/test_set_vs_interpolate.py +125 -125
  109. radia-1.3.4/tests/test_simple_fld_leak.py +55 -0
  110. radia-1.3.4/tests/test_tetrahedral_solver.py +220 -0
  111. radia-1.3.4/tests/test_unit_conversion_verify.py +126 -0
  112. {radia-1.3.2 → radia-1.3.4}/tests/test_utils.py +82 -82
  113. {radia-1.3.2 → radia-1.3.4}/tests/test_without_B_projection.py +127 -127
  114. {radia-1.3.2 → radia-1.3.4}/tests/test_without_gridfunction.py +63 -63
  115. {radia-1.3.2 → radia-1.3.4}/tests/verify_curl_A_equals_B.py +3 -3
  116. radia-1.3.2/examples/NGSolve_Integration/HMATRIX_ANALYSIS.md +0 -208
  117. radia-1.3.2/examples/NGSolve_Integration/HMATRIX_FIELD_EVALUATION_ISSUE.md +0 -275
  118. radia-1.3.2/examples/NGSolve_Integration/H_MATRIX_PARALLEL_OPTIMIZATION.md +0 -417
  119. radia-1.3.2/examples/NGSolve_Integration/NGBEM_ANALYSIS.md +0 -460
  120. radia-1.3.2/examples/NGSolve_Integration/NGSOLVE_SET_VS_INTERPOLATE.md +0 -594
  121. radia-1.3.2/examples/NGSolve_Integration/PROPOSAL_VECTORIZED_API.md +0 -170
  122. radia-1.3.2/examples/NGSolve_Integration/README.md +0 -365
  123. radia-1.3.2/examples/NGSolve_Integration/SET_VS_INTERPOLATE_SIMPLE.md +0 -602
  124. radia-1.3.2/examples/NGSolve_Integration/SOLVER_OPTIMIZATION_PROPOSAL.md +0 -530
  125. radia-1.3.2/examples/NGSolve_Integration/export_radia_geometry.py +0 -80
  126. radia-1.3.2/examples/NGSolve_Integration/radia_field.pvsm +0 -9339
  127. radia-1.3.2/examples/NGSolve_Integration/test_batch_fld.py +0 -138
  128. radia-1.3.2/examples/NGSolve_Integration/test_coordinate_transform.py +0 -252
  129. radia-1.3.2/examples/NGSolve_Integration/test_gridfunction_simple.py +0 -72
  130. radia-1.3.2/examples/NGSolve_Integration/test_mesh_convergence.py +0 -156
  131. radia-1.3.2/examples/NGSolve_Integration/test_set_vs_interpolate.py +0 -158
  132. radia-1.3.2/examples/electromagnet/README.md +0 -436
  133. radia-1.3.2/examples/electromagnet/electromagnet.pvsm +0 -10415
  134. radia-1.3.2/examples/electromagnet/electromagnet.vtk +0 -3882
  135. radia-1.3.2/examples/electromagnet/field_distribution.vtk +0 -13680
  136. radia-1.3.2/examples/electromagnet/magnet.py +0 -232
  137. radia-1.3.2/examples/electromagnet/racetrack_coil_model.py +0 -187
  138. radia-1.3.2/examples/electromagnet/yoke_model.py +0 -252
  139. radia-1.3.2/src/python/nastran_reader.py +0 -295
  140. radia-1.3.2/src/python/radia.pyd +0 -0
  141. radia-1.3.2/src/python/radia_vtk_export.py +0 -134
  142. {radia-1.3.2 → radia-1.3.4}/COPYRIGHT.txt +0 -0
  143. {radia-1.3.2 → radia-1.3.4}/MANIFEST.in +0 -0
  144. {radia-1.3.2 → radia-1.3.4}/docs/HMATRIX_BENCHMARKS_RESULTS.md +0 -0
  145. {radia-1.3.2 → radia-1.3.4}/docs/HMATRIX_ENHANCEMENT_PROPOSAL_2025.md +0 -0
  146. {radia-1.3.2 → radia-1.3.4}/docs/HMATRIX_IMPLEMENTATION_HISTORY.md +0 -0
  147. {radia-1.3.2 → radia-1.3.4}/docs/HMATRIX_SERIALIZATION.md +0 -0
  148. {radia-1.3.2 → radia-1.3.4}/docs/ML_PARAMETER_TUNING.md +0 -0
  149. {radia-1.3.2 → radia-1.3.4}/docs/hmatrix_field_design.md +0 -0
  150. {radia-1.3.2 → radia-1.3.4}/examples/background_fields/sphere_nastran_field_mu.pvsm +0 -0
  151. {radia-1.3.2 → radia-1.3.4}/examples/background_fields/sphere_nastran_geometry.vtk +0 -0
  152. {radia-1.3.2 → radia-1.3.4}/examples/complex_coil_geometry/README.md +0 -0
  153. {radia-1.3.2 → radia-1.3.4}/examples/complex_coil_geometry/coil_geometry.vtk +0 -0
  154. {radia-1.3.2 → radia-1.3.4}/examples/complex_coil_geometry/coil_model.py +0 -0
  155. {radia-1.3.2 → radia-1.3.4}/examples/complex_coil_geometry/complex_coil.pvsm +0 -0
  156. {radia-1.3.2 → radia-1.3.4}/examples/complex_coil_geometry/field_map.py +0 -0
  157. {radia-1.3.2 → radia-1.3.4}/examples/complex_coil_geometry/field_map.vtk +0 -0
  158. {radia-1.3.2 → radia-1.3.4}/examples/simple_problems/arc_current_dual_magnets.py +0 -0
  159. {radia-1.3.2 → radia-1.3.4}/examples/simple_problems/arc_current_with_magnet.py +0 -0
  160. {radia-1.3.2 → radia-1.3.4}/examples/simple_problems/chamfered_pole_piece.py +0 -0
  161. {radia-1.3.2 → radia-1.3.4}/examples/simple_problems/compare_magpylib.py +0 -0
  162. {radia-1.3.2 → radia-1.3.4}/examples/simple_problems/cubic_polyhedron_magnet.py +0 -0
  163. {radia-1.3.2 → radia-1.3.4}/examples/simple_problems/hmatrix_update_magnetization.py +0 -0
  164. {radia-1.3.2 → radia-1.3.4}/examples/smco_magnet_array/smbo.pvsm +0 -0
  165. {radia-1.3.2 → radia-1.3.4}/examples/smco_magnet_array/smco_array.py +0 -0
  166. {radia-1.3.2 → radia-1.3.4}/examples/smco_magnet_array/smco_array.vtk +0 -0
  167. {radia-1.3.2 → radia-1.3.4}/examples/smco_magnet_array/smco_field_distribution.vtk +0 -0
  168. {radia-1.3.2 → radia-1.3.4}/examples/solver_benchmarks/BENCHMARK_RESULTS.md +0 -0
  169. {radia-1.3.2 → radia-1.3.4}/examples/solver_benchmarks/PHASE2B_REEVALUATION.md +0 -0
  170. {radia-1.3.2 → radia-1.3.4}/examples/solver_benchmarks/README.md +0 -0
  171. {radia-1.3.2 → radia-1.3.4}/examples/solver_benchmarks/SCALING_RESULTS.md +0 -0
  172. {radia-1.3.2 → radia-1.3.4}/examples/solver_benchmarks/benchmark_hmatrix_field.py +0 -0
  173. {radia-1.3.2 → radia-1.3.4}/examples/solver_benchmarks/benchmark_hmatrix_scaling_exact.py +0 -0
  174. {radia-1.3.2 → radia-1.3.4}/examples/solver_benchmarks/benchmark_large_scale_comparison.py +0 -0
  175. {radia-1.3.2 → radia-1.3.4}/examples/solver_benchmarks/benchmark_linear_material.py +0 -0
  176. {radia-1.3.2 → radia-1.3.4}/examples/solver_benchmarks/benchmark_matrix_construction.py +0 -0
  177. {radia-1.3.2 → radia-1.3.4}/examples/solver_benchmarks/benchmark_parallel_construction.py +0 -0
  178. {radia-1.3.2 → radia-1.3.4}/examples/solver_benchmarks/benchmark_solver.py +0 -0
  179. {radia-1.3.2 → radia-1.3.4}/examples/solver_benchmarks/benchmark_solver_comparison.py +0 -0
  180. {radia-1.3.2 → radia-1.3.4}/examples/solver_benchmarks/benchmark_solver_methods.py +0 -0
  181. {radia-1.3.2 → radia-1.3.4}/examples/solver_benchmarks/benchmark_solver_scaling.py +0 -0
  182. {radia-1.3.2 → radia-1.3.4}/examples/solver_benchmarks/benchmark_solver_scaling_extended.py +0 -0
  183. {radia-1.3.2 → radia-1.3.4}/examples/solver_benchmarks/plot_benchmark_results.py +0 -0
  184. {radia-1.3.2 → radia-1.3.4}/examples/solver_benchmarks/run_all_benchmarks.py +0 -0
  185. {radia-1.3.2 → radia-1.3.4}/examples/solver_benchmarks/run_all_hmatrix_benchmarks.py +0 -0
  186. {radia-1.3.2 → radia-1.3.4}/examples/solver_benchmarks/verify_field_accuracy.py +0 -0
  187. {radia-1.3.2 → radia-1.3.4}/setup.cfg +0 -0
  188. {radia-1.3.2 → radia-1.3.4}/setup.py +0 -0
  189. {radia-1.3.2 → radia-1.3.4}/src/python/__init__.py +0 -0
  190. {radia-1.3.2 → radia-1.3.4}/src/python/rad_ngsolve_fast.py +0 -0
  191. {radia-1.3.2 → radia-1.3.4}/src/python/radia_coil_builder.py +0 -0
  192. {radia-1.3.2 → radia-1.3.4}/src/python/radia_ngsolve_field.py +0 -0
  193. {radia-1.3.2 → radia-1.3.4}/src/python/radia_pyvista_viewer.py +0 -0
  194. {radia-1.3.2 → radia-1.3.4}/src/radia.egg-info/dependency_links.txt +0 -0
  195. {radia-1.3.2 → radia-1.3.4}/src/radia.egg-info/not-zip-safe +0 -0
  196. {radia-1.3.2 → radia-1.3.4}/src/radia.egg-info/requires.txt +0 -0
  197. {radia-1.3.2 → radia-1.3.4}/src/radia.egg-info/top_level.txt +0 -0
  198. {radia-1.3.2 → radia-1.3.4}/tests/benchmark_hmatrix.py +0 -0
  199. {radia-1.3.2 → radia-1.3.4}/tests/hmatrix/test_phase2a_final.py +0 -0
  200. {radia-1.3.2 → radia-1.3.4}/tests/hmatrix/test_phase2a_hmatrix_reuse.py +0 -0
  201. {radia-1.3.2 → radia-1.3.4}/tests/hmatrix/test_phase2a_with_field.py +0 -0
  202. {radia-1.3.2 → radia-1.3.4}/tests/hmatrix/test_phase2b_geometry_detection.py +0 -0
  203. {radia-1.3.2 → radia-1.3.4}/tests/hmatrix/test_phase3_magnetization_update.py +0 -0
  204. {radia-1.3.2 → radia-1.3.4}/tests/hmatrix/test_phase3b_large_problem.py +0 -0
  205. {radia-1.3.2 → radia-1.3.4}/tests/hmatrix/test_phase3b_serialization.py +0 -0
  206. {radia-1.3.2 → radia-1.3.4}/tests/hmatrix/test_phase3b_solver_cache.py +0 -0
  207. {radia-1.3.2 → radia-1.3.4}/tests/hmatrix/test_serialize_step1_build.py +0 -0
  208. {radia-1.3.2 → radia-1.3.4}/tests/hmatrix/test_serialize_step2_load.py +0 -0
  209. {radia-1.3.2 → radia-1.3.4}/tests/hmatrix/test_verify_field_simple.py +0 -0
  210. {radia-1.3.2 → radia-1.3.4}/tests/profile_batch_performance.py +0 -0
  211. {radia-1.3.2 → radia-1.3.4}/tests/test_advanced.py +0 -0
  212. {radia-1.3.2 → radia-1.3.4}/tests/test_group_operations.py +0 -0
  213. {radia-1.3.2 → radia-1.3.4}/tests/test_magpylib_comparison.py +0 -0
  214. {radia-1.3.2 → radia-1.3.4}/tests/test_materials.py +0 -0
  215. {radia-1.3.2 → radia-1.3.4}/tests/test_new_material_api.py +0 -0
  216. {radia-1.3.2 → radia-1.3.4}/tests/test_parallel_performance.py +0 -0
  217. {radia-1.3.2 → radia-1.3.4}/tests/test_radhmat.py +0 -0
  218. {radia-1.3.2 → radia-1.3.4}/tests/test_radia.py +0 -0
  219. {radia-1.3.2 → radia-1.3.4}/tests/test_serialization.py +0 -0
  220. {radia-1.3.2 → radia-1.3.4}/tests/test_simple.py +0 -0
  221. {radia-1.3.2 → radia-1.3.4}/tests/test_square_coil_analytical.py +0 -0
  222. {radia-1.3.2 → radia-1.3.4}/tests/test_transformations.py +0 -0
  223. {radia-1.3.2 → radia-1.3.4}/tests/test_type_cast.py +0 -0
  224. {radia-1.3.2 → radia-1.3.4}/tests/test_update_hmatrix_magnetization.py +0 -0
  225. {radia-1.3.2 → radia-1.3.4}/tests/test_vector_potential.py +0 -0
@@ -1,93 +1,93 @@
1
- RADIA SOFTWARE LICENSE
2
- ======================
3
-
4
- This software contains multiple components with different licenses:
5
-
6
- 1. RADIA Core (BSD-style License)
7
- 2. HACApK_LH-Cimplm Library (MIT License)
8
-
9
- All licenses are permissive open-source licenses allowing redistribution
10
- and modification.
11
-
12
- ================================================================================
13
- PART 1: RADIA CORE
14
- ================================================================================
15
-
16
- Copyright © 1997 - 2018, European Synchrotron Radiation Facility
17
-
18
- The RADIA software is distributed subject to the following license conditions:
19
-
20
- Redistribution and use in source and binary forms, with or without
21
- modification, are permitted provided that the following conditions are met:
22
-
23
- 1. Redistributions of source code must retain the above copyright notice,
24
- this list of conditions and the following disclaimer.
25
-
26
- 2. Redistributions in binary form must reproduce the above copyright notice,
27
- this list of conditions and the following disclaimer in the documentation
28
- and/or other materials provided with the distribution.
29
-
30
- DISCLAIMER: THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS "AS IS"
31
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
32
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
33
- ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
34
- ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
35
- DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
36
- SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
37
- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
38
- OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
39
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
40
-
41
- The views and conclusions contained in the software and documentation are
42
- those of the authors and should not be interpreted as representing official
43
- policies, either expressed or implied, of the RADIA project.
44
-
45
- ================================================================================
46
- PART 2: HACApK_LH-Cimplm (H-matrix Library)
47
- ================================================================================
48
-
49
- Software Name : HACApK
50
- Version : 1.3.0
51
- Location: src/ext/HACApK_LH-Cimplm/
52
-
53
- Copyright (c) 2015 Akihiro Ida and Takeshi Iwashita
54
-
55
- MIT License
56
-
57
- Permission is hereby granted, free of charge, to any person obtaining a copy
58
- of this software and associated documentation files (the "Software"), to deal
59
- in the Software without restriction, including without limitation the rights
60
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
61
- copies of the Software, and to permit persons to whom the Software is
62
- furnished to do so, subject to the following conditions:
63
-
64
- The above copyright notice and this permission notice shall be included in all
65
- copies or substantial portions of the Software.
66
-
67
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
68
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
69
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
70
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
71
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
72
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
73
- SOFTWARE.
74
-
75
- ppOpen-HPC project:
76
- Open Source Infrastructure for Development and Execution of Large-Scale
77
- Scientific Applications on Post-Peta-Scale Supercomputers with Automatic
78
- Tuning (AT).
79
-
80
- Sponsorship:
81
- Japan Science and Technology Agency (JST), Basic Research Programs: CREST,
82
- Development of System Software Technologies for post-Peta Scale High
83
- Performance Computing.
84
-
85
- ================================================================================
86
- ADDITIONAL COMPONENTS
87
- ================================================================================
88
-
89
- This software may include additional third-party libraries and components,
90
- each governed by their respective licenses. Please refer to the individual
91
- component directories for specific license information.
92
-
93
- ================================================================================
1
+ RADIA SOFTWARE LICENSE
2
+ ======================
3
+
4
+ This software contains multiple components with different licenses:
5
+
6
+ 1. RADIA Core (BSD-style License)
7
+ 2. HACApK_LH-Cimplm Library (MIT License)
8
+
9
+ All licenses are permissive open-source licenses allowing redistribution
10
+ and modification.
11
+
12
+ ================================================================================
13
+ PART 1: RADIA CORE
14
+ ================================================================================
15
+
16
+ Copyright © 1997 - 2018, European Synchrotron Radiation Facility
17
+
18
+ The RADIA software is distributed subject to the following license conditions:
19
+
20
+ Redistribution and use in source and binary forms, with or without
21
+ modification, are permitted provided that the following conditions are met:
22
+
23
+ 1. Redistributions of source code must retain the above copyright notice,
24
+ this list of conditions and the following disclaimer.
25
+
26
+ 2. Redistributions in binary form must reproduce the above copyright notice,
27
+ this list of conditions and the following disclaimer in the documentation
28
+ and/or other materials provided with the distribution.
29
+
30
+ DISCLAIMER: THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS "AS IS"
31
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
32
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
33
+ ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
34
+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
35
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
36
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
37
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
38
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
39
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
40
+
41
+ The views and conclusions contained in the software and documentation are
42
+ those of the authors and should not be interpreted as representing official
43
+ policies, either expressed or implied, of the RADIA project.
44
+
45
+ ================================================================================
46
+ PART 2: HACApK_LH-Cimplm (H-matrix Library)
47
+ ================================================================================
48
+
49
+ Software Name : HACApK
50
+ Version : 1.3.0
51
+ Location: src/ext/HACApK_LH-Cimplm/
52
+
53
+ Copyright (c) 2015 Akihiro Ida and Takeshi Iwashita
54
+
55
+ MIT License
56
+
57
+ Permission is hereby granted, free of charge, to any person obtaining a copy
58
+ of this software and associated documentation files (the "Software"), to deal
59
+ in the Software without restriction, including without limitation the rights
60
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
61
+ copies of the Software, and to permit persons to whom the Software is
62
+ furnished to do so, subject to the following conditions:
63
+
64
+ The above copyright notice and this permission notice shall be included in all
65
+ copies or substantial portions of the Software.
66
+
67
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
68
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
69
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
70
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
71
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
72
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
73
+ SOFTWARE.
74
+
75
+ ppOpen-HPC project:
76
+ Open Source Infrastructure for Development and Execution of Large-Scale
77
+ Scientific Applications on Post-Peta-Scale Supercomputers with Automatic
78
+ Tuning (AT).
79
+
80
+ Sponsorship:
81
+ Japan Science and Technology Agency (JST), Basic Research Programs: CREST,
82
+ Development of System Software Technologies for post-Peta Scale High
83
+ Performance Computing.
84
+
85
+ ================================================================================
86
+ ADDITIONAL COMPONENTS
87
+ ================================================================================
88
+
89
+ This software may include additional third-party libraries and components,
90
+ each governed by their respective licenses. Please refer to the individual
91
+ component directories for specific license information.
92
+
93
+ ================================================================================
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: radia
3
- Version: 1.3.2
3
+ Version: 1.3.4
4
4
  Summary: Radia 3D Magnetostatics with NGSolve Integration and OpenMP Parallelization
5
5
  Home-page: https://github.com/ksugahar/Radia_NGSolve
6
6
  Author: Pascal Elleaume
@@ -88,12 +88,12 @@ pip install radia-ngsolve
88
88
  # 1. Build radia.pyd (core module)
89
89
  .\Build.ps1
90
90
 
91
- # 2. Build rad_ngsolve.pyd (optional, for NGSolve integration)
91
+ # 2. Build radia_ngsolve.pyd (optional, for NGSolve integration)
92
92
  .\Build_NGSolve.ps1
93
93
 
94
94
  # Outputs:
95
95
  # - dist/radia.pyd
96
- # - build/Release/rad_ngsolve.pyd
96
+ # - build/Release/radia_ngsolve.pyd
97
97
  ```
98
98
 
99
99
  See [README_BUILD.md](README_BUILD.md) for detailed build instructions.
@@ -117,12 +117,12 @@ print(f"Field: {field} T")
117
117
 
118
118
  ### NGSolve Integration
119
119
 
120
- The `rad_ngsolve` module provides a C++ CoefficientFunction interface for using Radia magnetic fields in NGSolve FEM analysis.
120
+ The `radia_ngsolve` module provides a C++ CoefficientFunction interface for using Radia magnetic fields in NGSolve FEM analysis.
121
121
 
122
122
  **Function Specification:**
123
123
 
124
124
  ```python
125
- rad_ngsolve.RadiaField(radia_obj, field_type='b')
125
+ radia_ngsolve.RadiaField(radia_obj, field_type='b')
126
126
  ```
127
127
 
128
128
  **Parameters:**
@@ -149,7 +149,7 @@ import ngsolve
149
149
  from ngsolve import Mesh, H1, GridFunction
150
150
 
151
151
  import radia as rad
152
- import rad_ngsolve
152
+ import radia_ngsolve
153
153
 
154
154
  # Create Radia magnet
155
155
  magnet = rad.ObjRecMag([0,0,0], [20,20,20], [0,0,1.2]) # mm units
@@ -157,10 +157,10 @@ rad.MatApl(magnet, rad.MatPM(1.2, 900000, [0,0,1])) # NdFeB permanent magnet
157
157
  rad.Solve(magnet, 0.0001, 10000)
158
158
 
159
159
  # Create NGSolve CoefficientFunction for different field types
160
- B_field = rad_ngsolve.RadiaField(magnet, 'b') # Flux density [T]
161
- H_field = rad_ngsolve.RadiaField(magnet, 'h') # Magnetic field [A/m]
162
- A_field = rad_ngsolve.RadiaField(magnet, 'a') # Vector potential [T·m]
163
- M_field = rad_ngsolve.RadiaField(magnet, 'm') # Magnetization [A/m]
160
+ B_field = radia_ngsolve.RadiaField(magnet, 'b') # Flux density [T]
161
+ H_field = radia_ngsolve.RadiaField(magnet, 'h') # Magnetic field [A/m]
162
+ A_field = radia_ngsolve.RadiaField(magnet, 'a') # Vector potential [T·m]
163
+ M_field = radia_ngsolve.RadiaField(magnet, 'm') # Magnetization [A/m]
164
164
 
165
165
  # Use in FEM analysis (NGSolve mesh in meters)
166
166
  gf = GridFunction(fes)
@@ -177,13 +177,10 @@ See [examples/Radia_to_NGSolve_CoefficientFunction/](examples/Radia_to_NGSolve_C
177
177
  - [docs/DIRECTORY_STRUCTURE.md](docs/DIRECTORY_STRUCTURE.md) - Project structure
178
178
 
179
179
  ### NGSolve Integration
180
- - [RAD_NGSOLVE_BUILD_SUCCESS.md](RAD_NGSOLVE_BUILD_SUCCESS.md) - Complete rad_ngsolve documentation
180
+ - [RAD_NGSOLVE_BUILD_SUCCESS.md](RAD_NGSOLVE_BUILD_SUCCESS.md) - Complete radia_ngsolve documentation
181
181
  - [examples/Radia_to_NGSolve_CoefficientFunction/README.md](examples/Radia_to_NGSolve_CoefficientFunction/README.md) - NGSolve examples overview
182
182
  - [examples/Radia_to_NGSolve_CoefficientFunction/EXAMPLES_GUIDE.md](examples/Radia_to_NGSolve_CoefficientFunction/EXAMPLES_GUIDE.md) - Detailed usage guide
183
- - [tests/test_rad_ngsolve.py](tests/test_rad_ngsolve.py) - Integration tests
184
-
185
- ### Visualization
186
- - [docs/PYVISTA_VIEWER.md](examples/2024_02_03_振分電磁石/PYVISTA_VIEWER.md) - PyVista viewer guide
183
+ - [tests/test_radia_ngsolve.py](tests/test_radia_ngsolve.py) - Integration tests
187
184
 
188
185
  ### Development
189
186
  - [docs/TAB_CONVERSION_REPORT.md](docs/TAB_CONVERSION_REPORT.md) - Code style conversion
@@ -239,7 +236,7 @@ python tests/test_radia.py
239
236
  python tests/test_advanced.py
240
237
 
241
238
  # NGSolve integration test
242
- python tests/test_rad_ngsolve.py
239
+ python tests/test_radia_ngsolve.py
243
240
 
244
241
  # OpenMP performance test
245
242
  python tests/test_parallel_performance.py
@@ -248,7 +245,7 @@ python tests/test_parallel_performance.py
248
245
  pytest tests/
249
246
 
250
247
  # Run specific test suite
251
- pytest tests/test_rad_ngsolve.py -v
248
+ pytest tests/test_radia_ngsolve.py -v
252
249
  ```
253
250
 
254
251
  See [tests/README.md](tests/README.md) for detailed testing documentation.
@@ -296,7 +293,7 @@ export_geometry_to_vtk(mag, 'geometry.vtk')
296
293
  ### Runtime Requirements
297
294
  - Python 3.12
298
295
  - NumPy
299
- - NGSolve (optional, for FEM coupling via rad_ngsolve)
296
+ - NGSolve (optional, for FEM coupling via radia_ngsolve)
300
297
  - PyVista (optional, for 3D visualization)
301
298
 
302
299
  ## Changes from Original Radia
@@ -348,7 +345,7 @@ See:
348
345
 
349
346
  **This Fork**:
350
347
  - OpenMP parallelization
351
- - NGSolve C++ integration (rad_ngsolve)
348
+ - NGSolve C++ integration (radia_ngsolve)
352
349
  - Python 3.12 optimization
353
350
  - Build system modernization
354
351
  - PyVista integration
@@ -46,12 +46,12 @@ pip install radia-ngsolve
46
46
  # 1. Build radia.pyd (core module)
47
47
  .\Build.ps1
48
48
 
49
- # 2. Build rad_ngsolve.pyd (optional, for NGSolve integration)
49
+ # 2. Build radia_ngsolve.pyd (optional, for NGSolve integration)
50
50
  .\Build_NGSolve.ps1
51
51
 
52
52
  # Outputs:
53
53
  # - dist/radia.pyd
54
- # - build/Release/rad_ngsolve.pyd
54
+ # - build/Release/radia_ngsolve.pyd
55
55
  ```
56
56
 
57
57
  See [README_BUILD.md](README_BUILD.md) for detailed build instructions.
@@ -75,12 +75,12 @@ print(f"Field: {field} T")
75
75
 
76
76
  ### NGSolve Integration
77
77
 
78
- The `rad_ngsolve` module provides a C++ CoefficientFunction interface for using Radia magnetic fields in NGSolve FEM analysis.
78
+ The `radia_ngsolve` module provides a C++ CoefficientFunction interface for using Radia magnetic fields in NGSolve FEM analysis.
79
79
 
80
80
  **Function Specification:**
81
81
 
82
82
  ```python
83
- rad_ngsolve.RadiaField(radia_obj, field_type='b')
83
+ radia_ngsolve.RadiaField(radia_obj, field_type='b')
84
84
  ```
85
85
 
86
86
  **Parameters:**
@@ -107,7 +107,7 @@ import ngsolve
107
107
  from ngsolve import Mesh, H1, GridFunction
108
108
 
109
109
  import radia as rad
110
- import rad_ngsolve
110
+ import radia_ngsolve
111
111
 
112
112
  # Create Radia magnet
113
113
  magnet = rad.ObjRecMag([0,0,0], [20,20,20], [0,0,1.2]) # mm units
@@ -115,10 +115,10 @@ rad.MatApl(magnet, rad.MatPM(1.2, 900000, [0,0,1])) # NdFeB permanent magnet
115
115
  rad.Solve(magnet, 0.0001, 10000)
116
116
 
117
117
  # Create NGSolve CoefficientFunction for different field types
118
- B_field = rad_ngsolve.RadiaField(magnet, 'b') # Flux density [T]
119
- H_field = rad_ngsolve.RadiaField(magnet, 'h') # Magnetic field [A/m]
120
- A_field = rad_ngsolve.RadiaField(magnet, 'a') # Vector potential [T·m]
121
- M_field = rad_ngsolve.RadiaField(magnet, 'm') # Magnetization [A/m]
118
+ B_field = radia_ngsolve.RadiaField(magnet, 'b') # Flux density [T]
119
+ H_field = radia_ngsolve.RadiaField(magnet, 'h') # Magnetic field [A/m]
120
+ A_field = radia_ngsolve.RadiaField(magnet, 'a') # Vector potential [T·m]
121
+ M_field = radia_ngsolve.RadiaField(magnet, 'm') # Magnetization [A/m]
122
122
 
123
123
  # Use in FEM analysis (NGSolve mesh in meters)
124
124
  gf = GridFunction(fes)
@@ -135,13 +135,10 @@ See [examples/Radia_to_NGSolve_CoefficientFunction/](examples/Radia_to_NGSolve_C
135
135
  - [docs/DIRECTORY_STRUCTURE.md](docs/DIRECTORY_STRUCTURE.md) - Project structure
136
136
 
137
137
  ### NGSolve Integration
138
- - [RAD_NGSOLVE_BUILD_SUCCESS.md](RAD_NGSOLVE_BUILD_SUCCESS.md) - Complete rad_ngsolve documentation
138
+ - [RAD_NGSOLVE_BUILD_SUCCESS.md](RAD_NGSOLVE_BUILD_SUCCESS.md) - Complete radia_ngsolve documentation
139
139
  - [examples/Radia_to_NGSolve_CoefficientFunction/README.md](examples/Radia_to_NGSolve_CoefficientFunction/README.md) - NGSolve examples overview
140
140
  - [examples/Radia_to_NGSolve_CoefficientFunction/EXAMPLES_GUIDE.md](examples/Radia_to_NGSolve_CoefficientFunction/EXAMPLES_GUIDE.md) - Detailed usage guide
141
- - [tests/test_rad_ngsolve.py](tests/test_rad_ngsolve.py) - Integration tests
142
-
143
- ### Visualization
144
- - [docs/PYVISTA_VIEWER.md](examples/2024_02_03_振分電磁石/PYVISTA_VIEWER.md) - PyVista viewer guide
141
+ - [tests/test_radia_ngsolve.py](tests/test_radia_ngsolve.py) - Integration tests
145
142
 
146
143
  ### Development
147
144
  - [docs/TAB_CONVERSION_REPORT.md](docs/TAB_CONVERSION_REPORT.md) - Code style conversion
@@ -197,7 +194,7 @@ python tests/test_radia.py
197
194
  python tests/test_advanced.py
198
195
 
199
196
  # NGSolve integration test
200
- python tests/test_rad_ngsolve.py
197
+ python tests/test_radia_ngsolve.py
201
198
 
202
199
  # OpenMP performance test
203
200
  python tests/test_parallel_performance.py
@@ -206,7 +203,7 @@ python tests/test_parallel_performance.py
206
203
  pytest tests/
207
204
 
208
205
  # Run specific test suite
209
- pytest tests/test_rad_ngsolve.py -v
206
+ pytest tests/test_radia_ngsolve.py -v
210
207
  ```
211
208
 
212
209
  See [tests/README.md](tests/README.md) for detailed testing documentation.
@@ -254,7 +251,7 @@ export_geometry_to_vtk(mag, 'geometry.vtk')
254
251
  ### Runtime Requirements
255
252
  - Python 3.12
256
253
  - NumPy
257
- - NGSolve (optional, for FEM coupling via rad_ngsolve)
254
+ - NGSolve (optional, for FEM coupling via radia_ngsolve)
258
255
  - PyVista (optional, for 3D visualization)
259
256
 
260
257
  ## Changes from Original Radia
@@ -306,7 +303,7 @@ See:
306
303
 
307
304
  **This Fork**:
308
305
  - OpenMP parallelization
309
- - NGSolve C++ integration (rad_ngsolve)
306
+ - NGSolve C++ integration (radia_ngsolve)
310
307
  - Python 3.12 optimization
311
308
  - Build system modernization
312
309
  - PyVista integration
@@ -4,7 +4,7 @@ This document describes custom extensions to the original ESRF Radia API.
4
4
 
5
5
  **Original Documentation**: https://www.esrf.fr/home/Accelerators/instrumentation--equipment/Software/Radia/Documentation/ReferenceGuide.html
6
6
 
7
- **Date**: 2025-11-08
7
+ **Date**: 2025-11-27
8
8
  **Status**: Active development
9
9
 
10
10
  ---
@@ -21,7 +21,7 @@ This document describes custom extensions to the original ESRF Radia API.
21
21
  - [Performance Features](#performance-features)
22
22
  - [SolverHMatrixDisable/Enable](#solverhmatrixdisableenable)
23
23
  - [NGSolve Integration](#ngsolve-integration)
24
- - [rad_ngsolve.RadiaField](#rad_ngsolveradiafield)
24
+ - [radia_ngsolve.RadiaField](#radia_ngsolveradiafield)
25
25
 
26
26
  ---
27
27
 
@@ -106,7 +106,7 @@ For use with NGSolve's CoefficientFunction:
106
106
 
107
107
  ```python
108
108
  import ngsolve as ngs
109
- import rad_ngsolve
109
+ import radia_ngsolve
110
110
 
111
111
  # Create NGSolve coefficient function (in meters)
112
112
  def ngsolve_field_wrapper(x, y, z):
@@ -116,7 +116,7 @@ def ngsolve_field_wrapper(x, y, z):
116
116
  return B
117
117
 
118
118
  # Create background field
119
- bg_cf = rad_ngsolve.BackgroundFieldCF(ngsolve_field_wrapper)
119
+ bg_cf = radia_ngsolve.BackgroundFieldCF(ngsolve_field_wrapper)
120
120
  ```
121
121
 
122
122
  **Notes**:
@@ -416,8 +416,97 @@ rad.SolverHMatrixEnable()
416
416
 
417
417
  ---
418
418
 
419
+ ### SolverTetraMethod
420
+
421
+ **Purpose**: Set the field computation method for tetrahedral mesh elements.
422
+
423
+ **Syntax**:
424
+ ```python
425
+ rad.SolverTetraMethod(method)
426
+ ```
427
+
428
+ **Parameters**:
429
+ - `method`: Integer selecting the computation method
430
+ - `0`: Original Radia polygon-based method (default)
431
+ - `1`: Analytical method using magnetic charge formulation
432
+
433
+ **Returns**: None
434
+
435
+ **Background**:
436
+
437
+ Tetrahedral elements in Radia can compute their magnetic field contribution using two different algorithms:
438
+
439
+ | Method | Description | Best For |
440
+ |--------|-------------|----------|
441
+ | 0 | Original Radia polygon method | General purpose, standard accuracy |
442
+ | 1 | Analytical method | High-permeability materials (mu_r > 100) |
443
+
444
+ **Method 0 (Original)**:
445
+ - Uses Radia's standard polygon-based field calculation
446
+ - Treats each tetrahedral face as a magnetic charge sheet
447
+ - Well-tested and reliable for most applications
448
+
449
+ **Method 1 (Analytical)**:
450
+ - Uses analytical formulas for magnetic field from surface charges
451
+ - May provide better accuracy for high-permeability soft magnetic materials
452
+ - Mathematically equivalent to Method 0 but with different numerical implementation
453
+
454
+ **Usage Example**:
455
+
456
+ ```python
457
+ import radia as rad
458
+ from netgen_mesh_import import netgen_mesh_to_radia
459
+
460
+ # Use analytical method for high-permeability material
461
+ rad.SolverTetraMethod(1)
462
+
463
+ # Import tetrahedral mesh with soft iron (mu_r = 4000)
464
+ mesh_data = netgen_mesh_to_radia(
465
+ 'soft_iron.vol',
466
+ material={'magnetization': [0, 0, 0]}, # Zero initial M
467
+ units='m'
468
+ )
469
+
470
+ # Apply linear material
471
+ mat = rad.MatLin(3999) # ksi = mu_r - 1
472
+ rad.MatApl(mesh_data, mat)
473
+
474
+ # Solve
475
+ rad.Solve(mesh_data, 0.0001, 10000)
476
+
477
+ # Compute field
478
+ B = rad.Fld(mesh_data, 'b', [0.1, 0.1, 0.1])
479
+ ```
480
+
481
+ **Migration from Environment Variable**:
482
+
483
+ Previously, the tetrahedral method was controlled via the `RADIA_TETRA_METHOD` environment variable. This has been replaced by the `SolverTetraMethod()` API for better discoverability and control.
484
+
485
+ ```python
486
+ # Old way (deprecated):
487
+ import os
488
+ os.environ['RADIA_TETRA_METHOD'] = '1' # No longer works
489
+
490
+ # New way (recommended):
491
+ import radia as rad
492
+ rad.SolverTetraMethod(1)
493
+ ```
494
+
495
+ **Important Notes**:
496
+ - Setting is global and persists for the session
497
+ - Must be called **before** `rad.Solve()` or `rad.RlxPre()`
498
+ - Both methods should produce identical results (within numerical precision)
499
+ - Method 0 and Method 1 have been verified to produce 0.00% difference
500
+
501
+ ---
502
+
419
503
  ## Version History
420
504
 
505
+ ### v1.0.8 (2025-11-27)
506
+ - Added `SolverTetraMethod()` API for tetrahedral mesh computation method control
507
+ - Fixed ANALYTICAL method (Method 1) to match standard polygon method
508
+ - Deprecated `RADIA_TETRA_METHOD` environment variable
509
+
421
510
  ### v1.0.7 (2025-11-08)
422
511
  - Added `SetRelaxSubInterval()` for LU decomposition control
423
512
  - Extended `RlxMan()` to support Method 5 (LU decomposition)
@@ -436,18 +525,18 @@ rad.SolverHMatrixEnable()
436
525
 
437
526
  ## NGSolve Integration
438
527
 
439
- ### rad_ngsolve.RadiaField
528
+ ### radia_ngsolve.RadiaField
440
529
 
441
530
  **Purpose**: Create NGSolve CoefficientFunction for Radia magnetic field with full control over computation accuracy and performance.
442
531
 
443
- **Module**: `rad_ngsolve` (C++ extension)
532
+ **Module**: `radia_ngsolve` (C++ extension)
444
533
 
445
534
  **Syntax**:
446
535
  ```python
447
536
  from ngsolve import *
448
- import rad_ngsolve
537
+ import radia_ngsolve
449
538
 
450
- cf = rad_ngsolve.RadiaField(
539
+ cf = radia_ngsolve.RadiaField(
451
540
  radia_obj,
452
541
  field_type='b',
453
542
  origin=None,
@@ -512,13 +601,13 @@ Controls accuracy vs speed trade-off. Smaller values = more accurate but slower.
512
601
 
513
602
  ```python
514
603
  # High accuracy (slow)
515
- B_cf = rad_ngsolve.RadiaField(magnet, 'b', precision=1e-8)
604
+ B_cf = radia_ngsolve.RadiaField(magnet, 'b', precision=1e-8)
516
605
 
517
606
  # Normal accuracy (default)
518
- B_cf = rad_ngsolve.RadiaField(magnet, 'b') # Uses Radia default
607
+ B_cf = radia_ngsolve.RadiaField(magnet, 'b') # Uses Radia default
519
608
 
520
609
  # Fast evaluation (less accurate)
521
- B_cf = rad_ngsolve.RadiaField(magnet, 'b', precision=1e-4)
610
+ B_cf = radia_ngsolve.RadiaField(magnet, 'b', precision=1e-4)
522
611
  ```
523
612
 
524
613
  **Internally calls**: `rad.FldCmpPrc()` with specified precision for B, H, A, M fields.
@@ -531,13 +620,13 @@ Controls H-matrix (hierarchical matrix) acceleration.
531
620
 
532
621
  ```python
533
622
  # Disable H-matrix (accurate for small N)
534
- B_cf = rad_ngsolve.RadiaField(magnet, 'b', use_hmatrix=False)
623
+ B_cf = radia_ngsolve.RadiaField(magnet, 'b', use_hmatrix=False)
535
624
 
536
625
  # Enable H-matrix (fast for large N > 1000)
537
- B_cf = rad_ngsolve.RadiaField(magnet, 'b', use_hmatrix=True)
626
+ B_cf = radia_ngsolve.RadiaField(magnet, 'b', use_hmatrix=True)
538
627
 
539
628
  # Keep current setting (default)
540
- B_cf = rad_ngsolve.RadiaField(magnet, 'b') # use_hmatrix=None
629
+ B_cf = radia_ngsolve.RadiaField(magnet, 'b') # use_hmatrix=None
541
630
  ```
542
631
 
543
632
  **When to enable H-matrix**:
@@ -558,13 +647,13 @@ B_cf = rad_ngsolve.RadiaField(magnet, 'b') # use_hmatrix=None
558
647
  import radia as rad
559
648
  from ngsolve import *
560
649
  from netgen.occ import *
561
- import rad_ngsolve
650
+ import radia_ngsolve
562
651
 
563
652
  # Create Radia magnet
564
653
  magnet = rad.ObjRecMag([0,0,0], [10,10,10], [0,0,1.2])
565
654
 
566
655
  # Create NGSolve CoefficientFunction
567
- B_cf = rad_ngsolve.RadiaField(magnet, 'b')
656
+ B_cf = radia_ngsolve.RadiaField(magnet, 'b')
568
657
 
569
658
  # Use in NGSolve mesh
570
659
  mesh = Mesh(...)
@@ -583,7 +672,7 @@ u_axis = [np.cos(angle), np.sin(angle), 0]
583
672
  v_axis = [-np.sin(angle), np.cos(angle), 0]
584
673
  w_axis = [0, 0, 1]
585
674
 
586
- B_cf = rad_ngsolve.RadiaField(
675
+ B_cf = radia_ngsolve.RadiaField(
587
676
  magnet, 'b',
588
677
  origin=origin,
589
678
  u_axis=u_axis,
@@ -607,7 +696,7 @@ for i in range(20):
607
696
  magnet_array = rad.ObjCnt(elements) # 8000 elements
608
697
 
609
698
  # Use H-matrix for fast evaluation
610
- B_cf = rad_ngsolve.RadiaField(magnet_array, 'b', use_hmatrix=True)
699
+ B_cf = radia_ngsolve.RadiaField(magnet_array, 'b', use_hmatrix=True)
611
700
 
612
701
  # Evaluate on large mesh
613
702
  mesh = Mesh(...) # Large mesh
@@ -618,13 +707,13 @@ gf.Set(B_cf) # Fast thanks to H-matrix
618
707
  **Vector potential with curl**:
619
708
  ```python
620
709
  # Get vector potential A
621
- A_cf = rad_ngsolve.RadiaField(magnet, 'a')
710
+ A_cf = radia_ngsolve.RadiaField(magnet, 'a')
622
711
 
623
712
  # Compute B = curl(A)
624
713
  B_from_curl = Curl(A_cf)
625
714
 
626
715
  # Compare with direct B
627
- B_direct = rad_ngsolve.RadiaField(magnet, 'b')
716
+ B_direct = radia_ngsolve.RadiaField(magnet, 'b')
628
717
 
629
718
  # Should match (within numerical precision)
630
719
  ```
@@ -684,6 +773,6 @@ See [`examples/Radia_to_NGSolve_CoefficientFunction_A/README.md`](../examples/Ra
684
773
 
685
774
  ---
686
775
 
687
- **Last Updated**: 2025-11-08
776
+ **Last Updated**: 2025-11-27
688
777
  **Maintained By**: Radia Development Team
689
778
  **License**: LGPL-2.1 (modifications), BSD-style (original RADIA from ESRF)