radia 1.3.9__tar.gz → 1.3.10__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 (224) hide show
  1. {radia-1.3.9/src/radia.egg-info → radia-1.3.10}/PKG-INFO +43 -25
  2. {radia-1.3.9 → radia-1.3.10}/README.md +42 -24
  3. {radia-1.3.9 → radia-1.3.10}/docs/API_EXTENSIONS.md +5 -5
  4. {radia-1.3.9 → radia-1.3.10}/docs/API_REFERENCE.md +1 -1
  5. radia-1.3.10/docs/HMATRIX_EVALUATION.md +139 -0
  6. radia-1.3.10/docs/HYBRID_DOF_SOLVER_DESIGN.md +359 -0
  7. radia-1.3.10/docs/MESH_MSC_API_DESIGN.md +661 -0
  8. radia-1.3.10/docs/MMM_MSC_IMPLEMENTATION.md +175 -0
  9. {radia-1.3.9 → radia-1.3.10}/docs/NGSOLVE_INTEGRATION.md +85 -16
  10. {radia-1.3.9 → radia-1.3.10}/docs/README.md +7 -8
  11. {radia-1.3.9 → radia-1.3.10}/docs/SOLVER_METHODS.md +225 -199
  12. radia-1.3.10/examples/cube_uniform_field/README.md +123 -0
  13. radia-1.3.10/examples/cube_uniform_field/linear/benchmark_bicgstab_dense.py +195 -0
  14. radia-1.3.10/examples/cube_uniform_field/nonlinear/README.md +135 -0
  15. radia-1.3.10/examples/cube_uniform_field/nonlinear/benchmark_bicgstab_hex.py +198 -0
  16. radia-1.3.10/examples/cube_uniform_field/nonlinear/benchmark_conditions.py +123 -0
  17. radia-1.3.10/examples/cube_uniform_field/nonlinear/benchmark_element_types.py +394 -0
  18. radia-1.3.10/examples/cube_uniform_field/nonlinear/benchmark_hexa_unified.py +198 -0
  19. radia-1.3.10/examples/cube_uniform_field/nonlinear/benchmark_hexahedron_msc.py +289 -0
  20. radia-1.3.10/examples/cube_uniform_field/nonlinear/benchmark_solver_methods.py +252 -0
  21. radia-1.3.10/examples/cube_uniform_field/nonlinear/benchmark_tetra_netgen.py +228 -0
  22. radia-1.3.10/examples/cube_uniform_field/nonlinear/benchmark_tetra_unified.py +204 -0
  23. radia-1.3.10/examples/cube_uniform_field/nonlinear/compare_radia_elfmagic_field.py +195 -0
  24. radia-1.3.10/examples/cube_uniform_field/nonlinear/compare_tetra_methods.py +227 -0
  25. radia-1.3.10/examples/cube_uniform_field/nonlinear/test_lu_vs_bicgstab.py +82 -0
  26. radia-1.3.10/examples/magpylib_integration/README.md +94 -0
  27. radia-1.3.10/examples/magpylib_integration/cylinder_magnet_examples.py +427 -0
  28. radia-1.3.10/examples/magpylib_integration/demo_magpylib_integration.py +203 -0
  29. radia-1.3.10/examples/magpylib_integration/sphere_in_halbach_cylinder.py +365 -0
  30. radia-1.3.10/examples/ngsolve_integration/demo_basic_field.py +88 -0
  31. radia-1.3.10/examples/ngsolve_integration/demo_coordinate_transform.py +136 -0
  32. radia-1.3.10/examples/ngsolve_integration/demo_hdiv_projection.py +272 -0
  33. radia-1.3.10/examples/ngsolve_integration/test_unit_conversion.py +173 -0
  34. {radia-1.3.9 → radia-1.3.10}/pyproject.toml +1 -1
  35. {radia-1.3.9 → radia-1.3.10}/src/radia/__init__.py +1 -1
  36. radia-1.3.10/src/radia/radia.pyd +0 -0
  37. radia-1.3.10/src/radia/radia_ngsolve.pyd +0 -0
  38. {radia-1.3.9 → radia-1.3.10/src/radia.egg-info}/PKG-INFO +43 -25
  39. {radia-1.3.9 → radia-1.3.10}/src/radia.egg-info/SOURCES.txt +26 -7
  40. radia-1.3.10/tests/test_mesh_import.py +633 -0
  41. radia-1.3.10/tests/test_ngsolve_integration.py +422 -0
  42. radia-1.3.9/docs/HMATRIX_BENCHMARKS_RESULTS.md +0 -219
  43. radia-1.3.9/docs/HMATRIX_ENHANCEMENT_PROPOSAL_2025.md +0 -600
  44. radia-1.3.9/docs/HMATRIX_IMPLEMENTATION_HISTORY.md +0 -377
  45. radia-1.3.9/examples/cube_uniform_field/README.md +0 -55
  46. radia-1.3.9/examples/cube_uniform_field/nonlinear/README.md +0 -220
  47. radia-1.3.9/examples/solver_benchmarks/HMATRIX_FIELD_DESIGN.md +0 -852
  48. radia-1.3.9/examples/solver_benchmarks/HMATRIX_FIELD_DESIGN_SIMPLIFIED.md +0 -859
  49. radia-1.3.9/examples/solver_benchmarks/PHASE2B_REEVALUATION.md +0 -179
  50. radia-1.3.9/examples/solver_benchmarks/SCALING_RESULTS.md +0 -233
  51. radia-1.3.9/src/radia/radia.pyd +0 -0
  52. radia-1.3.9/src/radia/radia_ngsolve.pyd +0 -0
  53. {radia-1.3.9 → radia-1.3.10}/COPYRIGHT.txt +0 -0
  54. {radia-1.3.9 → radia-1.3.10}/LICENSE +0 -0
  55. {radia-1.3.9 → radia-1.3.10}/MANIFEST.in +0 -0
  56. {radia-1.3.9 → radia-1.3.10}/docs/CF_BACKGROUND_FIELD_IMPLEMENTATION.md +0 -0
  57. {radia-1.3.9 → radia-1.3.10}/docs/HMATRIX_SERIALIZATION.md +0 -0
  58. {radia-1.3.9 → radia-1.3.10}/docs/HMATRIX_USER_GUIDE.md +0 -0
  59. {radia-1.3.9 → radia-1.3.10}/docs/MATERIAL_API_IMPLEMENTATION.md +0 -0
  60. {radia-1.3.9 → radia-1.3.10}/docs/ML_PARAMETER_TUNING.md +0 -0
  61. {radia-1.3.9 → radia-1.3.10}/docs/NGSOLVE_CF_BACKGROUND_FIELD_DESIGN.md +0 -0
  62. {radia-1.3.9 → radia-1.3.10}/docs/NGSOLVE_USAGE_GUIDE.md +0 -0
  63. {radia-1.3.9 → radia-1.3.10}/docs/scripts/README.md +0 -0
  64. {radia-1.3.9 → radia-1.3.10}/examples/README.md +0 -0
  65. {radia-1.3.9 → radia-1.3.10}/examples/background_fields/README.md +0 -0
  66. {radia-1.3.9 → radia-1.3.10}/examples/background_fields/cubit_to_nastran.py +0 -0
  67. {radia-1.3.9 → radia-1.3.10}/examples/background_fields/permeability_comparison.py +0 -0
  68. {radia-1.3.9 → radia-1.3.10}/examples/background_fields/quadrupole_analytical.py +0 -0
  69. {radia-1.3.9 → radia-1.3.10}/examples/background_fields/quadrupole_analytical.vtk.vtk +0 -0
  70. {radia-1.3.9 → radia-1.3.10}/examples/background_fields/sphere_in_quadrupole.py +0 -0
  71. {radia-1.3.9 → radia-1.3.10}/examples/background_fields/sphere_nastran_analysis.py +0 -0
  72. {radia-1.3.9 → radia-1.3.10}/examples/background_fields/sphere_nastran_field_mu.pvsm +0 -0
  73. {radia-1.3.9 → radia-1.3.10}/examples/background_fields/sphere_nastran_geometry.vtk +0 -0
  74. {radia-1.3.9 → radia-1.3.10}/examples/complex_coil_geometry/README.md +0 -0
  75. {radia-1.3.9 → radia-1.3.10}/examples/complex_coil_geometry/coil_geometry.vtk +0 -0
  76. {radia-1.3.9 → radia-1.3.10}/examples/complex_coil_geometry/coil_model.py +0 -0
  77. {radia-1.3.9 → radia-1.3.10}/examples/complex_coil_geometry/complex_coil.pvsm +0 -0
  78. {radia-1.3.9 → radia-1.3.10}/examples/complex_coil_geometry/field_map.py +0 -0
  79. {radia-1.3.9 → radia-1.3.10}/examples/complex_coil_geometry/field_map.vtk +0 -0
  80. {radia-1.3.9 → radia-1.3.10}/examples/complex_coil_geometry/visualize_coils.py +0 -0
  81. {radia-1.3.9 → radia-1.3.10}/examples/cube_uniform_field/linear/README.md +0 -0
  82. {radia-1.3.9 → radia-1.3.10}/examples/cube_uniform_field/linear/README_CUBE_BENCHMARK.md +0 -0
  83. {radia-1.3.9 → radia-1.3.10}/examples/cube_uniform_field/linear/benchmark_external_field.py +0 -0
  84. {radia-1.3.9 → radia-1.3.10}/examples/cube_uniform_field/linear/benchmark_high_mu.py +0 -0
  85. {radia-1.3.9 → radia-1.3.10}/examples/cube_uniform_field/linear/benchmark_mesh_convergence.py +0 -0
  86. {radia-1.3.9 → radia-1.3.10}/examples/cube_uniform_field/linear/benchmark_solver_methods.py +0 -0
  87. {radia-1.3.9 → radia-1.3.10}/examples/cube_uniform_field/linear/benchmark_tetra_vs_hex.py +0 -0
  88. {radia-1.3.9 → radia-1.3.10}/examples/cube_uniform_field/linear/benchmark_tetra_vs_ngsolve.py +0 -0
  89. {radia-1.3.9 → radia-1.3.10}/examples/cube_uniform_field/linear/compare_external_field.py +0 -0
  90. {radia-1.3.9 → radia-1.3.10}/examples/cube_uniform_field/linear/cube_benchmark_external_field.py +0 -0
  91. {radia-1.3.9 → radia-1.3.10}/examples/cube_uniform_field/linear/cube_benchmark_radia.vtk +0 -0
  92. {radia-1.3.9 → radia-1.3.10}/examples/cube_uniform_field/linear/evaluate_perturbation_field.py +0 -0
  93. {radia-1.3.9 → radia-1.3.10}/examples/cube_uniform_field/linear/precision_evaluation.py +0 -0
  94. {radia-1.3.9 → radia-1.3.10}/examples/cube_uniform_field/linear/test_method9_fine_mesh.py +0 -0
  95. {radia-1.3.9 → radia-1.3.10}/examples/cube_uniform_field/linear/test_method9_high_mu.py +0 -0
  96. {radia-1.3.9 → radia-1.3.10}/examples/cube_uniform_field/nonlinear/benchmark_nonlinear_tetra_vs_hex.py +0 -0
  97. {radia-1.3.9 → radia-1.3.10}/examples/electromagnet/README.md +0 -0
  98. {radia-1.3.9 → radia-1.3.10}/examples/electromagnet/Radia_model.vtk +0 -0
  99. {radia-1.3.9 → radia-1.3.10}/examples/electromagnet/York.vtk +0 -0
  100. {radia-1.3.9 → radia-1.3.10}/examples/electromagnet/field_distribution.vtk +0 -0
  101. {radia-1.3.9 → radia-1.3.10}/examples/electromagnet/main_simulation_workflow.py +0 -0
  102. {radia-1.3.9 → radia-1.3.10}/examples/electromagnet/visualize_paraview.py +0 -0
  103. {radia-1.3.9 → radia-1.3.10}/examples/electromagnet/york_cubit_mesh.py +0 -0
  104. {radia-1.3.9 → radia-1.3.10}/examples/ngsolve_integration/README.md +0 -0
  105. {radia-1.3.9 → radia-1.3.10}/examples/ngsolve_integration/benchmark_gridfunction_set.py +0 -0
  106. {radia-1.3.9 → radia-1.3.10}/examples/ngsolve_integration/demo_batch_evaluation.py +0 -0
  107. {radia-1.3.9 → radia-1.3.10}/examples/ngsolve_integration/demo_field_types.py +0 -0
  108. {radia-1.3.9 → radia-1.3.10}/examples/ngsolve_integration/mesh_magnetization_import/RADIA_TETRA_ROOT_CAUSE.md +0 -0
  109. {radia-1.3.9 → radia-1.3.10}/examples/ngsolve_integration/mesh_magnetization_import/README.md +0 -0
  110. {radia-1.3.9 → radia-1.3.10}/examples/ngsolve_integration/mesh_magnetization_import/compare_radia_ngsolve_cube.py +0 -0
  111. {radia-1.3.9 → radia-1.3.10}/examples/ngsolve_integration/mesh_magnetization_import/cube_hex.vtk +0 -0
  112. {radia-1.3.9 → radia-1.3.10}/examples/ngsolve_integration/mesh_magnetization_import/demo_tetrahedral_methods_comparison.py +0 -0
  113. {radia-1.3.9 → radia-1.3.10}/examples/ngsolve_integration/mesh_magnetization_import/ngsolve_cube_graded_mesh.vtk +0 -0
  114. {radia-1.3.9 → radia-1.3.10}/examples/ngsolve_integration/mesh_magnetization_import/ngsolve_cube_uniform_field.py +0 -0
  115. {radia-1.3.9 → radia-1.3.10}/examples/ngsolve_integration/mesh_magnetization_import/ngsolve_tet_mesh.vtk +0 -0
  116. {radia-1.3.9 → radia-1.3.10}/examples/ngsolve_integration/mesh_magnetization_import/sphere_domain_graded_mesh.vtk +0 -0
  117. {radia-1.3.9 → radia-1.3.10}/examples/ngsolve_integration/test_batch_evaluation.py +0 -0
  118. {radia-1.3.9 → radia-1.3.10}/examples/ngsolve_integration/verify_curl_A_equals_B.py +0 -0
  119. {radia-1.3.9 → radia-1.3.10}/examples/ngsolve_integration/visualize_field.py +0 -0
  120. {radia-1.3.9 → radia-1.3.10}/examples/simple_problems/CONVERSION_NOTES.md +0 -0
  121. {radia-1.3.9 → radia-1.3.10}/examples/simple_problems/README.md +0 -0
  122. {radia-1.3.9 → radia-1.3.10}/examples/simple_problems/arc_current_dual_magnets.py +0 -0
  123. {radia-1.3.9 → radia-1.3.10}/examples/simple_problems/arc_current_with_magnet.py +0 -0
  124. {radia-1.3.9 → radia-1.3.10}/examples/simple_problems/chamfered_pole_piece.py +0 -0
  125. {radia-1.3.9 → radia-1.3.10}/examples/simple_problems/compare_magpylib.py +0 -0
  126. {radia-1.3.9 → radia-1.3.10}/examples/simple_problems/cubic_polyhedron_magnet.py +0 -0
  127. {radia-1.3.9 → radia-1.3.10}/examples/smco_magnet_array/README.md +0 -0
  128. {radia-1.3.9 → radia-1.3.10}/examples/smco_magnet_array/smbo.pvsm +0 -0
  129. {radia-1.3.9 → radia-1.3.10}/examples/smco_magnet_array/smco_array.py +0 -0
  130. {radia-1.3.9 → radia-1.3.10}/examples/smco_magnet_array/smco_array.vtk +0 -0
  131. {radia-1.3.9 → radia-1.3.10}/examples/smco_magnet_array/smco_field_distribution.vtk +0 -0
  132. {radia-1.3.9 → radia-1.3.10}/examples/solver_benchmarks/BENCHMARK_RESULTS.md +0 -0
  133. {radia-1.3.9 → radia-1.3.10}/examples/solver_benchmarks/README.md +0 -0
  134. {radia-1.3.9 → radia-1.3.10}/examples/solver_benchmarks/benchmark_field_evaluation.py +0 -0
  135. {radia-1.3.9 → radia-1.3.10}/examples/solver_benchmarks/benchmark_large_scale_comparison.py +0 -0
  136. {radia-1.3.9 → radia-1.3.10}/examples/solver_benchmarks/benchmark_linear_material.py +0 -0
  137. {radia-1.3.9 → radia-1.3.10}/examples/solver_benchmarks/benchmark_lu_vs_hmatrix.py +0 -0
  138. {radia-1.3.9 → radia-1.3.10}/examples/solver_benchmarks/benchmark_matrix_construction.py +0 -0
  139. {radia-1.3.9 → radia-1.3.10}/examples/solver_benchmarks/benchmark_parallel_construction.py +0 -0
  140. {radia-1.3.9 → radia-1.3.10}/examples/solver_benchmarks/benchmark_solver.py +0 -0
  141. {radia-1.3.9 → radia-1.3.10}/examples/solver_benchmarks/benchmark_solver_comparison.py +0 -0
  142. {radia-1.3.9 → radia-1.3.10}/examples/solver_benchmarks/benchmark_solver_methods.py +0 -0
  143. {radia-1.3.9 → radia-1.3.10}/examples/solver_benchmarks/benchmark_solver_scaling.py +0 -0
  144. {radia-1.3.9 → radia-1.3.10}/examples/solver_benchmarks/benchmark_solver_scaling_extended.py +0 -0
  145. {radia-1.3.9 → radia-1.3.10}/examples/solver_benchmarks/plot_benchmark_results.py +0 -0
  146. {radia-1.3.9 → radia-1.3.10}/examples/solver_benchmarks/run_all_benchmarks.py +0 -0
  147. {radia-1.3.9 → radia-1.3.10}/examples/solver_benchmarks/verify_field_accuracy.py +0 -0
  148. {radia-1.3.9 → radia-1.3.10}/setup.cfg +0 -0
  149. {radia-1.3.9 → radia-1.3.10}/setup.py +0 -0
  150. {radia-1.3.9 → radia-1.3.10}/src/radia/nastran_mesh_import.py +0 -0
  151. {radia-1.3.9 → radia-1.3.10}/src/radia/netgen_mesh_import.py +0 -0
  152. {radia-1.3.9 → radia-1.3.10}/src/radia/rad_ngsolve_fast.py +0 -0
  153. {radia-1.3.9 → radia-1.3.10}/src/radia/radia_coil_builder.py +0 -0
  154. {radia-1.3.9 → radia-1.3.10}/src/radia/radia_field_cached.py +0 -0
  155. {radia-1.3.9 → radia-1.3.10}/src/radia/radia_ngsolve_field.py +0 -0
  156. {radia-1.3.9 → radia-1.3.10}/src/radia/radia_ngsolve_utils.py +0 -0
  157. {radia-1.3.9 → radia-1.3.10}/src/radia/radia_pyvista_viewer.py +0 -0
  158. {radia-1.3.9 → radia-1.3.10}/src/radia/radia_vtk_export.py +0 -0
  159. {radia-1.3.9 → radia-1.3.10}/src/radia.egg-info/dependency_links.txt +0 -0
  160. {radia-1.3.9 → radia-1.3.10}/src/radia.egg-info/not-zip-safe +0 -0
  161. {radia-1.3.9 → radia-1.3.10}/src/radia.egg-info/requires.txt +0 -0
  162. {radia-1.3.9 → radia-1.3.10}/src/radia.egg-info/top_level.txt +0 -0
  163. {radia-1.3.9 → radia-1.3.10}/tests/README.md +0 -0
  164. {radia-1.3.9 → radia-1.3.10}/tests/__init__.py +0 -0
  165. {radia-1.3.9 → radia-1.3.10}/tests/benchmarks/benchmark_correct.py +0 -0
  166. {radia-1.3.9 → radia-1.3.10}/tests/benchmarks/benchmark_heavy.py +0 -0
  167. {radia-1.3.9 → radia-1.3.10}/tests/benchmarks/benchmark_openmp.py +0 -0
  168. {radia-1.3.9 → radia-1.3.10}/tests/benchmarks/benchmark_threads.py +0 -0
  169. {radia-1.3.9 → radia-1.3.10}/tests/conftest.py +0 -0
  170. {radia-1.3.9 → radia-1.3.10}/tests/profile_batch_performance.py +0 -0
  171. {radia-1.3.9 → radia-1.3.10}/tests/test_advanced.py +0 -0
  172. {radia-1.3.9 → radia-1.3.10}/tests/test_all_spaces.py +0 -0
  173. {radia-1.3.9 → radia-1.3.10}/tests/test_background_field_debug.py +0 -0
  174. {radia-1.3.9 → radia-1.3.10}/tests/test_batch_evaluation.py +0 -0
  175. {radia-1.3.9 → radia-1.3.10}/tests/test_cf_direct.py +0 -0
  176. {radia-1.3.9 → radia-1.3.10}/tests/test_convergence_hdiv.py +0 -0
  177. {radia-1.3.9 → radia-1.3.10}/tests/test_curlA_equals_B.py +0 -0
  178. {radia-1.3.9 → radia-1.3.10}/tests/test_curl_A_detailed.py +0 -0
  179. {radia-1.3.9 → radia-1.3.10}/tests/test_far_field_accuracy.py +0 -0
  180. {radia-1.3.9 → radia-1.3.10}/tests/test_fast_preparecache.py +0 -0
  181. {radia-1.3.9 → radia-1.3.10}/tests/test_fast_simple.py +0 -0
  182. {radia-1.3.9 → radia-1.3.10}/tests/test_group_operations.py +0 -0
  183. {radia-1.3.9 → radia-1.3.10}/tests/test_hcurl_vs_hdiv.py +0 -0
  184. {radia-1.3.9 → radia-1.3.10}/tests/test_l2_norm_debug.py +0 -0
  185. {radia-1.3.9 → radia-1.3.10}/tests/test_magpylib_comparison.py +0 -0
  186. {radia-1.3.9 → radia-1.3.10}/tests/test_materials.py +0 -0
  187. {radia-1.3.9 → radia-1.3.10}/tests/test_memory_allocation_tracking.py +0 -0
  188. {radia-1.3.9 → radia-1.3.10}/tests/test_minimal_cached.py +0 -0
  189. {radia-1.3.9 → radia-1.3.10}/tests/test_moving_magnet_memory.py +0 -0
  190. {radia-1.3.9 → radia-1.3.10}/tests/test_moving_magnet_memory_diagnosis.py +0 -0
  191. {radia-1.3.9 → radia-1.3.10}/tests/test_new_material_api.py +0 -0
  192. {radia-1.3.9 → radia-1.3.10}/tests/test_objbckg_simple.py +0 -0
  193. {radia-1.3.9 → radia-1.3.10}/tests/test_objbckgcf_alone.py +0 -0
  194. {radia-1.3.9 → radia-1.3.10}/tests/test_order1.py +0 -0
  195. {radia-1.3.9 → radia-1.3.10}/tests/test_parallel_performance.py +0 -0
  196. {radia-1.3.9 → radia-1.3.10}/tests/test_preparecache_performance.py +0 -0
  197. {radia-1.3.9 → radia-1.3.10}/tests/test_process_memory.py +0 -0
  198. {radia-1.3.9 → radia-1.3.10}/tests/test_python_cached_field.py +0 -0
  199. {radia-1.3.9 → radia-1.3.10}/tests/test_python_cached_simple.py +0 -0
  200. {radia-1.3.9 → radia-1.3.10}/tests/test_rad_ngsolve.py +0 -0
  201. {radia-1.3.9 → radia-1.3.10}/tests/test_rad_ngsolve_diagnostic.py +0 -0
  202. {radia-1.3.9 → radia-1.3.10}/tests/test_rad_ngsolve_function.py +0 -0
  203. {radia-1.3.9 → radia-1.3.10}/tests/test_radhmat.py +0 -0
  204. {radia-1.3.9 → radia-1.3.10}/tests/test_radia.py +0 -0
  205. {radia-1.3.9 → radia-1.3.10}/tests/test_radia_core_memory.py +0 -0
  206. {radia-1.3.9 → radia-1.3.10}/tests/test_radia_field_computation_memory.py +0 -0
  207. {radia-1.3.9 → radia-1.3.10}/tests/test_radia_ngsolve_longrun.py +0 -0
  208. {radia-1.3.9 → radia-1.3.10}/tests/test_radia_ngsolve_memory_leak.py +0 -0
  209. {radia-1.3.9 → radia-1.3.10}/tests/test_radia_ngsolve_with_cache.py +0 -0
  210. {radia-1.3.9 → radia-1.3.10}/tests/test_radia_only_memory.py +0 -0
  211. {radia-1.3.9 → radia-1.3.10}/tests/test_serialization.py +0 -0
  212. {radia-1.3.9 → radia-1.3.10}/tests/test_set_vs_interpolate.py +0 -0
  213. {radia-1.3.9 → radia-1.3.10}/tests/test_simple.py +0 -0
  214. {radia-1.3.9 → radia-1.3.10}/tests/test_simple_fld_leak.py +0 -0
  215. {radia-1.3.9 → radia-1.3.10}/tests/test_square_coil_analytical.py +0 -0
  216. {radia-1.3.9 → radia-1.3.10}/tests/test_tetrahedral_solver.py +0 -0
  217. {radia-1.3.9 → radia-1.3.10}/tests/test_transformations.py +0 -0
  218. {radia-1.3.9 → radia-1.3.10}/tests/test_type_cast.py +0 -0
  219. {radia-1.3.9 → radia-1.3.10}/tests/test_unit_conversion_verify.py +0 -0
  220. {radia-1.3.9 → radia-1.3.10}/tests/test_utils.py +0 -0
  221. {radia-1.3.9 → radia-1.3.10}/tests/test_vector_potential.py +0 -0
  222. {radia-1.3.9 → radia-1.3.10}/tests/test_without_B_projection.py +0 -0
  223. {radia-1.3.9 → radia-1.3.10}/tests/test_without_gridfunction.py +0 -0
  224. {radia-1.3.9 → radia-1.3.10}/tests/verify_curl_A_equals_B.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: radia
