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.
- {radia-1.3.6/src/radia.egg-info → radia-1.3.8}/PKG-INFO +1 -1
- {radia-1.3.6 → radia-1.3.8}/docs/SOLVER_METHODS.md +61 -83
- {radia-1.3.6 → radia-1.3.8}/pyproject.toml +1 -1
- {radia-1.3.6 → radia-1.3.8}/setup.py +6 -3
- radia-1.3.8/src/radia/__init__.py +18 -0
- radia-1.3.8/src/radia/radia.pyd +0 -0
- {radia-1.3.6 → radia-1.3.8/src/radia.egg-info}/PKG-INFO +1 -1
- {radia-1.3.6 → radia-1.3.8}/src/radia.egg-info/SOURCES.txt +12 -12
- radia-1.3.8/src/radia.egg-info/top_level.txt +1 -0
- radia-1.3.6/src/python/__init__.py +0 -2
- radia-1.3.6/src/python/radia.pyd +0 -0
- radia-1.3.6/src/radia.egg-info/top_level.txt +0 -1
- {radia-1.3.6 → radia-1.3.8}/COPYRIGHT.txt +0 -0
- {radia-1.3.6 → radia-1.3.8}/LICENSE +0 -0
- {radia-1.3.6 → radia-1.3.8}/MANIFEST.in +0 -0
- {radia-1.3.6 → radia-1.3.8}/README.md +0 -0
- {radia-1.3.6 → radia-1.3.8}/docs/API_EXTENSIONS.md +0 -0
- {radia-1.3.6 → radia-1.3.8}/docs/API_REFERENCE.md +0 -0
- {radia-1.3.6 → radia-1.3.8}/docs/CF_BACKGROUND_FIELD_IMPLEMENTATION.md +0 -0
- {radia-1.3.6 → radia-1.3.8}/docs/HMATRIX_BENCHMARKS_RESULTS.md +0 -0
- {radia-1.3.6 → radia-1.3.8}/docs/HMATRIX_ENHANCEMENT_PROPOSAL_2025.md +0 -0
- {radia-1.3.6 → radia-1.3.8}/docs/HMATRIX_IMPLEMENTATION_HISTORY.md +0 -0
- {radia-1.3.6 → radia-1.3.8}/docs/HMATRIX_SERIALIZATION.md +0 -0
- {radia-1.3.6 → radia-1.3.8}/docs/HMATRIX_USER_GUIDE.md +0 -0
- {radia-1.3.6 → radia-1.3.8}/docs/MATERIAL_API_IMPLEMENTATION.md +0 -0
- {radia-1.3.6 → radia-1.3.8}/docs/ML_PARAMETER_TUNING.md +0 -0
- {radia-1.3.6 → radia-1.3.8}/docs/NGSOLVE_CF_BACKGROUND_FIELD_DESIGN.md +0 -0
- {radia-1.3.6 → radia-1.3.8}/docs/NGSOLVE_INTEGRATION.md +0 -0
- {radia-1.3.6 → radia-1.3.8}/docs/NGSOLVE_USAGE_GUIDE.md +0 -0
- {radia-1.3.6 → radia-1.3.8}/docs/README.md +0 -0
- {radia-1.3.6 → radia-1.3.8}/docs/scripts/README.md +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/README.md +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/background_fields/README.md +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/background_fields/cubit_to_nastran.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/background_fields/permeability_comparison.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/background_fields/quadrupole_analytical.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/background_fields/quadrupole_analytical.vtk.vtk +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/background_fields/sphere_in_quadrupole.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/background_fields/sphere_nastran_analysis.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/background_fields/sphere_nastran_field_mu.pvsm +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/background_fields/sphere_nastran_geometry.vtk +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/complex_coil_geometry/README.md +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/complex_coil_geometry/coil_geometry.vtk +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/complex_coil_geometry/coil_model.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/complex_coil_geometry/complex_coil.pvsm +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/complex_coil_geometry/field_map.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/complex_coil_geometry/field_map.vtk +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/complex_coil_geometry/visualize_coils.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/cube_uniform_field/README.md +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/cube_uniform_field/linear/README.md +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/cube_uniform_field/linear/README_CUBE_BENCHMARK.md +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/cube_uniform_field/linear/benchmark_external_field.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/cube_uniform_field/linear/benchmark_high_mu.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/cube_uniform_field/linear/benchmark_mesh_convergence.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/cube_uniform_field/linear/benchmark_solver_methods.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/cube_uniform_field/linear/benchmark_tetra_vs_hex.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/cube_uniform_field/linear/benchmark_tetra_vs_ngsolve.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/cube_uniform_field/linear/compare_external_field.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/cube_uniform_field/linear/cube_benchmark_external_field.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/cube_uniform_field/linear/cube_benchmark_radia.vtk +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/cube_uniform_field/linear/evaluate_perturbation_field.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/cube_uniform_field/linear/precision_evaluation.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/cube_uniform_field/linear/test_method9_fine_mesh.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/cube_uniform_field/linear/test_method9_high_mu.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/cube_uniform_field/nonlinear/README.md +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/cube_uniform_field/nonlinear/benchmark_nonlinear_tetra_vs_hex.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/electromagnet/README.md +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/electromagnet/Radia_model.vtk +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/electromagnet/York.vtk +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/electromagnet/field_distribution.vtk +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/electromagnet/main_simulation_workflow.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/electromagnet/visualize_paraview.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/electromagnet/york_cubit_mesh.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/ngsolve_integration/README.md +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/ngsolve_integration/benchmark_gridfunction_set.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/ngsolve_integration/demo_batch_evaluation.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/ngsolve_integration/demo_field_types.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/ngsolve_integration/mesh_magnetization_import/RADIA_TETRA_ROOT_CAUSE.md +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/ngsolve_integration/mesh_magnetization_import/README.md +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/ngsolve_integration/mesh_magnetization_import/compare_radia_ngsolve_cube.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/ngsolve_integration/mesh_magnetization_import/cube_hex.vtk +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/ngsolve_integration/mesh_magnetization_import/demo_tetrahedral_methods_comparison.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/ngsolve_integration/mesh_magnetization_import/ngsolve_cube_graded_mesh.vtk +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/ngsolve_integration/mesh_magnetization_import/ngsolve_cube_uniform_field.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/ngsolve_integration/mesh_magnetization_import/ngsolve_tet_mesh.vtk +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/ngsolve_integration/mesh_magnetization_import/sphere_domain_graded_mesh.vtk +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/ngsolve_integration/test_batch_evaluation.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/ngsolve_integration/verify_curl_A_equals_B.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/ngsolve_integration/visualize_field.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/simple_problems/CONVERSION_NOTES.md +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/simple_problems/README.md +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/simple_problems/arc_current_dual_magnets.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/simple_problems/arc_current_with_magnet.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/simple_problems/chamfered_pole_piece.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/simple_problems/compare_magpylib.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/simple_problems/cubic_polyhedron_magnet.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/smco_magnet_array/README.md +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/smco_magnet_array/smbo.pvsm +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/smco_magnet_array/smco_array.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/smco_magnet_array/smco_array.vtk +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/smco_magnet_array/smco_field_distribution.vtk +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/solver_benchmarks/BENCHMARK_RESULTS.md +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/solver_benchmarks/HMATRIX_FIELD_DESIGN.md +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/solver_benchmarks/HMATRIX_FIELD_DESIGN_SIMPLIFIED.md +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/solver_benchmarks/PHASE2B_REEVALUATION.md +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/solver_benchmarks/README.md +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/solver_benchmarks/SCALING_RESULTS.md +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/solver_benchmarks/benchmark_field_evaluation.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/solver_benchmarks/benchmark_large_scale_comparison.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/solver_benchmarks/benchmark_linear_material.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/solver_benchmarks/benchmark_lu_vs_hmatrix.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/solver_benchmarks/benchmark_matrix_construction.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/solver_benchmarks/benchmark_parallel_construction.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/solver_benchmarks/benchmark_solver.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/solver_benchmarks/benchmark_solver_comparison.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/solver_benchmarks/benchmark_solver_methods.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/solver_benchmarks/benchmark_solver_scaling.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/solver_benchmarks/benchmark_solver_scaling_extended.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/solver_benchmarks/plot_benchmark_results.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/solver_benchmarks/run_all_benchmarks.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/examples/solver_benchmarks/verify_field_accuracy.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/setup.cfg +0 -0
- {radia-1.3.6/src/python → radia-1.3.8/src/radia}/nastran_mesh_import.py +0 -0
- {radia-1.3.6/src/python → radia-1.3.8/src/radia}/netgen_mesh_import.py +0 -0
- {radia-1.3.6/src/python → radia-1.3.8/src/radia}/rad_ngsolve_fast.py +0 -0
- {radia-1.3.6/src/python → radia-1.3.8/src/radia}/radia_coil_builder.py +0 -0
- {radia-1.3.6/src/python → radia-1.3.8/src/radia}/radia_field_cached.py +0 -0
- {radia-1.3.6/src/python → radia-1.3.8/src/radia}/radia_ngsolve.pyd +0 -0
- {radia-1.3.6/src/python → radia-1.3.8/src/radia}/radia_ngsolve_field.py +0 -0
- {radia-1.3.6/src/python → radia-1.3.8/src/radia}/radia_ngsolve_utils.py +0 -0
- {radia-1.3.6/src/python → radia-1.3.8/src/radia}/radia_pyvista_viewer.py +0 -0
- {radia-1.3.6/src/python → radia-1.3.8/src/radia}/radia_vtk_export.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/src/radia.egg-info/dependency_links.txt +0 -0
- {radia-1.3.6 → radia-1.3.8}/src/radia.egg-info/not-zip-safe +0 -0
- {radia-1.3.6 → radia-1.3.8}/src/radia.egg-info/requires.txt +0 -0
- {radia-1.3.6 → radia-1.3.8}/tests/README.md +0 -0
- {radia-1.3.6 → radia-1.3.8}/tests/__init__.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/tests/benchmarks/benchmark_correct.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/tests/benchmarks/benchmark_heavy.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/tests/benchmarks/benchmark_openmp.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/tests/benchmarks/benchmark_threads.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/tests/conftest.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/tests/profile_batch_performance.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/tests/test_advanced.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/tests/test_all_spaces.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/tests/test_background_field_debug.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/tests/test_batch_evaluation.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/tests/test_cf_direct.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/tests/test_convergence_hdiv.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/tests/test_curlA_equals_B.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/tests/test_curl_A_detailed.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/tests/test_far_field_accuracy.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/tests/test_fast_preparecache.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/tests/test_fast_simple.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/tests/test_group_operations.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/tests/test_hcurl_vs_hdiv.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/tests/test_l2_norm_debug.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/tests/test_magpylib_comparison.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/tests/test_materials.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/tests/test_memory_allocation_tracking.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/tests/test_minimal_cached.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/tests/test_moving_magnet_memory.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/tests/test_moving_magnet_memory_diagnosis.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/tests/test_new_material_api.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/tests/test_objbckg_simple.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/tests/test_objbckgcf_alone.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/tests/test_order1.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/tests/test_parallel_performance.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/tests/test_preparecache_performance.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/tests/test_process_memory.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/tests/test_python_cached_field.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/tests/test_python_cached_simple.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/tests/test_rad_ngsolve.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/tests/test_rad_ngsolve_diagnostic.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/tests/test_rad_ngsolve_function.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/tests/test_radhmat.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/tests/test_radia.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/tests/test_radia_core_memory.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/tests/test_radia_field_computation_memory.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/tests/test_radia_ngsolve_longrun.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/tests/test_radia_ngsolve_memory_leak.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/tests/test_radia_ngsolve_with_cache.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/tests/test_radia_only_memory.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/tests/test_serialization.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/tests/test_set_vs_interpolate.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/tests/test_simple.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/tests/test_simple_fld_leak.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/tests/test_square_coil_analytical.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/tests/test_tetrahedral_solver.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/tests/test_transformations.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/tests/test_type_cast.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/tests/test_unit_conversion_verify.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/tests/test_utils.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/tests/test_vector_potential.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/tests/test_without_B_projection.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/tests/test_without_gridfunction.py +0 -0
- {radia-1.3.6 → radia-1.3.8}/tests/verify_curl_A_equals_B.py +0 -0
|
@@ -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
|
-
| **
|
|
10
|
-
| **
|
|
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
|
|
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')
|
|
38
|
-
res = rad.Solve(grp, 0.0001, 1000, '
|
|
39
|
-
res = rad.Solve(grp, 0.0001, 1000, '
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
res = rad.Solve(grp, 0.0001,
|
|
44
|
-
res = rad.Solve(grp, 0.0001, 1000,
|
|
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:**
|
|
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
|
-
##
|
|
61
|
+
## LU Direct Solver (Method 0)
|
|
66
62
|
|
|
67
|
-
|
|
63
|
+
Direct solver using LU decomposition with partial pivoting. O(N^3) complexity per nonlinear iteration.
|
|
68
64
|
|
|
69
65
|
**Pros:**
|
|
70
|
-
-
|
|
71
|
-
-
|
|
72
|
-
-
|
|
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
|
-
-
|
|
76
|
-
-
|
|
72
|
+
- O(N^3) time complexity - slow for large N
|
|
73
|
+
- O(N^2) memory usage
|
|
77
74
|
|
|
78
|
-
**Best for:**
|
|
75
|
+
**Best for:** Small problems (N < 500), validation/debugging
|
|
79
76
|
|
|
80
77
|
```python
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
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
|
-
|
|
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)
|
|
113
|
-
res = rad.Solve(grp, 0.0001, 1000, 'bicgstab') #
|
|
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
|
|
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 |
|
|
184
|
-
|
|
|
185
|
-
|
|
|
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. **
|
|
190
|
-
2. **
|
|
191
|
-
3. **
|
|
192
|
-
4. **
|
|
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
|
-
|
|
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
|
-
-
|
|
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
|
-
|
|
191
|
+
If you were using method numbers 8, 9, or 10:
|
|
214
192
|
|
|
215
|
-
|
|
|
216
|
-
|
|
217
|
-
|
|
|
218
|
-
|
|
|
219
|
-
|
|
|
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
|
-
|
|
199
|
+
**Recommended:** Use string names (`'lu'`, `'bicgstab'`, `'direct'`, `'iterative'`) for clarity.
|
|
@@ -16,7 +16,7 @@ import shutil
|
|
|
16
16
|
import sys
|
|
17
17
|
|
|
18
18
|
# Read version from pyproject.toml
|
|
19
|
-
version = "1.3.
|
|
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" / "
|
|
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
|
-
"
|
|
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
|
|
@@ -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/
|
|
114
|
-
src/
|
|
115
|
-
src/
|
|
116
|
-
src/
|
|
117
|
-
src/
|
|
118
|
-
src/
|
|
119
|
-
src/
|
|
120
|
-
src/
|
|
121
|
-
src/
|
|
122
|
-
src/
|
|
123
|
-
src/
|
|
124
|
-
src/
|
|
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
|
radia-1.3.6/src/python/radia.pyd
DELETED
|
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
|
|
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
|
{radia-1.3.6 → radia-1.3.8}/examples/cube_uniform_field/linear/benchmark_mesh_convergence.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{radia-1.3.6 → radia-1.3.8}/examples/cube_uniform_field/linear/benchmark_tetra_vs_ngsolve.py
RENAMED
|
File without changes
|
|
File without changes
|
{radia-1.3.6 → radia-1.3.8}/examples/cube_uniform_field/linear/cube_benchmark_external_field.py
RENAMED
|
File without changes
|
|
File without changes
|
{radia-1.3.6 → radia-1.3.8}/examples/cube_uniform_field/linear/evaluate_perturbation_field.py
RENAMED
|
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
|
{radia-1.3.6 → radia-1.3.8}/examples/ngsolve_integration/mesh_magnetization_import/README.md
RENAMED
|
File without changes
|
|
File without changes
|
{radia-1.3.6 → radia-1.3.8}/examples/ngsolve_integration/mesh_magnetization_import/cube_hex.vtk
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
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
|