radia 1.3.6__tar.gz → 1.3.8__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 (197) hide show
  1. {radia-1.3.6/src/radia.egg-info → radia-1.3.8}/PKG-INFO +1 -1
  2. {radia-1.3.6 → radia-1.3.8}/docs/SOLVER_METHODS.md +61 -83
  3. {radia-1.3.6 → radia-1.3.8}/pyproject.toml +1 -1
  4. {radia-1.3.6 → radia-1.3.8}/setup.py +6 -3
  5. radia-1.3.8/src/radia/__init__.py +18 -0
  6. radia-1.3.8/src/radia/radia.pyd +0 -0
  7. {radia-1.3.6 → radia-1.3.8/src/radia.egg-info}/PKG-INFO +1 -1
  8. {radia-1.3.6 → radia-1.3.8}/src/radia.egg-info/SOURCES.txt +12 -12
  9. radia-1.3.8/src/radia.egg-info/top_level.txt +1 -0
  10. radia-1.3.6/src/python/__init__.py +0 -2
  11. radia-1.3.6/src/python/radia.pyd +0 -0
  12. radia-1.3.6/src/radia.egg-info/top_level.txt +0 -1
  13. {radia-1.3.6 → radia-1.3.8}/COPYRIGHT.txt +0 -0
  14. {radia-1.3.6 → radia-1.3.8}/LICENSE +0 -0
  15. {radia-1.3.6 → radia-1.3.8}/MANIFEST.in +0 -0
  16. {radia-1.3.6 → radia-1.3.8}/README.md +0 -0
  17. {radia-1.3.6 → radia-1.3.8}/docs/API_EXTENSIONS.md +0 -0
  18. {radia-1.3.6 → radia-1.3.8}/docs/API_REFERENCE.md +0 -0
  19. {radia-1.3.6 → radia-1.3.8}/docs/CF_BACKGROUND_FIELD_IMPLEMENTATION.md +0 -0
  20. {radia-1.3.6 → radia-1.3.8}/docs/HMATRIX_BENCHMARKS_RESULTS.md +0 -0
  21. {radia-1.3.6 → radia-1.3.8}/docs/HMATRIX_ENHANCEMENT_PROPOSAL_2025.md +0 -0
  22. {radia-1.3.6 → radia-1.3.8}/docs/HMATRIX_IMPLEMENTATION_HISTORY.md +0 -0
  23. {radia-1.3.6 → radia-1.3.8}/docs/HMATRIX_SERIALIZATION.md +0 -0
  24. {radia-1.3.6 → radia-1.3.8}/docs/HMATRIX_USER_GUIDE.md +0 -0
  25. {radia-1.3.6 → radia-1.3.8}/docs/MATERIAL_API_IMPLEMENTATION.md +0 -0
  26. {radia-1.3.6 → radia-1.3.8}/docs/ML_PARAMETER_TUNING.md +0 -0
  27. {radia-1.3.6 → radia-1.3.8}/docs/NGSOLVE_CF_BACKGROUND_FIELD_DESIGN.md +0 -0
  28. {radia-1.3.6 → radia-1.3.8}/docs/NGSOLVE_INTEGRATION.md +0 -0
  29. {radia-1.3.6 → radia-1.3.8}/docs/NGSOLVE_USAGE_GUIDE.md +0 -0
  30. {radia-1.3.6 → radia-1.3.8}/docs/README.md +0 -0
  31. {radia-1.3.6 → radia-1.3.8}/docs/scripts/README.md +0 -0
  32. {radia-1.3.6 → radia-1.3.8}/examples/README.md +0 -0
  33. {radia-1.3.6 → radia-1.3.8}/examples/background_fields/README.md +0 -0
  34. {radia-1.3.6 → radia-1.3.8}/examples/background_fields/cubit_to_nastran.py +0 -0
  35. {radia-1.3.6 → radia-1.3.8}/examples/background_fields/permeability_comparison.py +0 -0
  36. {radia-1.3.6 → radia-1.3.8}/examples/background_fields/quadrupole_analytical.py +0 -0
  37. {radia-1.3.6 → radia-1.3.8}/examples/background_fields/quadrupole_analytical.vtk.vtk +0 -0
  38. {radia-1.3.6 → radia-1.3.8}/examples/background_fields/sphere_in_quadrupole.py +0 -0
  39. {radia-1.3.6 → radia-1.3.8}/examples/background_fields/sphere_nastran_analysis.py +0 -0
  40. {radia-1.3.6 → radia-1.3.8}/examples/background_fields/sphere_nastran_field_mu.pvsm +0 -0
  41. {radia-1.3.6 → radia-1.3.8}/examples/background_fields/sphere_nastran_geometry.vtk +0 -0
  42. {radia-1.3.6 → radia-1.3.8}/examples/complex_coil_geometry/README.md +0 -0
  43. {radia-1.3.6 → radia-1.3.8}/examples/complex_coil_geometry/coil_geometry.vtk +0 -0
  44. {radia-1.3.6 → radia-1.3.8}/examples/complex_coil_geometry/coil_model.py +0 -0
  45. {radia-1.3.6 → radia-1.3.8}/examples/complex_coil_geometry/complex_coil.pvsm +0 -0
  46. {radia-1.3.6 → radia-1.3.8}/examples/complex_coil_geometry/field_map.py +0 -0
  47. {radia-1.3.6 → radia-1.3.8}/examples/complex_coil_geometry/field_map.vtk +0 -0
  48. {radia-1.3.6 → radia-1.3.8}/examples/complex_coil_geometry/visualize_coils.py +0 -0
  49. {radia-1.3.6 → radia-1.3.8}/examples/cube_uniform_field/README.md +0 -0
  50. {radia-1.3.6 → radia-1.3.8}/examples/cube_uniform_field/linear/README.md +0 -0
  51. {radia-1.3.6 → radia-1.3.8}/examples/cube_uniform_field/linear/README_CUBE_BENCHMARK.md +0 -0
  52. {radia-1.3.6 → radia-1.3.8}/examples/cube_uniform_field/linear/benchmark_external_field.py +0 -0
  53. {radia-1.3.6 → radia-1.3.8}/examples/cube_uniform_field/linear/benchmark_high_mu.py +0 -0
  54. {radia-1.3.6 → radia-1.3.8}/examples/cube_uniform_field/linear/benchmark_mesh_convergence.py +0 -0
  55. {radia-1.3.6 → radia-1.3.8}/examples/cube_uniform_field/linear/benchmark_solver_methods.py +0 -0
  56. {radia-1.3.6 → radia-1.3.8}/examples/cube_uniform_field/linear/benchmark_tetra_vs_hex.py +0 -0
  57. {radia-1.3.6 → radia-1.3.8}/examples/cube_uniform_field/linear/benchmark_tetra_vs_ngsolve.py +0 -0
  58. {radia-1.3.6 → radia-1.3.8}/examples/cube_uniform_field/linear/compare_external_field.py +0 -0
  59. {radia-1.3.6 → radia-1.3.8}/examples/cube_uniform_field/linear/cube_benchmark_external_field.py +0 -0
  60. {radia-1.3.6 → radia-1.3.8}/examples/cube_uniform_field/linear/cube_benchmark_radia.vtk +0 -0
  61. {radia-1.3.6 → radia-1.3.8}/examples/cube_uniform_field/linear/evaluate_perturbation_field.py +0 -0
  62. {radia-1.3.6 → radia-1.3.8}/examples/cube_uniform_field/linear/precision_evaluation.py +0 -0
  63. {radia-1.3.6 → radia-1.3.8}/examples/cube_uniform_field/linear/test_method9_fine_mesh.py +0 -0
  64. {radia-1.3.6 → radia-1.3.8}/examples/cube_uniform_field/linear/test_method9_high_mu.py +0 -0
  65. {radia-1.3.6 → radia-1.3.8}/examples/cube_uniform_field/nonlinear/README.md +0 -0
  66. {radia-1.3.6 → radia-1.3.8}/examples/cube_uniform_field/nonlinear/benchmark_nonlinear_tetra_vs_hex.py +0 -0
  67. {radia-1.3.6 → radia-1.3.8}/examples/electromagnet/README.md +0 -0
  68. {radia-1.3.6 → radia-1.3.8}/examples/electromagnet/Radia_model.vtk +0 -0
  69. {radia-1.3.6 → radia-1.3.8}/examples/electromagnet/York.vtk +0 -0
  70. {radia-1.3.6 → radia-1.3.8}/examples/electromagnet/field_distribution.vtk +0 -0
  71. {radia-1.3.6 → radia-1.3.8}/examples/electromagnet/main_simulation_workflow.py +0 -0
  72. {radia-1.3.6 → radia-1.3.8}/examples/electromagnet/visualize_paraview.py +0 -0
  73. {radia-1.3.6 → radia-1.3.8}/examples/electromagnet/york_cubit_mesh.py +0 -0
  74. {radia-1.3.6 → radia-1.3.8}/examples/ngsolve_integration/README.md +0 -0
  75. {radia-1.3.6 → radia-1.3.8}/examples/ngsolve_integration/benchmark_gridfunction_set.py +0 -0
  76. {radia-1.3.6 → radia-1.3.8}/examples/ngsolve_integration/demo_batch_evaluation.py +0 -0
  77. {radia-1.3.6 → radia-1.3.8}/examples/ngsolve_integration/demo_field_types.py +0 -0
  78. {radia-1.3.6 → radia-1.3.8}/examples/ngsolve_integration/mesh_magnetization_import/RADIA_TETRA_ROOT_CAUSE.md +0 -0
  79. {radia-1.3.6 → radia-1.3.8}/examples/ngsolve_integration/mesh_magnetization_import/README.md +0 -0
  80. {radia-1.3.6 → radia-1.3.8}/examples/ngsolve_integration/mesh_magnetization_import/compare_radia_ngsolve_cube.py +0 -0
  81. {radia-1.3.6 → radia-1.3.8}/examples/ngsolve_integration/mesh_magnetization_import/cube_hex.vtk +0 -0
  82. {radia-1.3.6 → radia-1.3.8}/examples/ngsolve_integration/mesh_magnetization_import/demo_tetrahedral_methods_comparison.py +0 -0
  83. {radia-1.3.6 → radia-1.3.8}/examples/ngsolve_integration/mesh_magnetization_import/ngsolve_cube_graded_mesh.vtk +0 -0
  84. {radia-1.3.6 → radia-1.3.8}/examples/ngsolve_integration/mesh_magnetization_import/ngsolve_cube_uniform_field.py +0 -0
  85. {radia-1.3.6 → radia-1.3.8}/examples/ngsolve_integration/mesh_magnetization_import/ngsolve_tet_mesh.vtk +0 -0
  86. {radia-1.3.6 → radia-1.3.8}/examples/ngsolve_integration/mesh_magnetization_import/sphere_domain_graded_mesh.vtk +0 -0
  87. {radia-1.3.6 → radia-1.3.8}/examples/ngsolve_integration/test_batch_evaluation.py +0 -0
  88. {radia-1.3.6 → radia-1.3.8}/examples/ngsolve_integration/verify_curl_A_equals_B.py +0 -0
  89. {radia-1.3.6 → radia-1.3.8}/examples/ngsolve_integration/visualize_field.py +0 -0
  90. {radia-1.3.6 → radia-1.3.8}/examples/simple_problems/CONVERSION_NOTES.md +0 -0
  91. {radia-1.3.6 → radia-1.3.8}/examples/simple_problems/README.md +0 -0
  92. {radia-1.3.6 → radia-1.3.8}/examples/simple_problems/arc_current_dual_magnets.py +0 -0
  93. {radia-1.3.6 → radia-1.3.8}/examples/simple_problems/arc_current_with_magnet.py +0 -0
  94. {radia-1.3.6 → radia-1.3.8}/examples/simple_problems/chamfered_pole_piece.py +0 -0
  95. {radia-1.3.6 → radia-1.3.8}/examples/simple_problems/compare_magpylib.py +0 -0
  96. {radia-1.3.6 → radia-1.3.8}/examples/simple_problems/cubic_polyhedron_magnet.py +0 -0
  97. {radia-1.3.6 → radia-1.3.8}/examples/smco_magnet_array/README.md +0 -0
  98. {radia-1.3.6 → radia-1.3.8}/examples/smco_magnet_array/smbo.pvsm +0 -0
  99. {radia-1.3.6 → radia-1.3.8}/examples/smco_magnet_array/smco_array.py +0 -0
  100. {radia-1.3.6 → radia-1.3.8}/examples/smco_magnet_array/smco_array.vtk +0 -0
  101. {radia-1.3.6 → radia-1.3.8}/examples/smco_magnet_array/smco_field_distribution.vtk +0 -0
  102. {radia-1.3.6 → radia-1.3.8}/examples/solver_benchmarks/BENCHMARK_RESULTS.md +0 -0
  103. {radia-1.3.6 → radia-1.3.8}/examples/solver_benchmarks/HMATRIX_FIELD_DESIGN.md +0 -0
  104. {radia-1.3.6 → radia-1.3.8}/examples/solver_benchmarks/HMATRIX_FIELD_DESIGN_SIMPLIFIED.md +0 -0
  105. {radia-1.3.6 → radia-1.3.8}/examples/solver_benchmarks/PHASE2B_REEVALUATION.md +0 -0
  106. {radia-1.3.6 → radia-1.3.8}/examples/solver_benchmarks/README.md +0 -0
  107. {radia-1.3.6 → radia-1.3.8}/examples/solver_benchmarks/SCALING_RESULTS.md +0 -0
  108. {radia-1.3.6 → radia-1.3.8}/examples/solver_benchmarks/benchmark_field_evaluation.py +0 -0
  109. {radia-1.3.6 → radia-1.3.8}/examples/solver_benchmarks/benchmark_large_scale_comparison.py +0 -0
  110. {radia-1.3.6 → radia-1.3.8}/examples/solver_benchmarks/benchmark_linear_material.py +0 -0
  111. {radia-1.3.6 → radia-1.3.8}/examples/solver_benchmarks/benchmark_lu_vs_hmatrix.py +0 -0
  112. {radia-1.3.6 → radia-1.3.8}/examples/solver_benchmarks/benchmark_matrix_construction.py +0 -0
  113. {radia-1.3.6 → radia-1.3.8}/examples/solver_benchmarks/benchmark_parallel_construction.py +0 -0
  114. {radia-1.3.6 → radia-1.3.8}/examples/solver_benchmarks/benchmark_solver.py +0 -0
  115. {radia-1.3.6 → radia-1.3.8}/examples/solver_benchmarks/benchmark_solver_comparison.py +0 -0
  116. {radia-1.3.6 → radia-1.3.8}/examples/solver_benchmarks/benchmark_solver_methods.py +0 -0
  117. {radia-1.3.6 → radia-1.3.8}/examples/solver_benchmarks/benchmark_solver_scaling.py +0 -0
  118. {radia-1.3.6 → radia-1.3.8}/examples/solver_benchmarks/benchmark_solver_scaling_extended.py +0 -0
  119. {radia-1.3.6 → radia-1.3.8}/examples/solver_benchmarks/plot_benchmark_results.py +0 -0
  120. {radia-1.3.6 → radia-1.3.8}/examples/solver_benchmarks/run_all_benchmarks.py +0 -0
  121. {radia-1.3.6 → radia-1.3.8}/examples/solver_benchmarks/verify_field_accuracy.py +0 -0
  122. {radia-1.3.6 → radia-1.3.8}/setup.cfg +0 -0
  123. {radia-1.3.6/src/python → radia-1.3.8/src/radia}/nastran_mesh_import.py +0 -0
  124. {radia-1.3.6/src/python → radia-1.3.8/src/radia}/netgen_mesh_import.py +0 -0
  125. {radia-1.3.6/src/python → radia-1.3.8/src/radia}/rad_ngsolve_fast.py +0 -0
  126. {radia-1.3.6/src/python → radia-1.3.8/src/radia}/radia_coil_builder.py +0 -0
  127. {radia-1.3.6/src/python → radia-1.3.8/src/radia}/radia_field_cached.py +0 -0
  128. {radia-1.3.6/src/python → radia-1.3.8/src/radia}/radia_ngsolve.pyd +0 -0
  129. {radia-1.3.6/src/python → radia-1.3.8/src/radia}/radia_ngsolve_field.py +0 -0
  130. {radia-1.3.6/src/python → radia-1.3.8/src/radia}/radia_ngsolve_utils.py +0 -0
  131. {radia-1.3.6/src/python → radia-1.3.8/src/radia}/radia_pyvista_viewer.py +0 -0
  132. {radia-1.3.6/src/python → radia-1.3.8/src/radia}/radia_vtk_export.py +0 -0
  133. {radia-1.3.6 → radia-1.3.8}/src/radia.egg-info/dependency_links.txt +0 -0
  134. {radia-1.3.6 → radia-1.3.8}/src/radia.egg-info/not-zip-safe +0 -0
  135. {radia-1.3.6 → radia-1.3.8}/src/radia.egg-info/requires.txt +0 -0
  136. {radia-1.3.6 → radia-1.3.8}/tests/README.md +0 -0
  137. {radia-1.3.6 → radia-1.3.8}/tests/__init__.py +0 -0
  138. {radia-1.3.6 → radia-1.3.8}/tests/benchmarks/benchmark_correct.py +0 -0
  139. {radia-1.3.6 → radia-1.3.8}/tests/benchmarks/benchmark_heavy.py +0 -0
  140. {radia-1.3.6 → radia-1.3.8}/tests/benchmarks/benchmark_openmp.py +0 -0
  141. {radia-1.3.6 → radia-1.3.8}/tests/benchmarks/benchmark_threads.py +0 -0
  142. {radia-1.3.6 → radia-1.3.8}/tests/conftest.py +0 -0
  143. {radia-1.3.6 → radia-1.3.8}/tests/profile_batch_performance.py +0 -0
  144. {radia-1.3.6 → radia-1.3.8}/tests/test_advanced.py +0 -0
  145. {radia-1.3.6 → radia-1.3.8}/tests/test_all_spaces.py +0 -0
  146. {radia-1.3.6 → radia-1.3.8}/tests/test_background_field_debug.py +0 -0
  147. {radia-1.3.6 → radia-1.3.8}/tests/test_batch_evaluation.py +0 -0
  148. {radia-1.3.6 → radia-1.3.8}/tests/test_cf_direct.py +0 -0
  149. {radia-1.3.6 → radia-1.3.8}/tests/test_convergence_hdiv.py +0 -0
  150. {radia-1.3.6 → radia-1.3.8}/tests/test_curlA_equals_B.py +0 -0
  151. {radia-1.3.6 → radia-1.3.8}/tests/test_curl_A_detailed.py +0 -0
  152. {radia-1.3.6 → radia-1.3.8}/tests/test_far_field_accuracy.py +0 -0
  153. {radia-1.3.6 → radia-1.3.8}/tests/test_fast_preparecache.py +0 -0
  154. {radia-1.3.6 → radia-1.3.8}/tests/test_fast_simple.py +0 -0
  155. {radia-1.3.6 → radia-1.3.8}/tests/test_group_operations.py +0 -0
  156. {radia-1.3.6 → radia-1.3.8}/tests/test_hcurl_vs_hdiv.py +0 -0
  157. {radia-1.3.6 → radia-1.3.8}/tests/test_l2_norm_debug.py +0 -0
  158. {radia-1.3.6 → radia-1.3.8}/tests/test_magpylib_comparison.py +0 -0
  159. {radia-1.3.6 → radia-1.3.8}/tests/test_materials.py +0 -0
  160. {radia-1.3.6 → radia-1.3.8}/tests/test_memory_allocation_tracking.py +0 -0
  161. {radia-1.3.6 → radia-1.3.8}/tests/test_minimal_cached.py +0 -0
  162. {radia-1.3.6 → radia-1.3.8}/tests/test_moving_magnet_memory.py +0 -0
  163. {radia-1.3.6 → radia-1.3.8}/tests/test_moving_magnet_memory_diagnosis.py +0 -0
  164. {radia-1.3.6 → radia-1.3.8}/tests/test_new_material_api.py +0 -0
  165. {radia-1.3.6 → radia-1.3.8}/tests/test_objbckg_simple.py +0 -0
  166. {radia-1.3.6 → radia-1.3.8}/tests/test_objbckgcf_alone.py +0 -0
  167. {radia-1.3.6 → radia-1.3.8}/tests/test_order1.py +0 -0
  168. {radia-1.3.6 → radia-1.3.8}/tests/test_parallel_performance.py +0 -0
  169. {radia-1.3.6 → radia-1.3.8}/tests/test_preparecache_performance.py +0 -0
  170. {radia-1.3.6 → radia-1.3.8}/tests/test_process_memory.py +0 -0
  171. {radia-1.3.6 → radia-1.3.8}/tests/test_python_cached_field.py +0 -0
  172. {radia-1.3.6 → radia-1.3.8}/tests/test_python_cached_simple.py +0 -0
  173. {radia-1.3.6 → radia-1.3.8}/tests/test_rad_ngsolve.py +0 -0
  174. {radia-1.3.6 → radia-1.3.8}/tests/test_rad_ngsolve_diagnostic.py +0 -0
  175. {radia-1.3.6 → radia-1.3.8}/tests/test_rad_ngsolve_function.py +0 -0
  176. {radia-1.3.6 → radia-1.3.8}/tests/test_radhmat.py +0 -0
  177. {radia-1.3.6 → radia-1.3.8}/tests/test_radia.py +0 -0
  178. {radia-1.3.6 → radia-1.3.8}/tests/test_radia_core_memory.py +0 -0
  179. {radia-1.3.6 → radia-1.3.8}/tests/test_radia_field_computation_memory.py +0 -0
  180. {radia-1.3.6 → radia-1.3.8}/tests/test_radia_ngsolve_longrun.py +0 -0
  181. {radia-1.3.6 → radia-1.3.8}/tests/test_radia_ngsolve_memory_leak.py +0 -0
  182. {radia-1.3.6 → radia-1.3.8}/tests/test_radia_ngsolve_with_cache.py +0 -0
  183. {radia-1.3.6 → radia-1.3.8}/tests/test_radia_only_memory.py +0 -0
  184. {radia-1.3.6 → radia-1.3.8}/tests/test_serialization.py +0 -0
  185. {radia-1.3.6 → radia-1.3.8}/tests/test_set_vs_interpolate.py +0 -0
  186. {radia-1.3.6 → radia-1.3.8}/tests/test_simple.py +0 -0
  187. {radia-1.3.6 → radia-1.3.8}/tests/test_simple_fld_leak.py +0 -0
  188. {radia-1.3.6 → radia-1.3.8}/tests/test_square_coil_analytical.py +0 -0
  189. {radia-1.3.6 → radia-1.3.8}/tests/test_tetrahedral_solver.py +0 -0
  190. {radia-1.3.6 → radia-1.3.8}/tests/test_transformations.py +0 -0
  191. {radia-1.3.6 → radia-1.3.8}/tests/test_type_cast.py +0 -0
  192. {radia-1.3.6 → radia-1.3.8}/tests/test_unit_conversion_verify.py +0 -0
  193. {radia-1.3.6 → radia-1.3.8}/tests/test_utils.py +0 -0
  194. {radia-1.3.6 → radia-1.3.8}/tests/test_vector_potential.py +0 -0
  195. {radia-1.3.6 → radia-1.3.8}/tests/test_without_B_projection.py +0 -0
  196. {radia-1.3.6 → radia-1.3.8}/tests/test_without_gridfunction.py +0 -0
  197. {radia-1.3.6 → radia-1.3.8}/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.6