3
- Version: 1.3.9
3
+ Version: 1.3.10
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
@@ -96,7 +96,7 @@ pip install radia-ngsolve
96
96
  # - build/Release/radia_ngsolve.pyd
97
97
  ```
98
98
 
99
- See [README_BUILD.md](README_BUILD.md) for detailed build instructions.
99
+ See [BUILD.md](BUILD.md) for detailed build instructions.
100
100
 
101
101
  ### Basic Usage
102
102
 
@@ -119,6 +119,21 @@ print(f"Field: {field} T")
119
119
 
120
120
  The `radia_ngsolve` module provides a C++ CoefficientFunction interface for using Radia magnetic fields in NGSolve FEM analysis.
121
121
 
122
+ **Requirements:**
123
+ - NGSolve must be installed separately: `pip install ngsolve`
124
+ - **IMPORTANT**: NGSolve must be imported **before** `radia_ngsolve`
125
+ - Current build is linked against **NGSolve 6.2.2406** (Windows Python 3.12)
126
+
127
+ **Installation:**
128
+
129
+ ```bash
130
+ # 1. Install NGSolve first
131
+ pip install ngsolve
132
+
133
+ # 2. Install Radia (includes radia_ngsolve.pyd)
134
+ pip install radia
135
+ ```
136
+
122
137
  **Function Specification:**
123
138
 
124
139
  ```python