3
+ Version: 1.3.8
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
@@ -2,16 +2,15 @@
2
2
 
3
3
  This document describes the available solver methods in Radia.
4
4
 
5
- ## Available Methods
5
+ ## Available Methods (v1.3.7+)
6
6
 
7
7
  | Method | Name | Complexity | Linear | Nonlinear | Best For |
8
8
  |--------|------|------------|--------|-----------|----------|
9
- | **Newton-Raphson** | `'newton'` or `8` | O(N^2 * k) | Yes | Yes | Nonlinear materials |
10
- | **LU Direct** | `'lu'` or `9` | O(N^3 * k) | Yes | Yes | Small problems (N < 500) |
11
- | **BiCGSTAB** (Default) | `'bicgstab'` or `10` | O(N^2 * k) | Yes | Yes | General purpose |
9
+ | **LU Direct** | `'lu'` or `'direct'` or `0` | O(N^3 * k) | Yes | Yes | Small problems (N < 500) |
10
+ | **BiCGSTAB** (Default) | `'bicgstab'` or `'iterative'` or `1` | O(N^2 * k) | Yes | Yes | General purpose |
12
11
  | **BiCGSTAB + H-matrix** | `'bicgstab'` + `SolverHMatrixEnable()` | O(N log N * k) | Yes | Yes | Large problems (N > 1000) |