@@ -144,12 +159,12 @@ radia_ngsolve.RadiaField(radia_obj, field_type='b')
144
159
  **Example:**
145
160
 
146
161
  ```python
147
- # IMPORTANT: Import ngsolve first
162
+ # IMPORTANT: Import ngsolve FIRST (required to load NGSolve DLLs)
148
163
  import ngsolve
149
- from ngsolve import Mesh, H1, GridFunction
164
+ from ngsolve import Mesh, H1, GridFunction, HDiv
150
165
 
151
166
  import radia as rad
152
- import radia_ngsolve
167
+ from radia import radia_ngsolve # or: import radia_ngsolve
153
168
 
154
169
  # Create Radia magnet
155
170
  magnet = rad.ObjRecMag([0,0,0], [20,20,20], [0,0,1.2]) # mm units
@@ -167,24 +182,27 @@ gf = GridFunction(fes)
167
182
  gf.Set(B_field) # Automatically converts mesh coordinates m → mm
168
183
  ```
169
184
 
170
- See [examples/Radia_to_NGSolve_CoefficientFunction/](examples/Radia_to_NGSolve_CoefficientFunction/) for complete examples.
185
+ See [examples/ngsolve_integration/](examples/ngsolve_integration/) for complete examples.
171
186
 
172
187
  ## Documentation
173
188
 
174
- ### Core
175
- - [README_BUILD.md](README_BUILD.md) - Build instructions
176
- - [docs/OPENMP_PERFORMANCE_REPORT.md](docs/OPENMP_PERFORMANCE_REPORT.md) - OpenMP benchmarks
177
- - [docs/DIRECTORY_STRUCTURE.md](docs/DIRECTORY_STRUCTURE.md) - Project structure
189
+ ### Build & Setup
190
+ - [BUILD.md](BUILD.md) - Build instructions (Windows, macOS, Linux)
191
+
192
+ ### User Guides
193
+ - [docs/API_REFERENCE.md](docs/API_REFERENCE.md) - Complete Python API reference
194
+ - [docs/SOLVER_METHODS.md](docs/SOLVER_METHODS.md) - Solver methods (LU, BiCGSTAB, H-matrix)
195
+ - [docs/HMATRIX_USER_GUIDE.md](docs/HMATRIX_USER_GUIDE.md) - H-matrix acceleration guide
178
196
 
179
197
  ### NGSolve Integration
180
- - [RAD_NGSOLVE_BUILD_SUCCESS.md](RAD_NGSOLVE_BUILD_SUCCESS.md) - Complete radia_ngsolve documentation
181
- - [examples/Radia_to_NGSolve_CoefficientFunction/README.md](examples/Radia_to_NGSolve_CoefficientFunction/README.md) - NGSolve examples overview
182
- - [examples/Radia_to_NGSolve_CoefficientFunction/EXAMPLES_GUIDE.md](examples/Radia_to_NGSolve_CoefficientFunction/EXAMPLES_GUIDE.md) - Detailed usage guide
183
- - [tests/test_radia_ngsolve.py](tests/test_radia_ngsolve.py) - Integration tests
198
+ - [docs/NGSOLVE_USAGE_GUIDE.md](docs/NGSOLVE_USAGE_GUIDE.md) - How to use Radia with NGSolve
199
+ - [docs/NGSOLVE_INTEGRATION.md](docs/NGSOLVE_INTEGRATION.md) - Integration overview
184
200
 