13
12
 
14
- **Note:** All solvers now support both linear and nonlinear materials (v1.3.5+).
13
+ **Note:** All solvers support both linear and nonlinear materials. The Newton-Raphson method (former Method 8) has been removed in v1.3.7 - Newton-style M(H) updates are now integrated into both LU and BiCGSTAB solvers.
15
14
 
16
15
  ## Usage
17
16
 
@@ -34,14 +33,14 @@ grp = rad.ObjCnt([cube, ext_field])
34
33
  res = rad.Solve(grp, 0.0001, 1000)
35
34
 
36
35
  # Or specify method by name
37
- res = rad.Solve(grp, 0.0001, 1000, 'bicgstab') # BiCGSTAB
38
- res = rad.Solve(grp, 0.0001, 1000, 'lu') # LU decomposition
39
- res = rad.Solve(grp, 0.0001, 1000, 'newton') # Newton-Raphson (nonlinear)
40
-
41
- # Or by number (for backward compatibility)
42
- res = rad.Solve(grp, 0.0001, 1000, 10) # BiCGSTAB
43
- res = rad.Solve(grp, 0.0001, 1, 9) # LU (only 1 iteration needed)
44
- res = rad.Solve(grp, 0.0001, 1000, 8) # Newton-Raphson
36
+ res = rad.Solve(grp, 0.0001, 1000, 'bicgstab') # BiCGSTAB (default)
37
+ res = rad.Solve(grp, 0.0001, 1000, 'iterative') # Same as 'bicgstab'
38
+ res = rad.Solve(grp, 0.0001, 1000, 'lu') # LU decomposition
39
+ res = rad.Solve(grp, 0.0001, 1000, 'direct') # Same as 'lu'
40
+
41
+ # Or by number
42
+ res = rad.Solve(grp, 0.0001, 1000, 0) # LU Direct
43
+ res = rad.Solve(grp, 0.0001, 1000, 1) # BiCGSTAB
45
44
  ```
46
45
 
47
46
  ### Method Selection Guide
@@ -55,45 +54,35 @@ Problem size?
55
54
  Material type?
56
55
  |-- Linear (MatLin) --> Any solver works
57
56
  |-- Nonlinear (MatSatIso, MatSatIsoTab, etc.) --> Any solver works
58
- 'newton' is traditional choice
59
- 'bicgstab' also works well
60
57
  ```
61
58
 
62
- **Note:** All solvers now have outer nonlinear iteration loops, so they all
63
- handle nonlinear materials correctly. The choice depends mainly on problem size.
59
+ **Note:** Both solvers have outer nonlinear iteration loops with Newton-style M(H) updates, so they handle nonlinear materials correctly. The choice depends mainly on problem size.
64
60
 
65
- ## Newton-Raphson (Method 8)
61
+ ## LU Direct Solver (Method 0)
66
62
 
67
- Newton-Raphson iterative solver for **nonlinear materials**. Uses local Jacobian for each element.
63
+ Direct solver using LU decomposition with partial pivoting. O(N^3) complexity per nonlinear iteration.
68
64
 
69
65
  **Pros:**
70
- - Handles nonlinear (saturable) materials correctly
71
- - Uses instantaneous susceptibility at each iteration
72
- - Good convergence for typical B-H curves
66
+ - Exact solution per nonlinear iteration
67
+ - Always converges
68
+ - Stable for all materials
69
+ - Supports both linear and nonlinear materials
73
70
 
74
71
  **Cons:**
75
- - Slower than BiCGSTAB for linear materials
76
- - Requires well-defined B-H curve
72
+ - O(N^3) time complexity - slow for large N
73
+ - O(N^2) memory usage
77
74
 