185
- ### Development
186
- - [docs/TAB_CONVERSION_REPORT.md](docs/TAB_CONVERSION_REPORT.md) - Code style conversion
187
- - [docs/CLAUDE.md](docs/CLAUDE.md) - Development notes
201
+ ### Examples
202
+ - [examples/ngsolve_integration/](examples/ngsolve_integration/) - NGSolve integration examples
203
+ - [examples/magpylib_integration/](examples/magpylib_integration/) - magpylib background field examples
204
+ - [examples/simple_problems/](examples/simple_problems/) - Basic magnet configurations
205
+ - [tests/README.md](tests/README.md) - Test suite documentation
188
206
 
189
207
  ## Performance
190
208
 
@@ -197,7 +215,7 @@ OpenMP parallelization results (8-core system):
197
215
  | 4 | 3.57 | 3.27x |
198
216
  | 8 | 4.33 | 2.70x |
199
217
 
200
- See [docs/OPENMP_PERFORMANCE_REPORT.md](docs/OPENMP_PERFORMANCE_REPORT.md) for details.
218
+ See [docs/SOLVER_METHODS.md](docs/SOLVER_METHODS.md) for solver performance details.
201
219
 
202
220
  ## Examples
203
221
 
@@ -205,12 +223,12 @@ Practical examples are available in the `examples/` directory:
205
223
 
206
224
 
207
225
  ### NGSolve Integration
208
- - `examples/Radia_to_NGSolve_CoefficientFunction/` - **Radia → NGSolve: Use Radia fields in FEM**
226
+ - `examples/ngsolve_integration/` - **Radia → NGSolve: Use Radia fields in FEM**
209
227
  - `demo_field_types.py` - All field types demonstration
210
228
  - `visualize_field.py` - Field visualization and comparison
211
229
  - `export_radia_geometry.py` - Export geometry to VTK
212
230
 
213
- - `examples/NGSolve_CoefficientFunction_to_Radia_BackgroundField/` - **NGSolve → Radia: Background fields**
231
+ - `examples/background_fields/` - **NGSolve → Radia: Background fields**
214
232
  - `test_sphere_in_quadrupole.py` - Magnetizable sphere in quadrupole field
215
233
  - Uses Python callbacks to define arbitrary background fields
216
234
 
@@ -434,7 +452,7 @@ See:
434
452
 
435
453
  This tool perfectly complements Radia_NGSolve by providing high-quality mesh generation:
436
454
 
437
- - **Nastran Format Export** - Compatible with Radia's `nastran_reader.py` module
455
+ - **Nastran Format Export** - Compatible with Radia's `nastran_mesh_import.py` module
438
456
  - **Multiple Format Support** - Gmsh, MEG, VTK, and Nastran exports