78
- **Best for:** Nonlinear materials (MatSatIso, MatSatIsoTab, MatLam, etc.)
75
+ **Best for:** Small problems (N < 500), validation/debugging
79
76
 
80
77
  ```python
81
- # Nonlinear material with B-H curve
82
- bh_curve = [
83
- [0, 0],
84
- [100, 0.5],
85
- [500, 1.2],
86
- [2000, 1.6],
87
- [10000, 1.9]
88
- ]
89
- mat = rad.MatSatIsoTab(bh_curve)
90
- rad.MatApl(cube, mat)
91
-
92
- # Solve with Newton-Raphson
93
- res = rad.Solve(grp, 0.0001, 1000, 'newton')
78
+ res = rad.Solve(grp, 0.0001, 100, 'lu') # By name
79
+ res = rad.Solve(grp, 0.0001, 100, 'direct') # Alias
80
+ res = rad.Solve(grp, 0.0001, 100, 0) # By number
94
81
  ```
95
82
 
96
- ## BiCGSTAB (Default)
83
+ **Note:** For linear materials, LU converges in 1-2 outer iterations. For nonlinear materials, multiple outer iterations are needed for chi(H) to converge.
84
+
85
+ ## BiCGSTAB (Method 1, Default)
97
86
 
98
87
  BiCGSTAB (Biconjugate Gradient Stabilized) is an iterative solver with O(N^2 * k) complexity where k is the number of iterations.