439
457
  - **2D/3D Meshing** - Supports complex 3D geometries
440
458
  - **Second-Order Elements** - High-accuracy mesh generation
@@ -442,10 +460,10 @@ This tool perfectly complements Radia_NGSolve by providing high-quality mesh gen
442
460
  **Workflow Example:**
443
461
  1. Create complex geometry in Coreform Cubit
444
462
  2. Export to Nastran format using `Coreform_Cubit_Mesh_Export`
445
- 3. Import into Radia using `nastran_reader.py`
463
+ 3. Import into Radia using `nastran_mesh_import.py`
446
464
  4. Couple with NGSolve for FEM analysis
447
465
 
448
- See [examples/NGSolve_CoefficientFunction_to_Radia_BackgroundField/](examples/NGSolve_CoefficientFunction_to_Radia_BackgroundField/) for Nastran mesh usage examples.
466
+ See [examples/background_fields/](examples/background_fields/) for Nastran mesh usage examples.
449
467
 
450
468
  ## Links
451
469
 
@@ -455,5 +473,5 @@ See [examples/NGSolve_CoefficientFunction_to_Radia_BackgroundField/](examples/NG
455
473
 
456
474
  ---
457
475
 
458
- **Version**: 1.3.4 (OpenMP + NGSolve Edition)
459
- **Last Updated**: 2025-11-30
476
+ **Version**: 1.3.9 (OpenMP + NGSolve Edition)
477
+ **Last Updated**: 2025-12-05
@@ -54,7 +54,7 @@ pip install radia-ngsolve
54
54
  # - build/Release/radia_ngsolve.pyd
55
55
  ```
56
56
 
57
- See [README_BUILD.md](README_BUILD.md) for detailed build instructions.
57
+ See [BUILD.md](BUILD.md) for detailed build instructions.
58
58
 
59
59
  ### Basic Usage
60
60
 
@@ -77,6 +77,21 @@ print(f"Field: {field} T")
77
77
 
78
78
  The `radia_ngsolve` module provides a C++ CoefficientFunction interface for using Radia magnetic fields in NGSolve FEM analysis.
79
79
 
80
+ **Requirements:**
81
+ - NGSolve must be installed separately: `pip install ngsolve`
82
+ - **IMPORTANT**: NGSolve must be imported **before** `radia_ngsolve`
83
+ - Current build is linked against **NGSolve 6.2.2406** (Windows Python 3.12)
84
+
85
+ **Installation:**
86
+
87
+ ```bash
88
+ # 1. Install NGSolve first
89
+ pip install ngsolve
90
+
91
+ # 2. Install Radia (includes radia_ngsolve.pyd)
92
+ pip install radia
93
+ ```
94
+
80
95
  **Function Specification:**
81
96
 
82
97
  ```python
@@ -102,12 +117,12 @@ radia_ngsolve.RadiaField(radia_obj, field_type='b')
102
117
  **Example:**
103
118
 
104
119
  ```python
105
- # IMPORTANT: Import ngsolve first
120
+ # IMPORTANT: Import ngsolve FIRST (required to load NGSolve DLLs)
106
121
  import ngsolve
107
- from ngsolve import Mesh, H1, GridFunction
122
+ from ngsolve import Mesh, H1, GridFunction, HDiv
108
123
 
109
124
  import radia as rad
110
- import radia_ngsolve
125
+ from radia import radia_ngsolve # or: import radia_ngsolve
111
126
 
112
127
  # Create Radia magnet
113
128
  magnet = rad.ObjRecMag([0,0,0], [20,20,20], [0,0,1.2]) # mm units
@@ -125,24 +140,27 @@ gf = GridFunction(fes)
125
140
  gf.Set(B_field) # Automatically converts mesh coordinates m → mm
126
141
  ```
127
142
 
128
- See [examples/Radia_to_NGSolve_CoefficientFunction/](examples/Radia_to_NGSolve_CoefficientFunction/) for complete examples.
143
+ See [examples/ngsolve_integration/](examples/ngsolve_integration/) for complete examples.
129
144
 
130
145
  ## Documentation
131
146
 
132
- ### Core
133
- - [README_BUILD.md](README_BUILD.md) - Build instructions
134
- - [docs/OPENMP_PERFORMANCE_REPORT.md](docs/OPENMP_PERFORMANCE_REPORT.md) - OpenMP benchmarks
135
- - [docs/DIRECTORY_STRUCTURE.md](docs/DIRECTORY_STRUCTURE.md) - Project structure
147
+ ### Build & Setup
148
+ - [BUILD.md](BUILD.md) - Build instructions (Windows, macOS, Linux)
149
+
150
+ ### User Guides
151
+ - [docs/API_REFERENCE.md](docs/API_REFERENCE.md) - Complete Python API reference
152
+ - [docs/SOLVER_METHODS.md](docs/SOLVER_METHODS.md) - Solver methods (LU, BiCGSTAB, H-matrix)
153
+ - [docs/HMATRIX_USER_GUIDE.md](docs/HMATRIX_USER_GUIDE.md) - H-matrix acceleration guide
136
154
 
137
155
  ### NGSolve Integration
138
- - [RAD_NGSOLVE_BUILD_SUCCESS.md](RAD_NGSOLVE_BUILD_SUCCESS.md) - Complete radia_ngsolve documentation
139
- - [examples/Radia_to_NGSolve_CoefficientFunction/README.md](examples/Radia_to_NGSolve_CoefficientFunction/README.md) - NGSolve examples overview
140
- - [examples/Radia_to_NGSolve_CoefficientFunction/EXAMPLES_GUIDE.md](examples/Radia_to_NGSolve_CoefficientFunction/EXAMPLES_GUIDE.md) - Detailed usage guide
141
- - [tests/test_radia_ngsolve.py](tests/test_radia_ngsolve.py) - Integration tests
156
+ - [docs/NGSOLVE_USAGE_GUIDE.md](docs/NGSOLVE_USAGE_GUIDE.md) - How to use Radia with NGSolve
157
+ - [docs/NGSOLVE_INTEGRATION.md](docs/NGSOLVE_INTEGRATION.md) - Integration overview
142
158
 
143
- ### Development
144
- - [docs/TAB_CONVERSION_REPORT.md](docs/TAB_CONVERSION_REPORT.md) - Code style conversion
145
- - [docs/CLAUDE.md](docs/CLAUDE.md) - Development notes
159
+ ### Examples
160
+ - [examples/ngsolve_integration/](examples/ngsolve_integration/) - NGSolve integration examples
161
+ - [examples/magpylib_integration/](examples/magpylib_integration/) - magpylib background field examples
162
+ - [examples/simple_problems/](examples/simple_problems/) - Basic magnet configurations
163
+ - [tests/README.md](tests/README.md) - Test suite documentation
146
164
 
147
165
  ## Performance
148
166
 
@@ -155,7 +173,7 @@ OpenMP parallelization results (8-core system):
155
173
  | 4 | 3.57 | 3.27x |
156
174
  | 8 | 4.33 | 2.70x |
157
175
 
158
- See [docs/OPENMP_PERFORMANCE_REPORT.md](docs/OPENMP_PERFORMANCE_REPORT.md) for details.
176
+ See [docs/SOLVER_METHODS.md](docs/SOLVER_METHODS.md) for solver performance details.
159
177
 
160
178
  ## Examples
161
179
 
@@ -163,12 +181,12 @@ Practical examples are available in the `examples/` directory:
163
181
 
164
182
 
165
183
  ### NGSolve Integration
166
- - `examples/Radia_to_NGSolve_CoefficientFunction/` - **Radia → NGSolve: Use Radia fields in FEM**
184
+ - `examples/ngsolve_integration/` - **Radia → NGSolve: Use Radia fields in FEM**
167
185
  - `demo_field_types.py` - All field types demonstration
168
186
  - `visualize_field.py` - Field visualization and comparison
169
187
  - `export_radia_geometry.py` - Export geometry to VTK
170
188
 
171
- - `examples/NGSolve_CoefficientFunction_to_Radia_BackgroundField/` - **NGSolve → Radia: Background fields**
189
+ - `examples/background_fields/` - **NGSolve → Radia: Background fields**
172
190
  - `test_sphere_in_quadrupole.py` - Magnetizable sphere in quadrupole field
173
191
  - Uses Python callbacks to define arbitrary background fields
174
192
 
@@ -392,7 +410,7 @@ See:
392
410
 
393
411
  This tool perfectly complements Radia_NGSolve by providing high-quality mesh generation:
394
412
 
395
- - **Nastran Format Export** - Compatible with Radia's `nastran_reader.py` module
413
+ - **Nastran Format Export** - Compatible with Radia's `nastran_mesh_import.py` module
396
414
  - **Multiple Format Support** - Gmsh, MEG, VTK, and Nastran exports
397
415
  - **2D/3D Meshing** - Supports complex 3D geometries
398
416
  - **Second-Order Elements** - High-accuracy mesh generation
@@ -400,10 +418,10 @@ This tool perfectly complements Radia_NGSolve by providing high-quality mesh gen
400
418
  **Workflow Example:**
401
419
  1. Create complex geometry in Coreform Cubit
402
420
  2. Export to Nastran format using `Coreform_Cubit_Mesh_Export`
403
- 3. Import into Radia using `nastran_reader.py`
421
+ 3. Import into Radia using `nastran_mesh_import.py`
404
422
  4. Couple with NGSolve for FEM analysis
405
423
 
406
- See [examples/NGSolve_CoefficientFunction_to_Radia_BackgroundField/](examples/NGSolve_CoefficientFunction_to_Radia_BackgroundField/) for Nastran mesh usage examples.
424
+ See [examples/background_fields/](examples/background_fields/) for Nastran mesh usage examples.
407
425
 
408
426
  ## Links
409
427
 
@@ -413,5 +431,5 @@ See [examples/NGSolve_CoefficientFunction_to_Radia_BackgroundField/](examples/NG
413
431
 
414
432
  ---
415
433
 
416
- **Version**: 1.3.4 (OpenMP + NGSolve Edition)
417
- **Last Updated**: 2025-11-30
434
+ **Version**: 1.3.9 (OpenMP + NGSolve Edition)
435
+ **Last Updated**: 2025-12-05
@@ -201,7 +201,7 @@ rad.RlxMan(intrc, 5, 100, 1.0)
201
201
  - Must be called **after** `rad.RlxPre()` and **before** solver methods
202
202
  - Can be called multiple times to define different groups
203
203
  - Overlapping intervals: behavior is undefined (avoid)
204
- - See [benchmark results](../examples/solver_time_evaluation/README.md) for scaling analysis
204
+ - See [benchmark results](../examples/solver_benchmarks/README.md) for scaling analysis
205
205
 
206
206
  ---
207
207
 
@@ -345,7 +345,7 @@ print(f"Gauss-Seidel: {t_solver*1000:.2f} ms")
345
345
 
346
346
  **Performance Comparison**:
347
347
 
348
- See detailed benchmark results in [`examples/solver_time_evaluation/README.md`](../examples/solver_time_evaluation/README.md).
348
+ See detailed benchmark results in [`examples/solver_benchmarks/README.md`](../examples/solver_benchmarks/README.md).
349
349
 
350
350
  **Summary**:
351
351
  - **Small N (< 64)**: LU and GS comparable
@@ -361,7 +361,7 @@ See detailed benchmark results in [`examples/solver_time_evaluation/README.md`](
361
361
 
362
362
  **Related Documentation**:
363
363
  - Original ESRF Methods 0-4: https://www.esrf.fr/home/Accelerators/instrumentation--equipment/Software/Radia/Documentation/ReferenceGuide.html
364
- - Benchmark analysis: [`examples/solver_time_evaluation/README.md`](../examples/solver_time_evaluation/README.md)
364
+ - Benchmark analysis: [`examples/solver_benchmarks/README.md`](../examples/solver_benchmarks/README.md)
365
365
 
366
366
  ---
367
367
 
@@ -722,7 +722,7 @@ B_direct = radia_ngsolve.RadiaField(magnet, 'b')
722
722
 
723
723
  #### Performance Comparison
724
724
 
725
- See [`examples/Radia_to_NGSolve_CoefficientFunction_A/README.md`](../examples/Radia_to_NGSolve_CoefficientFunction_A/README.md) for detailed benchmarks.
725
+ See [`examples/ngsolve_integration/README.md`](../examples/ngsolve_integration/README.md) for detailed benchmarks.
726
726
 
727
727
  **Typical speedup with H-matrix** (N > 500):
728
728
  - Field evaluation: 2-10× faster
@@ -761,7 +761,7 @@ See [`examples/Radia_to_NGSolve_CoefficientFunction_A/README.md`](../examples/Ra
761
761
  https://www.esrf.fr/home/Accelerators/instrumentation--equipment/Software/Radia/Documentation/ReferenceGuide.html
762
762
 
763
763
  2. **Benchmark Results**
764
- [`examples/solver_time_evaluation/README.md`](../examples/solver_time_evaluation/README.md)
764
+ [`examples/solver_benchmarks/README.md`](../examples/solver_benchmarks/README.md)
765
765
 
766
766
  3. **NGSolve Integration Guide**
767
767
  [`docs/NGSOLVE_USAGE_GUIDE.md`](NGSOLVE_USAGE_GUIDE.md)
@@ -1021,7 +1021,7 @@ rad.Solve(mag_obj, 0.0001, 10000)
1021
1021
  - [API_EXTENSIONS.md](API_EXTENSIONS.md) - Detailed documentation of custom extensions
1022
1022
 
1023
1023
  3. **Examples**
1024
- - [`examples/solver_time_evaluation/README.md`](../examples/solver_time_evaluation/README.md) - Solver benchmarks
1024
+ - [`examples/solver_benchmarks/README.md`](../examples/solver_benchmarks/README.md) - Solver benchmarks
1025
1025
  - [`examples/simple_problems/`](../examples/simple_problems/) - Basic examples
1026
1026
  - [`examples/complex_coil_geometry/`](../examples/complex_coil_geometry/) - Complex geometries
1027
1027
 
@@ -0,0 +1,139 @@
1
+ # H-Matrix Acceleration Evaluation for Radia
2
+
3
+ **Date**: 2025-12-05
4
+ **Status**: Evaluation Complete - NOT Recommended for Radia
5
+
6
+ ## Executive Summary
7
+
8
+ H-matrix (Hierarchical Matrix) acceleration was evaluated for Radia's MMM (Magnetic Moment Method) solver. **Conclusion: H-matrix provides NO benefit for Radia's typical use cases** and is NOT recommended for integration.
9
+
10
+ ## Benchmark Results
11
+
12
+ ### Single Compact Object (Cube in Uniform Field)
13
+
14
+ | N_div | Elements | DOF | LU Time | BiCGSTAB Time | H-matrix BiCGSTAB |
15
+ |-------|----------|-----|---------|---------------|-------------------|
16
+ | 10 | 1,000 | 3,000 | 2.01s | 0.54s | 0.53s (**1.02x**) |
17
+ | 15 | 3,375 | 10,125 | 24.28s | 7.56s | 7.27s (**1.04x**) |
18
+ | 20 | 8,000 | 24,000 | 278.68s | 47.05s | 47.33s (**0.99x**) |
19
+
20
+ **Key Finding**: H-matrix shows **NO speedup** (0.97x-1.04x ratio) for compact objects.
21
+
22
+ ## Why H-Matrix Does NOT Help Radia
23
+
24
+ ### 1. Admissibility Criterion Failure
25
+
26
+ H-matrix partitions the interaction matrix into:
27
+ - **Far-field blocks**: Low-rank approximation (ACA)
28
+ - **Near-field blocks**: Dense (full) storage
29
+
30
+ The admissibility criterion is:
31
+ ```
32
+ dist(cluster_i, cluster_j) >= eta * min(diam(cluster_i), diam(cluster_j))
33
+ ```
34
+
35
+ For a **single compact object** (typical Radia use case):
36
+ - All elements are spatially close together
37
+ - `dist` is always small relative to `diam`
38
+ - **NO blocks satisfy the admissibility criterion**
39
+ - **ALL blocks remain dense** -> No compression benefit
40
+
41
+ ### 2. Radia's Typical Use Cases
42
+
43
+ Radia is designed for:
44
+ - Single magnet assemblies (undulators, wigglers)
45
+ - Compact electromagnet designs
46
+ - Objects where elements are tightly packed
47
+
48
+ These geometries have **high element density** with **no spatial separation**, making H-matrix ineffective.
49
+
50
+ ### 3. When H-Matrix WOULD Help
51
+
52
+ H-matrix is beneficial for:
53
+ - **Multiple separated objects** (e.g., array of magnets with large gaps)
54
+ - **Particle simulations** with distributed sources
55
+ - **BEM** for 3D geometries with large surface-to-volume ratio
56
+
57
+ These are **NOT typical Radia use cases**.
58
+
59
+ ## HACApK Integration Assessment
60
+
61
+ ### HACApK Library Overview
62
+ - **Source**: ppOpen-HPC project (MIT License)
63
+ - **Purpose**: H-matrix with ACA+ for large-scale problems
64
+ - **Design**: MPI-parallel, targeting supercomputers
65
+
66
+ ### Integration Challenges
67
+
68
+ 1. **MPI Dependency**
69
+ - HACApK requires MPI (`#include <mpi.h>`)
70
+ - Solution: MPI stub header created (`mpi_stub.h`)
71
+ - Status: Solved
72
+
73
+ 2. **Callback Interface**
74
+ - HACApK requires `cHACApK_calc_entry_ij.h` for matrix element computation
75
+ - Must provide Radia-specific implementation
76
+ - Complexity: Medium
77
+
78
+ 3. **Code Adaptation**
79
+ - ~5000+ lines of C/Fortran code
80
+ - Designed for distributed memory systems
81
+ - Would require significant adaptation for single-process use
82
+
83
+ 4. **Build System Integration**
84
+ - CMake changes needed
85
+ - Cross-platform testing required
86
+
87
+ ### Effort vs. Benefit Analysis
88
+
89
+ | Aspect | Effort | Benefit |
90
+ |--------|--------|---------|
91
+ | MPI stub | Low | - |
92
+ | Callback implementation | Medium | - |
93
+ | Code adaptation | High | - |
94
+ | Build integration | Medium | - |
95
+ | Testing/debugging | High | - |
96
+ | **Total Effort** | **HIGH** | **ZERO** (for typical use cases) |
97
+
98
+ ## Recommendation
99
+
100
+ **DO NOT integrate HACApK** for the following reasons:
101
+
102
+ 1. **No benefit for typical use cases**: H-matrix provides zero speedup for compact objects
103
+ 2. **High integration effort**: ~2-4 weeks of development time
104
+ 3. **Code complexity**: Adds 5000+ lines of code to maintain
105
+ 4. **Limited applicability**: Only helps for separated objects (rare in Radia)
106
+
107
+ ### Alternative Optimizations
108
+
109
+ For Radia performance improvement, consider:
110
+
111
+ 1. **OpenMP parallelization** (already implemented)
112
+ - Matrix-vector product parallelization
113
+ - LU decomposition parallelization
114
+
115
+ 2. **BLAS/LAPACK optimization**
116
+ - OpenBLAS with optimized kernels
117
+ - Intel MKL for Intel CPUs
118
+
119
+ 3. **Preconditioner improvements**
120
+ - Better Jacobi/block-Jacobi preconditioners
121
+ - ILU preconditioner for BiCGSTAB
122
+
123
+ 4. **Memory layout optimization**
124
+ - Cache-friendly data structures
125
+ - SIMD vectorization
126
+
127
+ ## Files Created During Evaluation
128
+
129
+ - `src/ext/HACApK_LH-Cimplm/mpi_stub.h` - MPI stub for single-process
130
+
131
+ ## References
132
+
133
+ 1. HACApK: https://github.com/RIKENGITHUB/ppOpen-HPC
134
+ 2. Original paper: Ida, A., et al. "HACApK: An H-matrix library for Krylov methods"
135
+ 3. Radia benchmarks: `examples/cube_uniform_field/nonlinear/`
136
+
137
+ ---
138
+
139
+ **Conclusion**: H-matrix acceleration is NOT suitable for Radia. Focus on other optimization strategies.