99
88
 
@@ -109,34 +98,12 @@ BiCGSTAB (Biconjugate Gradient Stabilized) is an iterative solver with O(N^2 * k
109
98
  **Best for:** General magnetostatic problems, tetrahedral meshes
110
99
 
111
100
  ```python
112
- res = rad.Solve(grp, 0.0001, 1000) # Uses default BiCGSTAB
113
- res = rad.Solve(grp, 0.0001, 1000, 'bicgstab') # Explicit
114
- ```
115
-
116
- ## LU Direct Solver
117
-
118
- Direct solver using LU decomposition with partial pivoting. O(N^3) complexity per nonlinear iteration.
119
-
120
- **Pros:**
121
- - Exact solution per nonlinear iteration
122
- - Always converges
123
- - Stable for all materials
124
- - Supports both linear and nonlinear materials
125
-
126
- **Cons:**
127
- - O(N^3) time complexity - slow for large N
128
- - O(N^2) memory usage
129
-
130
- **Best for:** Small problems (N < 500), validation/debugging
131
-
132
- ```python
133
- res = rad.Solve(grp, 0.0001, 100, 'lu') # For nonlinear materials
134
- res = rad.Solve(grp, 0.0001, 100, 9) # Same as above
101
+ res = rad.Solve(grp, 0.0001, 1000) # Default (BiCGSTAB)
102
+ res = rad.Solve(grp, 0.0001, 1000, 'bicgstab') # By name
103
+ res = rad.Solve(grp, 0.0001, 1000, 'iterative') # Alias
104
+ res = rad.Solve(grp, 0.0001, 1000, 1) # By number
135
105
  ```
136
106
 
137
- **Note:** For linear materials, LU converges in 1 outer iteration. For nonlinear
138
- materials, multiple outer iterations are needed for chi(H) to converge.
139
-
140
107
  ## H-Matrix Acceleration
141
108
 
142
109
  Enable H-matrix with HACApK ACA+ algorithm for BiCGSTAB:
@@ -176,27 +143,27 @@ Results from 40mm soft iron cube (mu_r=1000) in 1T uniform field:
176
143
 
177
144
  ## Accuracy
178
145
 
179
- Both LU and BiCGSTAB methods produce consistent results for linear materials:
146
+ Both LU and BiCGSTAB methods produce identical results:
180
147
 
181
148
  | N_elem | LU Bz (T) | BiCGSTAB Bz (T) | Difference |
182
149
  |--------|-----------|-----------------|------------|
183
- | 27 | 0.1373162 | 0.1373157 | 0.0004% |
184
- | 512 | 0.1406983 | 0.1406980 | 0.0002% |
185
- | 1000 | 0.1411381 | 0.1411383 | 0.0001% |
150
+ | 27 | 14.067658 | 14.067658 | 0.0000% |
151
+ | 64 | 14.067658 | 14.067658 | 0.0000% |
152
+ | 125 | 14.067658 | 14.067658 | 0.0000% |
186
153
 
187
154
  ## Notes
188
155
 
189
- 1. **Default change (v1.3.5):** BiCGSTAB is now the default solver
190
- 2. **Nonlinear support (v1.3.5):** All solvers now use Newton-style M(H) updates and produce identical results
191
- 3. **Tetrahedral meshes:** All methods work correctly with tetrahedral elements
192
- 4. **Material types:**
156
+ 1. **Simplified method numbering (v1.3.7):** Methods are now 0 (LU) and 1 (BiCGSTAB)
157
+ 2. **Newton-Raphson removed (v1.3.7):** Newton-style M(H) updates are integrated into both solvers
158
+ 3. **Default solver:** BiCGSTAB is the default
159
+ 4. **Tetrahedral meshes:** All methods work correctly with tetrahedral elements
160
+ 5. **Material types:**
193
161
  - Linear materials (MatLin): Any solver works; 'bicgstab' is fastest for large problems
194
162
  - Nonlinear materials (MatSatIso, MatSatIsoTab, MatLam): Any solver works; all produce identical results
195
- 5. **Method numbers:** For backward compatibility, methods can also be specified by number (8=Newton, 9=LU, 10=BiCGSTAB)
196
163
 
197
164
  ## Technical Details: Nonlinear Material Handling
198
165
 
199
- **All solvers (v1.3.5+)** now use Newton-style M(H) updates for nonlinear materials:
166
+ Both solvers use Newton-style M(H) updates for nonlinear materials:
200
167
 
201
168
  1. **Outer iteration loop**: After each linear system solve, apply Newton-style correction
202
169
  2. **Gauss-Seidel update**: For each element i:
@@ -208,14 +175,25 @@ Both LU and BiCGSTAB methods produce consistent results for linear materials:
208
175
  This hybrid approach combines the efficiency of LU/BiCGSTAB with the accuracy of Newton-Raphson:
209
176
  - LU/BiCGSTAB provide a good initial guess for M
210
177
  - Newton-style M(H) update ensures correct nonlinear behavior
211
- - All three solvers now produce identical results for both linear and nonlinear materials
178
+ - Both solvers produce identical results for both linear and nonlinear materials
179
+
180
+ **Solver Comparison** (v1.3.7+):
181
+
182
+ | Method | Number | Inner Method | Nonlinear Update | Best For |
183
+ |--------|--------|--------------|------------------|----------|
184
+ | LU | 0 | LU decomposition | M = M(H) | Small problems, validation |
185
+ | BiCGSTAB | 1 | BiCGSTAB iteration | M = M(H) | General purpose, large problems |
186
+
187
+ Both solvers produce identical results for both linear and nonlinear materials.
188
+
189
+ ## Migration from v1.3.6
212
190
 
213
- **Solver Comparison** (v1.3.5+):
191
+ If you were using method numbers 8, 9, or 10:
214
192
 
215
- | Solver | Inner Method | Nonlinear Update | Best For |
216
- |--------|--------------|------------------|----------|
217
- | Newton (8) | Gauss-Seidel | M = M(H) | General purpose |
218
- | LU (9) | LU decomposition | M = M(H) | Small problems, validation |
219
- | BiCGSTAB (10) | BiCGSTAB iteration | M = M(H) | Large problems |
193
+ | Old (v1.3.6) | New (v1.3.7+) | Notes |
194
+ |--------------|---------------|-------|
195
+ | `8` (Newton) | Removed | Use `0` (LU) or `1` (BiCGSTAB) - both have Newton-style M(H) updates |
196
+ | `9` (LU) | `0` or `'lu'` | Same functionality |
197
+ | `10` (BiCGSTAB) | `1` or `'bicgstab'` | Same functionality, now default |
220
198
 
221
- All solvers produce identical results for both linear and nonlinear materials.
199
+ **Recommended:** Use string names (`'lu'`, `'bicgstab'`, `'direct'`, `'iterative'`) for clarity.
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "radia"
7
- version = "1.3.6"
7
+ version = "1.3.8"
8
8
  description = "Radia 3D Magnetostatics with NGSolve Integration and OpenMP Parallelization"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.12"
@@ -16,7 +16,7 @@ import shutil
16
16
  import sys
17
17
 
18
18
  # Read version from pyproject.toml
19
- version = "1.3.6"
19
+ version = "1.3.8"
20
20
 
21
21
  # Read the README file
22
22
  readme_file = Path(__file__).parent / "README.md"
@@ -25,8 +25,11 @@ long_description = readme_file.read_text(encoding="utf-8") if readme_file.exists
25
25
  def prepare_package_data():
26
26
  """
27
27
  Prepare package data by copying built extension modules to the package directory
28
+
29
+ Note: Package directory is now src/radia (not src/python) so that
30
+ 'import radia' works correctly after pip install.
28
31
  """
29
- package_dir = Path(__file__).parent / "src" / "python"
32
+ package_dir = Path(__file__).parent / "src" / "radia"
30
33
  package_dir.mkdir(parents=True, exist_ok=True)
31
34
 
32
35
  # Copy radia.pyd from build/Release/ if it exists
@@ -86,7 +89,7 @@ setup(
86
89
  packages=find_packages(where="src"),
87
90
  package_dir={"": "src"},
88
91
  package_data={
89
- "python": [
92
+ "radia": [
90
93
  "*.pyd", # Include all .pyd files (radia.pyd, radia_ngsolve.pyd)
91
94
  "*.py", # Include all Python utility modules
92
95
  ],
@@ -0,0 +1,18 @@
1
+ # Radia Python package
2
+ # This module re-exports all symbols from the C++ extension module (radia.pyd)
3
+ # so that 'import radia' works correctly when installed via pip
4
+
5
+ __version__ = "1.3.8"
6
+
7
+ # Import all symbols from the C++ extension module
8
+ try:
9
+ from radia.radia import *
10
+ except ImportError:
11
+ # Fallback for development: try importing from the same directory
12
+ try:
13
+ from .radia import *
14
+ except ImportError as e:
15
+ raise ImportError(
16
+ "Failed to import radia C++ extension module (radia.pyd). "
17
+ "Ensure the package was built correctly with Build.ps1 before installation."
18
+ ) from e
Binary file
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: radia
3
- Version: 1.3.6
3
+ Version: 1.3.8
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
@@ -110,18 +110,18 @@ examples/solver_benchmarks/benchmark_solver_scaling_extended.py
110
110
  examples/solver_benchmarks/plot_benchmark_results.py
111
111
  examples/solver_benchmarks/run_all_benchmarks.py
112
112
  examples/solver_benchmarks/verify_field_accuracy.py
113
- src/python/__init__.py
114
- src/python/nastran_mesh_import.py
115
- src/python/netgen_mesh_import.py
116
- src/python/rad_ngsolve_fast.py
117
- src/python/radia.pyd
118
- src/python/radia_coil_builder.py
119
- src/python/radia_field_cached.py
120
- src/python/radia_ngsolve.pyd
121
- src/python/radia_ngsolve_field.py
122
- src/python/radia_ngsolve_utils.py
123
- src/python/radia_pyvista_viewer.py
124
- src/python/radia_vtk_export.py
113
+ src/radia/__init__.py
114
+ src/radia/nastran_mesh_import.py
115
+ src/radia/netgen_mesh_import.py
116
+ src/radia/rad_ngsolve_fast.py
117
+ src/radia/radia.pyd
118
+ src/radia/radia_coil_builder.py
119
+ src/radia/radia_field_cached.py
120
+ src/radia/radia_ngsolve.pyd
121
+ src/radia/radia_ngsolve_field.py
122
+ src/radia/radia_ngsolve_utils.py
123
+ src/radia/radia_pyvista_viewer.py
124
+ src/radia/radia_vtk_export.py
125
125
  src/radia.egg-info/PKG-INFO
126
126
  src/radia.egg-info/SOURCES.txt
127
127
  src/radia.egg-info/dependency_links.txt
@@ -0,0 +1 @@
1
+ radia
@@ -1,2 +0,0 @@
1
- # Radia Python package
2
- __version__ = "1.1.0"
Binary file
@@ -1 +0,0 @@
1
- python
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