struphy 3.2.0__tar.gz → 3.4.0__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 (477) hide show
  1. {struphy-3.2.0/src/struphy.egg-info → struphy-3.4.0}/PKG-INFO +31 -17
  2. {struphy-3.2.0 → struphy-3.4.0}/README.md +2 -0
  3. {struphy-3.2.0 → struphy-3.4.0}/pyproject.toml +35 -18
  4. struphy-3.4.0/src/struphy/__init__.py +253 -0
  5. struphy-3.4.0/src/struphy/api/compiler/__init__.py +3 -0
  6. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/api/options/__init__.py +3 -0
  7. struphy-3.4.0/src/struphy/api/post_processing/__init__.py +3 -0
  8. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/bsplines/bsplines.py +2 -2
  9. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/compile_struphy.mk +2 -3
  10. struphy-3.4.0/src/struphy/console/compile.py +365 -0
  11. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/console/format.py +239 -107
  12. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/console/main.py +85 -27
  13. struphy-3.4.0/src/struphy/console/output.py +47 -0
  14. struphy-3.4.0/src/struphy/console/params.py +69 -0
  15. struphy-3.4.0/src/struphy/console/profile.py +91 -0
  16. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/console/test.py +4 -1
  17. struphy-3.4.0/src/struphy/console/tests/test_compile.py +214 -0
  18. struphy-3.4.0/src/struphy/console/tests/test_format.py +38 -0
  19. struphy-3.4.0/src/struphy/console/tests/test_params_profile.py +61 -0
  20. struphy-3.4.0/src/struphy/console/tests/test_state.py +22 -0
  21. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/console/tests/xx_test_console.py +2 -2
  22. struphy-3.4.0/src/struphy/dependencies.py +135 -0
  23. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/dispersion_relations/analytic.py +38 -26
  24. struphy-3.4.0/src/struphy/dispersion_relations/tests/test_analytic.py +80 -0
  25. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/feec/basis_projection_ops.py +38 -37
  26. struphy-3.4.0/src/struphy/feec/boundary_mass.py +588 -0
  27. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/feec/linear_operators.py +2 -0
  28. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/feec/mass.py +544 -275
  29. struphy-3.4.0/src/struphy/feec/mass_kernels.py +1270 -0
  30. struphy-3.4.0/src/struphy/feec/memory.py +70 -0
  31. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/feec/preconditioner.py +45 -47
  32. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/feec/projectors.py +6 -5
  33. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/feec/psydac_derham.py +112 -30
  34. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/feec/tests/test_basis_ops.py +126 -1
  35. struphy-3.4.0/src/struphy/feec/tests/test_boundary_integrals.py +372 -0
  36. struphy-3.4.0/src/struphy/feec/tests/test_estimate_mem.py +92 -0
  37. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/feec/tests/test_eval_field.py +40 -0
  38. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/feec/tests/test_field_init.py +68 -2
  39. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/feec/tests/test_l2_projectors.py +54 -5
  40. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/feec/tests/test_local_projectors.py +91 -0
  41. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/feec/tests/test_mass_matrices.py +458 -41
  42. struphy-3.4.0/src/struphy/feec/tests/test_mass_reassembly.py +41 -0
  43. struphy-3.4.0/src/struphy/feec/tests/test_preconditioner_transpose.py +59 -0
  44. struphy-3.4.0/src/struphy/feec/tests/test_utilities_kernels.py +41 -0
  45. struphy-3.4.0/src/struphy/feec/tests/test_variational_utilities.py +52 -0
  46. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/feec/utilities.py +19 -6
  47. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/feec/utilities_kernels.py +7 -3
  48. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/feec/utilities_local_projectors.py +2 -2
  49. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/feec/variational_utilities.py +14 -0
  50. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/fields_background/base.py +54 -3
  51. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/fields_background/coil_fields/coil_fields.py +1 -1
  52. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/fields_background/equils.py +333 -411
  53. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/fields_background/projected_equils.py +18 -5
  54. struphy-3.4.0/src/struphy/fields_background/tests/test_adhoc_tokamak_equils.py +45 -0
  55. struphy-3.4.0/src/struphy/fields_background/tests/test_axisymm_gradB.py +36 -0
  56. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/fields_background/tests/test_generic_equils.py +15 -1
  57. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/fields_background/tests/test_mhd_equils.py +89 -0
  58. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/geometry/base.py +306 -76
  59. struphy-3.4.0/src/struphy/geometry/domains/__init__.py +76 -0
  60. struphy-3.4.0/src/struphy/geometry/domains/colella/__init__.py +18 -0
  61. struphy-3.4.0/src/struphy/geometry/domains/colella/colella.py +51 -0
  62. struphy-3.4.0/src/struphy/geometry/domains/colella/colella_kernels.py +58 -0
  63. struphy-3.4.0/src/struphy/geometry/domains/cuboid/__init__.py +18 -0
  64. struphy-3.4.0/src/struphy/geometry/domains/cuboid/cuboid.py +57 -0
  65. struphy-3.4.0/src/struphy/geometry/domains/cuboid/cuboid_kernels.py +63 -0
  66. struphy-3.4.0/src/struphy/geometry/domains/desc_unit/__init__.py +18 -0
  67. struphy-3.4.0/src/struphy/geometry/domains/desc_unit/desc_unit.py +50 -0
  68. struphy-3.4.0/src/struphy/geometry/domains/gvec_unit/__init__.py +18 -0
  69. struphy-3.4.0/src/struphy/geometry/domains/gvec_unit/gvec_unit.py +64 -0
  70. struphy-3.4.0/src/struphy/geometry/domains/hollow_cylinder/__init__.py +18 -0
  71. struphy-3.4.0/src/struphy/geometry/domains/hollow_cylinder/hollow_cylinder.py +55 -0
  72. struphy-3.4.0/src/struphy/geometry/domains/hollow_cylinder/hollow_cylinder_kernels.py +61 -0
  73. struphy-3.4.0/src/struphy/geometry/domains/hollow_torus/__init__.py +18 -0
  74. struphy-3.4.0/src/struphy/geometry/domains/hollow_torus/hollow_torus.py +114 -0
  75. struphy-3.4.0/src/struphy/geometry/domains/hollow_torus/hollow_torus_kernels.py +160 -0
  76. struphy-3.4.0/src/struphy/geometry/domains/iga_polar_cylinder/__init__.py +18 -0
  77. struphy-3.4.0/src/struphy/geometry/domains/iga_polar_cylinder/iga_polar_cylinder.py +62 -0
  78. struphy-3.4.0/src/struphy/geometry/domains/iga_polar_torus/__init__.py +18 -0
  79. struphy-3.4.0/src/struphy/geometry/domains/iga_polar_torus/iga_polar_torus.py +86 -0
  80. struphy-3.4.0/src/struphy/geometry/domains/orthogonal/__init__.py +18 -0
  81. struphy-3.4.0/src/struphy/geometry/domains/orthogonal/orthogonal.py +51 -0
  82. struphy-3.4.0/src/struphy/geometry/domains/orthogonal/orthogonal_kernels.py +58 -0
  83. struphy-3.4.0/src/struphy/geometry/domains/powered_elliptic_cylinder/__init__.py +18 -0
  84. struphy-3.4.0/src/struphy/geometry/domains/powered_elliptic_cylinder/powered_elliptic_cylinder.py +51 -0
  85. struphy-3.4.0/src/struphy/geometry/domains/powered_elliptic_cylinder/powered_elliptic_cylinder_kernels.py +72 -0
  86. struphy-3.4.0/src/struphy/geometry/domains/shafranov_dshaped_cylinder/__init__.py +20 -0
  87. struphy-3.4.0/src/struphy/geometry/domains/shafranov_dshaped_cylinder/shafranov_dshaped_cylinder.py +60 -0
  88. struphy-3.4.0/src/struphy/geometry/domains/shafranov_dshaped_cylinder/shafranov_dshaped_cylinder_kernels.py +101 -0
  89. struphy-3.4.0/src/struphy/geometry/domains/shafranov_shift_cylinder/__init__.py +18 -0
  90. struphy-3.4.0/src/struphy/geometry/domains/shafranov_shift_cylinder/shafranov_shift_cylinder.py +51 -0
  91. struphy-3.4.0/src/struphy/geometry/domains/shafranov_shift_cylinder/shafranov_shift_cylinder_kernels.py +73 -0
  92. struphy-3.4.0/src/struphy/geometry/domains/shafranov_sqrt_cylinder/__init__.py +18 -0
  93. struphy-3.4.0/src/struphy/geometry/domains/shafranov_sqrt_cylinder/shafranov_sqrt_cylinder.py +51 -0
  94. struphy-3.4.0/src/struphy/geometry/domains/shafranov_sqrt_cylinder/shafranov_sqrt_cylinder_kernels.py +73 -0
  95. struphy-3.4.0/src/struphy/geometry/domains/tokamak/__init__.py +18 -0
  96. struphy-3.4.0/src/struphy/geometry/domains/tokamak/tokamak.py +126 -0
  97. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/geometry/evaluation_kernels.py +34 -25
  98. struphy-3.4.0/src/struphy/geometry/spline_mappings_kernels.py +485 -0
  99. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/geometry/tests/test_domain.py +197 -0
  100. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/geometry/transform_kernels.py +38 -1
  101. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/geometry/utilities.py +12 -11
  102. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/initial/base.py +47 -0
  103. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/initial/eigenfunctions.py +2 -2
  104. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/initial/perturbations.py +477 -386
  105. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/initial/tests/test_init_perturbations.py +48 -0
  106. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/io/options.py +24 -9
  107. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/io/output_handling.py +46 -32
  108. struphy-3.4.0/src/struphy/io/tests/test_output_handling.py +51 -0
  109. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/kernel_arguments/pusher_args_kernels.py +21 -12
  110. struphy-3.4.0/src/struphy/kinetic_background/base.py +1031 -0
  111. struphy-3.4.0/src/struphy/kinetic_background/maxwellians.py +863 -0
  112. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/kinetic_background/moment_functions.py +1 -1
  113. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/kinetic_background/tests/test_base.py +45 -26
  114. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/kinetic_background/tests/test_maxwellians.py +261 -208
  115. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/linear_algebra/linalg_kron.py +8 -2
  116. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/linear_algebra/saddle_point.py +43 -29
  117. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/linear_algebra/schur_solver.py +4 -0
  118. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/linear_algebra/tests/test_saddlepoint_massmatrices.py +42 -0
  119. struphy-3.4.0/src/struphy/models/__init__.py +138 -0
  120. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/models/base.py +332 -60
  121. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/models/cold_plasma.py +17 -39
  122. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/models/cold_plasma_vlasov.py +74 -111
  123. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/models/deterministic_particle_diffusion.py +8 -29
  124. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/models/drift_kinetic_electrostatic_adiabatic.py +68 -58
  125. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/models/guiding_center.py +25 -48
  126. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/models/hasegawa_wakatani.py +38 -76
  127. struphy-3.4.0/src/struphy/models/incompressible_navier_stokes_sph.py +277 -0
  128. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/models/linear_extended_mh_duniform.py +81 -105
  129. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/models/linear_mhd.py +16 -27
  130. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/models/linear_mhd_driftkinetic_cc.py +63 -171
  131. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/models/linear_mhd_vlasov_cc.py +58 -107
  132. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/models/linear_mhd_vlasov_pc.py +39 -105
  133. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/models/linear_vlasov_ampere_one_species.py +115 -171
  134. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/models/linear_vlasov_maxwell_one_species.py +40 -77
  135. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/models/maxwell.py +1 -5
  136. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/models/poisson.py +38 -40
  137. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/models/pressure_less_sph.py +31 -34
  138. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/models/random_particle_diffusion.py +8 -28
  139. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/models/scalars.py +41 -21
  140. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/models/shear_alfven.py +59 -77
  141. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/models/species.py +39 -1
  142. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/models/tests/default_params/test_models.py +16 -0
  143. struphy-3.4.0/src/struphy/models/tests/test_estimate_mem.py +114 -0
  144. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/models/tests/test_examples.py +6 -1
  145. struphy-3.4.0/src/struphy/models/tests/test_hasegawa_wakatani.py +8 -0
  146. struphy-3.4.0/src/struphy/models/tests/test_scalars.py +219 -0
  147. struphy-3.4.0/src/struphy/models/tests/test_variational_dissipation.py +48 -0
  148. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/models/tests/utils_testing.py +53 -14
  149. struphy-3.4.0/src/struphy/models/tests/verification/test_verif_IncompressibleNavierStokesSPH.py +483 -0
  150. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/models/tests/verification/test_verif_LinearMHD.py +43 -46
  151. struphy-3.4.0/src/struphy/models/tests/verification/test_verif_LinearVlasovAmpereOneSpecies.py +212 -0
  152. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/models/tests/verification/test_verif_Maxwell.py +58 -44
  153. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/models/tests/verification/test_verif_Poisson.py +9 -16
  154. struphy-3.4.0/src/struphy/models/tests/verification/test_verif_ViscousEulerSPH.py +1039 -0
  155. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/models/tests/verification/test_verif_VlasovAmpereOneSpecies.py +5 -1
  156. struphy-3.4.0/src/struphy/models/tests/verification/test_verif_VlasovMaxwellOneSpecies.py +106 -0
  157. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/models/toy_drift.py +27 -39
  158. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/models/two_fluid_quasi_neutral_toy.py +40 -56
  159. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/models/variables.py +172 -4
  160. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/models/variational_barotropic_fluid.py +31 -51
  161. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/models/variational_compressible_fluid.py +77 -105
  162. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/models/variational_pressureless_fluid.py +31 -49
  163. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/models/visco_resistive_deltaf_mhd.py +80 -108
  164. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/models/visco_resistive_deltaf_mhd_with_q.py +84 -120
  165. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/models/visco_resistive_linear_mhd.py +84 -116
  166. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/models/visco_resistive_linear_mhd_with_q.py +84 -119
  167. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/models/visco_resistive_mhd.py +91 -129
  168. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/models/visco_resistive_mhd_with_p.py +80 -95
  169. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/models/visco_resistive_mhd_with_q.py +73 -103
  170. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/models/viscous_euler_sph.py +47 -35
  171. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/models/viscous_fluid.py +89 -87
  172. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/models/vlasov.py +13 -25
  173. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/models/vlasov_ampere_one_species.py +67 -81
  174. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/models/vlasov_maxwell_one_species.py +127 -116
  175. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/ode/solvers.py +2 -0
  176. struphy-3.4.0/src/struphy/ode/tests/test_butcher.py +48 -0
  177. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/ode/utils.py +24 -1
  178. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/particles/parameters.py +11 -7
  179. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/physics/physics.py +1 -1
  180. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/pic/accumulation/accum_kernels.py +46 -321
  181. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/pic/accumulation/accum_kernels_gc.py +52 -94
  182. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/pic/accumulation/filler_kernels.py +0 -60
  183. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/pic/accumulation/filter.py +3 -4
  184. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/pic/accumulation/particle_to_mat_kernels.py +0 -61
  185. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/pic/accumulation/particles_to_grid.py +197 -127
  186. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/pic/base.py +2569 -2386
  187. struphy-3.4.0/src/struphy/pic/particles.py +996 -0
  188. struphy-3.4.0/src/struphy/pic/pushing/eval_kernels_gc.py +460 -0
  189. struphy-3.4.0/src/struphy/pic/pushing/eval_kernels_sph.py +567 -0
  190. struphy-3.4.0/src/struphy/pic/pushing/kernel_setup.py +82 -0
  191. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/pic/pushing/pusher.py +128 -114
  192. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/pic/pushing/pusher_kernels.py +157 -1398
  193. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/pic/pushing/pusher_kernels_gc.py +60 -13
  194. struphy-3.4.0/src/struphy/pic/pushing/pusher_kernels_sph.py +670 -0
  195. struphy-3.4.0/src/struphy/pic/pushing/pusher_utilities_kernels.py +194 -0
  196. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/pic/sobol_seq.py +3 -2
  197. struphy-3.4.0/src/struphy/pic/sorting.py +397 -0
  198. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/pic/sph_eval_kernels.py +152 -112
  199. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/pic/sph_smoothing_kernels.py +10 -4
  200. struphy-3.4.0/src/struphy/pic/tests/_bench_push_vxb_analytic.py +92 -0
  201. struphy-3.4.0/src/struphy/pic/tests/bench_openmp_speedup.py +99 -0
  202. struphy-3.4.0/src/struphy/pic/tests/test_accum_gc_gradB.py +78 -0
  203. struphy-3.4.0/src/struphy/pic/tests/test_accum_pressure_coupling.py +70 -0
  204. struphy-3.4.0/src/struphy/pic/tests/test_accum_vec_H1.py +624 -0
  205. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/pic/tests/test_binning.py +82 -32
  206. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/pic/tests/test_draw_parallel.py +49 -0
  207. struphy-3.4.0/src/struphy/pic/tests/test_estimate_mem.py +110 -0
  208. struphy-3.4.0/src/struphy/pic/tests/test_gc_epsilon.py +13 -0
  209. struphy-3.4.0/src/struphy/pic/tests/test_kernel_backends.py +406 -0
  210. struphy-3.4.0/src/struphy/pic/tests/test_kernel_setup.py +280 -0
  211. struphy-3.4.0/src/struphy/pic/tests/test_load_external.py +43 -0
  212. struphy-3.4.0/src/struphy/pic/tests/test_neighbor_ranks.py +138 -0
  213. struphy-3.4.0/src/struphy/pic/tests/test_pusher_openmp_speedup.py +100 -0
  214. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/pic/tests/test_pushers.py +118 -11
  215. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/pic/tests/test_set_zero_velocity.py +1 -0
  216. struphy-3.4.0/src/struphy/pic/tests/test_show_distribution.py +76 -0
  217. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/pic/tests/test_sorting.py +51 -6
  218. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/pic/tests/test_sph.py +200 -3
  219. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/pic/tests/test_tesselation.py +4 -2
  220. struphy-3.4.0/src/struphy/pic/tests/test_utilities.py +45 -0
  221. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/pic/utilities.py +13 -15
  222. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/pic/utilities_kernels.py +39 -18
  223. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/polar/extraction_operators.py +0 -309
  224. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/polar/linear_operators.py +29 -25
  225. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/polar/tests/test_polar.py +94 -0
  226. struphy-3.4.0/src/struphy/post_processing/arrays.py +229 -0
  227. struphy-3.4.0/src/struphy/post_processing/manifest.py +102 -0
  228. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/post_processing/orbits/orbits_tools.py +29 -41
  229. struphy-3.4.0/src/struphy/post_processing/output.py +2645 -0
  230. struphy-3.4.0/src/struphy/post_processing/profiling.py +138 -0
  231. struphy-3.4.0/src/struphy/post_processing/si.py +65 -0
  232. struphy-3.4.0/src/struphy/post_processing/store.py +64 -0
  233. struphy-3.4.0/src/struphy/post_processing/tests/test_arrays.py +102 -0
  234. struphy-3.4.0/src/struphy/post_processing/tests/test_eval_grids.py +259 -0
  235. struphy-3.4.0/src/struphy/post_processing/tests/test_eval_grids_mpi.py +243 -0
  236. struphy-3.4.0/src/struphy/post_processing/tests/test_orbits_tools.py +56 -0
  237. struphy-3.4.0/src/struphy/post_processing/tests/test_output.py +888 -0
  238. struphy-3.4.0/src/struphy/post_processing/tests/test_pproc.py +102 -0
  239. struphy-3.4.0/src/struphy/propagators/__init__.py +156 -0
  240. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/propagators/adiabatic_phi.py +3 -1
  241. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/propagators/base.py +33 -98
  242. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/propagators/curl_curl_solve.py +49 -41
  243. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/propagators/current_coupling_5d_curlb.py +34 -28
  244. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/propagators/current_coupling_5d_density.py +34 -27
  245. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/propagators/current_coupling_5d_gradb.py +77 -51
  246. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/propagators/current_coupling_6d_current.py +17 -14
  247. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/propagators/current_coupling_6d_density.py +26 -21
  248. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/propagators/efield_weights_coupling.py +11 -7
  249. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/propagators/faraday_extended.py +11 -0
  250. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/propagators/hall.py +14 -9
  251. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/propagators/hasegawa_wakatani_step.py +24 -19
  252. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/propagators/implicit_diffusion.py +148 -49
  253. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/propagators/jxb_cold.py +3 -1
  254. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/propagators/magnetosonic.py +16 -11
  255. struphy-3.4.0/src/struphy/propagators/poisson_adiabatic_gyrokinetic.py +208 -0
  256. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/propagators/poisson_solve.py +32 -22
  257. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/propagators/pressure_coupling_6d.py +8 -6
  258. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/propagators/push_deterministic_diffusion.py +5 -8
  259. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/propagators/push_eta.py +5 -11
  260. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/propagators/push_eta_pc.py +16 -16
  261. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/propagators/push_guiding_center_bx_estar.py +150 -133
  262. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/propagators/push_guiding_center_parallel.py +154 -137
  263. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/propagators/push_random_diffusion.py +9 -10
  264. struphy-3.4.0/src/struphy/propagators/push_v_in_force_field.py +160 -0
  265. struphy-3.2.0/src/struphy/propagators/push_vin_sph_pressure.py → struphy-3.4.0/src/struphy/propagators/push_v_in_sph_pressure.py +46 -21
  266. struphy-3.2.0/src/struphy/propagators/push_vin_viscous_potential.py → struphy-3.4.0/src/struphy/propagators/push_v_in_viscous_potential.py +27 -15
  267. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/propagators/push_vxb.py +21 -20
  268. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/propagators/shear_alfven_current_coupling_5d.py +16 -9
  269. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/propagators/tests/test_curl_curl.py +50 -5
  270. struphy-3.4.0/src/struphy/propagators/tests/test_current_coupling_5d.py +61 -0
  271. struphy-3.4.0/src/struphy/propagators/tests/test_current_coupling_5d_options.py +31 -0
  272. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/propagators/tests/test_gyrokinetic_poisson.py +7 -14
  273. struphy-3.4.0/src/struphy/propagators/tests/test_magnetosonic.py +42 -0
  274. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/propagators/tests/test_poisson.py +142 -18
  275. struphy-3.4.0/src/struphy/propagators/tests/test_pressure_coupling_6d.py +31 -0
  276. struphy-3.4.0/src/struphy/propagators/tests/test_push_random_diffusion.py +50 -0
  277. struphy-3.4.0/src/struphy/propagators/tests/test_two_fluid_quasi_neutral_full.py +96 -0
  278. struphy-3.4.0/src/struphy/propagators/tests/test_variational_density_evolve.py +49 -0
  279. struphy-3.4.0/src/struphy/propagators/tests/test_variational_mag_field_evolve.py +99 -0
  280. struphy-3.4.0/src/struphy/propagators/tests/test_variational_qb_evolve.py +44 -0
  281. struphy-3.4.0/src/struphy/propagators/tests/test_variational_solver_option.py +49 -0
  282. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/propagators/two_fluid_quasi_neutral_full.py +9 -3
  283. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/propagators/variational_density_evolve.py +35 -20
  284. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/propagators/variational_entropy_evolve.py +11 -11
  285. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/propagators/variational_mag_field_evolve.py +2 -5
  286. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/propagators/variational_momentum_advection.py +14 -11
  287. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/propagators/variational_pb_evolve.py +32 -25
  288. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/propagators/variational_qb_evolve.py +34 -26
  289. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/propagators/variational_resistivity.py +31 -23
  290. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/propagators/variational_viscosity.py +25 -17
  291. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/propagators/vlasov_ampere_coupling.py +5 -4
  292. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/simulation/base.py +7 -9
  293. struphy-3.4.0/src/struphy/simulation/sim.py +2350 -0
  294. struphy-3.4.0/src/struphy/simulation/tests/test_estimate_mem.py +165 -0
  295. struphy-3.4.0/src/struphy/simulation/tests/test_output.py +477 -0
  296. struphy-3.4.0/src/struphy/simulation/tests/test_sim_comm_mpi.py +50 -0
  297. struphy-3.4.0/src/struphy/topology/__init__.py +0 -0
  298. struphy-3.4.0/src/struphy/utils/__init__.py +0 -0
  299. struphy-3.4.0/src/struphy/utils/compiler.py +250 -0
  300. struphy-3.4.0/src/struphy/utils/cuda_arguments.py +212 -0
  301. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/utils/docstring_converter.py +159 -0
  302. struphy-3.4.0/src/struphy/utils/ipython_compat.py +31 -0
  303. struphy-3.4.0/src/struphy/utils/kernel_backends.py +233 -0
  304. struphy-3.4.0/src/struphy/utils/progress.py +13 -0
  305. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/utils/utils.py +39 -9
  306. {struphy-3.2.0 → struphy-3.4.0/src/struphy.egg-info}/PKG-INFO +31 -17
  307. {struphy-3.2.0 → struphy-3.4.0}/src/struphy.egg-info/SOURCES.txt +121 -16
  308. struphy-3.4.0/src/struphy.egg-info/entry_points.txt +2 -0
  309. {struphy-3.2.0 → struphy-3.4.0}/src/struphy.egg-info/requires.txt +30 -16
  310. struphy-3.2.0/src/struphy/__init__.py +0 -156
  311. struphy-3.2.0/src/struphy/api/post_processing/__init__.py +0 -3
  312. struphy-3.2.0/src/struphy/console/compile.py +0 -308
  313. struphy-3.2.0/src/struphy/console/params.py +0 -49
  314. struphy-3.2.0/src/struphy/console/profile.py +0 -228
  315. struphy-3.2.0/src/struphy/dependencies.py +0 -96
  316. struphy-3.2.0/src/struphy/diagnostics/console_diagn.py +0 -411
  317. struphy-3.2.0/src/struphy/diagnostics/diagn_tools.py +0 -1088
  318. struphy-3.2.0/src/struphy/diagnostics/paraview/mesh_creator.py +0 -323
  319. struphy-3.2.0/src/struphy/diagnostics/paraview/vtk_writer.py +0 -88
  320. struphy-3.2.0/src/struphy/feec/mass_kernels.py +0 -768
  321. struphy-3.2.0/src/struphy/geometry/domains.py +0 -974
  322. struphy-3.2.0/src/struphy/geometry/mappings_kernels.py +0 -1166
  323. struphy-3.2.0/src/struphy/kinetic_background/base.py +0 -865
  324. struphy-3.2.0/src/struphy/kinetic_background/maxwellians.py +0 -729
  325. struphy-3.2.0/src/struphy/models/__init__.py +0 -79
  326. struphy-3.2.0/src/struphy/models/tests/verification/test_verif_ViscousEulerSPH.py +0 -165
  327. struphy-3.2.0/src/struphy/pic/particles.py +0 -707
  328. struphy-3.2.0/src/struphy/pic/pushing/eval_kernels_gc.py +0 -1022
  329. struphy-3.2.0/src/struphy/pic/pushing/pusher_utilities_kernels.py +0 -79
  330. struphy-3.2.0/src/struphy/pic/tests/test_accum_vec_H1.py +0 -206
  331. struphy-3.2.0/src/struphy/post_processing/cprofile_analyser.py +0 -190
  332. struphy-3.2.0/src/struphy/post_processing/likwid/plot_time_traces.py +0 -380
  333. struphy-3.2.0/src/struphy/post_processing/post_processing_tools.py +0 -1315
  334. struphy-3.2.0/src/struphy/post_processing/profile_struphy.py +0 -175
  335. struphy-3.2.0/src/struphy/propagators/__init__.py +0 -93
  336. struphy-3.2.0/src/struphy/propagators/push_vin_efield.py +0 -143
  337. struphy-3.2.0/src/struphy/simulation/sim.py +0 -1568
  338. struphy-3.2.0/src/struphy/utils/pyccel.py +0 -25
  339. struphy-3.2.0/src/struphy.egg-info/entry_points.txt +0 -3
  340. {struphy-3.2.0 → struphy-3.4.0}/LICENSE +0 -0
  341. {struphy-3.2.0 → struphy-3.4.0}/setup.cfg +0 -0
  342. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/api/__init__.py +0 -0
  343. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/api/domains/__init__.py +0 -0
  344. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/api/equils/__init__.py +0 -0
  345. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/api/grids/__init__.py +0 -0
  346. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/api/maxwellians/__init__.py +0 -0
  347. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/api/models/__init__.py +0 -0
  348. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/api/ode/__init__.py +0 -0
  349. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/api/particles/__init__.py +0 -0
  350. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/api/perturbations/__init__.py +0 -0
  351. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/api/simulation/__init__.py +0 -0
  352. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/bsplines/__init__.py +0 -0
  353. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/bsplines/bsplines_kernels.py +0 -0
  354. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/bsplines/evaluation_kernels_1d.py +0 -0
  355. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/bsplines/evaluation_kernels_2d.py +0 -0
  356. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/bsplines/evaluation_kernels_3d.py +0 -0
  357. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/bsplines/shapefunc_kernels.py +0 -0
  358. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/bsplines/tests/__init__.py +0 -0
  359. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/bsplines/tests/test_bsplines_kers.py +0 -0
  360. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/bsplines/tests/test_eval_spline_mpi.py +0 -0
  361. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/conftest.py +0 -0
  362. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/console/__init__.py +0 -0
  363. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/console/likwid.py +0 -0
  364. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/console/parsers.py +0 -0
  365. {struphy-3.2.0/src/struphy/diagnostics → struphy-3.4.0/src/struphy/diagnostics/tests}/__init__.py +0 -0
  366. {struphy-3.2.0/src/struphy/diagnostics/paraview → struphy-3.4.0/src/struphy/dispersion_relations}/__init__.py +0 -0
  367. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/dispersion_relations/base.py +0 -0
  368. {struphy-3.2.0/src/struphy/dispersion_relations → struphy-3.4.0/src/struphy/dispersion_relations/tests}/__init__.py +0 -0
  369. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/dispersion_relations/utilities.py +0 -0
  370. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/eigenvalue_solvers/derivatives.py +0 -0
  371. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/examples/_draw_parallel.py +0 -0
  372. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/examples/restelli2018/__init__.py +0 -0
  373. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/examples/restelli2018/callables.py +0 -0
  374. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/feec/__init__.py +0 -0
  375. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/feec/banded_to_stencil_kernels.py +0 -0
  376. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/feec/basis_projection_kernels.py +0 -0
  377. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/feec/local_projectors_kernels.py +0 -0
  378. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/feec/tests/__init__.py +0 -0
  379. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/feec/tests/test_derham.py +0 -0
  380. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/feec/tests/test_local_matrix_vector.py +0 -0
  381. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/feec/tests/test_lowdim_nel_is_1.py +0 -0
  382. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/feec/tests/test_toarray_struphy.py +0 -0
  383. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/feec/tests/test_tosparse_struphy.py +0 -0
  384. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/feec/tests/xx_test_preconds.py +0 -0
  385. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/fields_background/__init__.py +0 -0
  386. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/fields_background/coil_fields/__init__.py +0 -0
  387. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/fields_background/coil_fields/base.py +0 -0
  388. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/fields_background/mhd_equil/__init__.py +0 -0
  389. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/fields_background/mhd_equil/eqdsk/__init__.py +0 -0
  390. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/fields_background/mhd_equil/eqdsk/data/AUGNLED_g031213.00830.high +0 -0
  391. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/fields_background/mhd_equil/eqdsk/data/__init__.py +0 -0
  392. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/fields_background/mhd_equil/eqdsk/readeqdsk.py +0 -0
  393. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/fields_background/mhd_equil/gvec/__init__.py +0 -0
  394. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/fields_background/mhd_equil/gvec/output/__init__.py +0 -0
  395. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/fields_background/mhd_equil/gvec/output/vtk/__init__.py +0 -0
  396. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/fields_background/mhd_equil/gvec/run_01/CIRCTOK_State_0000_00000000.dat +0 -0
  397. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/fields_background/mhd_equil/gvec/run_01/CIRCTOK_State_0000_00001000.dat +0 -0
  398. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/fields_background/mhd_equil/gvec/run_01/parameter.ini +0 -0
  399. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/fields_background/mhd_equil/gvec/run_02/W7X_State_0000_00000000.dat +0 -0
  400. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/fields_background/mhd_equil/gvec/run_02/W7X_State_0000_00000100.dat +0 -0
  401. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/fields_background/mhd_equil/gvec/run_02/parameter-w7x.ini +0 -0
  402. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/fields_background/mhd_equil/gvec/run_03/NEO-SPITZER_State_0000_00000000.dat +0 -0
  403. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/fields_background/mhd_equil/gvec/run_03/NEO-SPITZER_State_0000_00003307.dat +0 -0
  404. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/fields_background/mhd_equil/gvec/run_03/Neo-spitzer-mirror23-well-opt-1-AR10-1.nc +0 -0
  405. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/fields_background/mhd_equil/gvec/run_03/parameter-fig8.ini +0 -0
  406. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/fields_background/mhd_equil/vmec/__init__.py +0 -0
  407. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/fields_background/tests/__init__.py +0 -0
  408. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/fields_background/tests/test_desc_equil.py +0 -0
  409. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/fields_background/tests/test_numerical_mhd_equil.py +0 -0
  410. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/geometry/__init__.py +0 -0
  411. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/geometry/map_coef/__init__.py +0 -0
  412. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/geometry/tests/__init__.py +0 -0
  413. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/geometry/utilities_kernels.py +0 -0
  414. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/initial/__init__.py +0 -0
  415. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/initial/tests/__init__.py +0 -0
  416. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/initial/utilities.py +0 -0
  417. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/io/__init__.py +0 -0
  418. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/io/setup.py +0 -0
  419. {struphy-3.2.0/src/struphy/kernel_arguments → struphy-3.4.0/src/struphy/io/tests}/__init__.py +0 -0
  420. {struphy-3.2.0/src/struphy/kinetic_background → struphy-3.4.0/src/struphy/kernel_arguments}/__init__.py +0 -0
  421. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/kernel_arguments/local_projectors_args_kernels.py +0 -0
  422. {struphy-3.2.0/src/struphy/kinetic_background/tests → struphy-3.4.0/src/struphy/kinetic_background}/__init__.py +0 -0
  423. {struphy-3.2.0/src/struphy/linear_algebra → struphy-3.4.0/src/struphy/kinetic_background/tests}/__init__.py +0 -0
  424. {struphy-3.2.0/src/struphy/linear_algebra/tests → struphy-3.4.0/src/struphy/linear_algebra}/__init__.py +0 -0
  425. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/linear_algebra/linalg_kernels.py +0 -0
  426. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/linear_algebra/solver.py +0 -0
  427. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/linear_algebra/stencil_dot_kernels.py +0 -0
  428. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/linear_algebra/stencil_transpose_kernels.py +0 -0
  429. {struphy-3.2.0/src/struphy/models → struphy-3.4.0/src/struphy/linear_algebra}/tests/__init__.py +0 -0
  430. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/linear_algebra/tests/test_saddle_point_propagator.py +0 -0
  431. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/linear_algebra/tests/test_stencil_dot_kers.py +0 -0
  432. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/linear_algebra/tests/test_stencil_transpose_kers.py +0 -0
  433. {struphy-3.2.0/src/struphy/models/tests/default_params → struphy-3.4.0/src/struphy/models/tests}/__init__.py +0 -0
  434. {struphy-3.2.0/src/struphy/models/tests/verification → struphy-3.4.0/src/struphy/models/tests/default_params}/__init__.py +0 -0
  435. {struphy-3.2.0/src/struphy/ode → struphy-3.4.0/src/struphy/models/tests/verification}/__init__.py +0 -0
  436. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/models/utils.py +0 -0
  437. {struphy-3.2.0/src/struphy/ode/tests → struphy-3.4.0/src/struphy/ode}/__init__.py +0 -0
  438. {struphy-3.2.0/src/struphy/particles → struphy-3.4.0/src/struphy/ode/tests}/__init__.py +0 -0
  439. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/ode/tests/test_ode_feec.py +0 -0
  440. {struphy-3.2.0/src/struphy/physics → struphy-3.4.0/src/struphy/particles}/__init__.py +0 -0
  441. {struphy-3.2.0/src/struphy/pic → struphy-3.4.0/src/struphy/physics}/__init__.py +0 -0
  442. {struphy-3.2.0/src/struphy/pic/accumulation → struphy-3.4.0/src/struphy/pic}/__init__.py +0 -0
  443. {struphy-3.2.0/src/struphy/pic/pushing → struphy-3.4.0/src/struphy/pic/accumulation}/__init__.py +0 -0
  444. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/pic/accumulation/filter_kernels.py +0 -0
  445. {struphy-3.2.0/src/struphy/pic/tests → struphy-3.4.0/src/struphy/pic/pushing}/__init__.py +0 -0
  446. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/pic/sampling_kernels.py +0 -0
  447. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/pic/sorting_kernels.py +0 -0
  448. {struphy-3.2.0/src/struphy/polar → struphy-3.4.0/src/struphy/pic/tests}/__init__.py +0 -0
  449. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/pic/tests/test_mat_vec_filler.py +0 -0
  450. {struphy-3.2.0/src/struphy/polar/tests → struphy-3.4.0/src/struphy/polar}/__init__.py +0 -0
  451. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/polar/basic.py +0 -0
  452. {struphy-3.2.0/src/struphy/post_processing → struphy-3.4.0/src/struphy/polar/tests}/__init__.py +0 -0
  453. {struphy-3.2.0/src/struphy/post_processing/likwid → struphy-3.4.0/src/struphy/post_processing}/__init__.py +0 -0
  454. {struphy-3.2.0/src/struphy/post_processing/orbits → struphy-3.4.0/src/struphy/post_processing/likwid}/__init__.py +0 -0
  455. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/post_processing/likwid/hardware_dicts.py +0 -0
  456. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/post_processing/likwid/likwid_parser.py +0 -0
  457. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/post_processing/likwid/maxplotlylib.py +0 -0
  458. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/post_processing/likwid/plot_likwidproject.py +0 -0
  459. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/post_processing/likwid/roofline_plotter.py +0 -0
  460. {struphy-3.2.0/src/struphy/post_processing/tests → struphy-3.4.0/src/struphy/post_processing/orbits}/__init__.py +0 -0
  461. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/post_processing/orbits/orbits_kernels.py +0 -0
  462. {struphy-3.2.0/src/struphy/propagators → struphy-3.4.0/src/struphy/post_processing}/tests/__init__.py +0 -0
  463. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/propagators/magnetosonic_uniform.py +0 -0
  464. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/propagators/maxwell_weak_ampere.py +0 -0
  465. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/propagators/ohm_cold.py +0 -0
  466. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/propagators/shear_alfven_b1.py +0 -0
  467. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/propagators/shear_alfven_propagator.py +0 -0
  468. {struphy-3.2.0/src/struphy/simulation → struphy-3.4.0/src/struphy/propagators/tests}/__init__.py +0 -0
  469. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/propagators/time_dependent_source.py +0 -0
  470. {struphy-3.2.0/src/struphy/topology → struphy-3.4.0/src/struphy/simulation}/__init__.py +0 -0
  471. {struphy-3.2.0/src/struphy/utils → struphy-3.4.0/src/struphy/simulation/tests}/__init__.py +0 -0
  472. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/topology/grids.py +0 -0
  473. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/utils/clone_config.py +0 -0
  474. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/utils/cupy_vs_numpy.py +0 -0
  475. {struphy-3.2.0 → struphy-3.4.0}/src/struphy/utils/test_clone_config.py +0 -0
  476. {struphy-3.2.0 → struphy-3.4.0}/src/struphy.egg-info/dependency_links.txt +0 -0
  477. {struphy-3.2.0 → struphy-3.4.0}/src/struphy.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: struphy
3
- Version: 3.2.0
3
+ Version: 3.4.0
4
4
  Summary: Multi-model plasma physics package
5
5
  Author: Max Planck Institute for Plasma Physics
6
6
  Author-email: stefan.possanner@ipp.mpg.de, max.lindqvist@ipp.mpg.de, eric.sonnendruecker@ipp.mpg.de
@@ -30,38 +30,45 @@ Classifier: Programming Language :: Python :: 3
30
30
  Requires-Python: >=3.10
31
31
  Description-Content-Type: text/markdown
32
32
  License-File: LICENSE
33
- Requires-Dist: numpy<=2.4.3
34
- Requires-Dist: cunumpy<=0.1.1
33
+ Requires-Dist: numpy<=2.5.0
34
+ Requires-Dist: cunumpy<=0.2.0,>=0.2.0
35
35
  Requires-Dist: pyccel<=2.2.3,>=2.2.0
36
- Requires-Dist: feectools<=0.1.3
37
- Requires-Dist: scipy<=1.17.1
36
+ Requires-Dist: feectools<=0.1.11,>=0.1.11
37
+ Requires-Dist: scipy<=1.18.0
38
38
  Requires-Dist: h5py<=3.16.0
39
- Requires-Dist: matplotlib<=3.10.8
39
+ Requires-Dist: h5netcdf<=1.8.1
40
+ Requires-Dist: xarray<=2026.2.0
41
+ Requires-Dist: matplotlib<=3.11.0
40
42
  Requires-Dist: pyyaml<=6.0.3
41
- Requires-Dist: vtk<=9.6.1
42
- Requires-Dist: tqdm<=4.68.1
43
- Requires-Dist: argcomplete<=3.6.3
43
+ Requires-Dist: vtk<=9.7.0
44
+ Requires-Dist: tqdm<=4.70.0
45
+ Requires-Dist: argcomplete<=3.7.0
44
46
  Requires-Dist: ipywidgets<=8.1.8
45
- Requires-Dist: plotly<=6.8.0
46
- Requires-Dist: pyvista<=0.48.0
47
- Requires-Dist: trame<=3.13.0
47
+ Requires-Dist: plotly<=7.1.0
48
+ Requires-Dist: pyvista<=0.49.0
49
+ Requires-Dist: trame<=4.0.0
48
50
  Requires-Dist: trame-vtk<=2.11.8
49
51
  Requires-Dist: trame-vuetify<=3.2.2
50
52
  Requires-Dist: nest_asyncio2<=1.7.2
51
- Requires-Dist: vtk<=9.6.1
52
- Requires-Dist: pytest<=9.0.3
53
+ Requires-Dist: vtk<=9.7.0
54
+ Requires-Dist: pytest<=9.1.0
53
55
  Requires-Dist: pytest-mpi<=0.6
54
56
  Requires-Dist: pytest-testmon<=2.2.0
55
- Requires-Dist: ruff<=0.15.12,>=0.15.0
57
+ Requires-Dist: ruff<=0.16.0,==0.15.0
56
58
  Requires-Dist: line_profiler<=5.0.2
57
- Requires-Dist: scope-profiler<=0.1.9,>=0.1.7
59
+ Requires-Dist: scope-profiler<=0.7.2,>=0.5.0
58
60
  Provides-Extra: mpi
59
61
  Requires-Dist: mpi4py<=4.1.1; extra == "mpi"
62
+ Provides-Extra: gpu
63
+ Requires-Dist: cupy-cuda12x; extra == "gpu"
60
64
  Provides-Extra: phys
61
- Requires-Dist: gvec<=1.4.1,>=1.1.0; extra == "phys"
65
+ Requires-Dist: gvec<=1.5.0,>=1.1.0; extra == "phys"
62
66
  Requires-Dist: desc-opt<=0.17.1; extra == "phys"
67
+ Provides-Extra: pproc
68
+ Requires-Dist: plasma-plots>=0.1.0; extra == "pproc"
63
69
  Provides-Extra: dev
64
70
  Requires-Dist: struphy[mpi]; extra == "dev"
71
+ Requires-Dist: struphy[pproc]; extra == "dev"
65
72
  Requires-Dist: notebook; extra == "dev"
66
73
  Requires-Dist: autopep8; extra == "dev"
67
74
  Requires-Dist: isort; extra == "dev"
@@ -75,8 +82,11 @@ Requires-Dist: tabulate; extra == "dev"
75
82
  Requires-Dist: tomli-w; extra == "dev"
76
83
  Requires-Dist: kaleido; extra == "dev"
77
84
  Requires-Dist: pandas; extra == "dev"
85
+ Requires-Dist: scope-profiler[pproc]; extra == "dev"
86
+ Requires-Dist: slurm-script-generator>=0.3.6; extra == "dev"
78
87
  Provides-Extra: doc
79
88
  Requires-Dist: struphy[phys]; extra == "doc"
89
+ Requires-Dist: struphy[pproc]; extra == "doc"
80
90
  Requires-Dist: jupyter; extra == "doc"
81
91
  Requires-Dist: nbconvert; extra == "doc"
82
92
  Requires-Dist: ipykernel; extra == "doc"
@@ -92,11 +102,13 @@ Requires-Dist: m2r2; extra == "doc"
92
102
  Requires-Dist: myst-parser; extra == "doc"
93
103
  Requires-Dist: docutils; extra == "doc"
94
104
  Requires-Dist: ipyparallel; extra == "doc"
105
+ Requires-Dist: scope-profiler[pproc]; extra == "doc"
95
106
  Provides-Extra: likwid
96
107
  Requires-Dist: struphy[dev]; extra == "likwid"
97
108
  Requires-Dist: pylikwid; extra == "likwid"
98
109
  Provides-Extra: all
99
110
  Requires-Dist: struphy[phys]; extra == "all"
111
+ Requires-Dist: struphy[pproc]; extra == "all"
100
112
  Requires-Dist: struphy[dev]; extra == "all"
101
113
  Requires-Dist: struphy[mpi]; extra == "all"
102
114
  Requires-Dist: struphy[doc]; extra == "all"
@@ -155,6 +167,8 @@ This will create `params_Maxwell.py` in your current working directory (cwd). Yo
155
167
 
156
168
  The default output is in `sim_1/` in your cwd. You can change the output path via the class `EnvironmentOptions` in the parameter file.
157
169
 
170
+ For plots and diagnostics of the output, install [plasma-plots](https://struphy-hub.github.io/plasma-plots) with `pip install "struphy[pproc]"`; `Output` loads it automatically, adding `out.plot`, `out.analysis` and `.plasma.plot` on every product.
171
+
158
172
  Parallel simulations are run for example with
159
173
 
160
174
  pip install -U mpi4py
@@ -50,6 +50,8 @@ This will create `params_Maxwell.py` in your current working directory (cwd). Yo
50
50
 
51
51
  The default output is in `sim_1/` in your cwd. You can change the output path via the class `EnvironmentOptions` in the parameter file.
52
52
 
53
+ For plots and diagnostics of the output, install [plasma-plots](https://struphy-hub.github.io/plasma-plots) with `pip install "struphy[pproc]"`; `Output` loads it automatically, adding `out.plot`, `out.analysis` and `.plasma.plot` on every product.
54
+
53
55
  Parallel simulations are run for example with
54
56
 
55
57
  pip install -U mpi4py
@@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
6
6
 
7
7
  [project]
8
8
  name = "struphy"
9
- version = "3.2.0"
9
+ version = "3.4.0"
10
10
  readme = "README.md"
11
11
  requires-python = ">=3.10"
12
12
  authors = [
@@ -23,31 +23,33 @@ classifiers = [
23
23
  "Programming Language :: Python :: 3",
24
24
  ]
25
25
  dependencies = [
26
- "numpy<=2.4.3",
27
- "cunumpy<=0.1.1",
26
+ "numpy<=2.5.0",
27
+ "cunumpy>=0.2.0, <=0.2.0",
28
28
  "pyccel>=2.2.0, <=2.2.3",
29
- "feectools<=0.1.3",
30
- "scipy<=1.17.1",
29
+ "feectools >= 0.1.11, <=0.1.11",
30
+ "scipy<=1.18.0",
31
31
  "h5py<=3.16.0",
32
- "matplotlib<=3.10.8",
32
+ "h5netcdf<=1.8.1",
33
+ "xarray<=2026.2.0",
34
+ "matplotlib<=3.11.0",
33
35
  "pyyaml<=6.0.3",
34
- "vtk<=9.6.1",
35
- "tqdm<=4.68.1",
36
- "argcomplete<=3.6.3",
36
+ "vtk<=9.7.0",
37
+ "tqdm<=4.70.0",
38
+ "argcomplete<=3.7.0",
37
39
  "ipywidgets<=8.1.8",
38
- "plotly<=6.8.0",
39
- "pyvista<=0.48.0",
40
- "trame<=3.13.0",
40
+ "plotly<=7.1.0",
41
+ "pyvista<=0.49.0",
42
+ "trame<=4.0.0",
41
43
  "trame-vtk<=2.11.8",
42
44
  "trame-vuetify<=3.2.2",
43
45
  "nest_asyncio2<=1.7.2",
44
- "vtk<=9.6.1",
45
- "pytest<=9.0.3",
46
+ "vtk<=9.7.0",
47
+ "pytest<=9.1.0",
46
48
  "pytest-mpi<=0.6",
47
49
  "pytest-testmon<=2.2.0",
48
- "ruff>=0.15.0, <=0.15.12",
50
+ "ruff==0.15.0, <=0.16.0",
49
51
  "line_profiler<=5.0.2",
50
- "scope-profiler>=0.1.7, <=0.1.9",
52
+ "scope-profiler>=0.5.0, <=0.7.2",
51
53
  ]
52
54
 
53
55
  [project.license]
@@ -57,12 +59,19 @@ file = "LICENSE"
57
59
  mpi = [
58
60
  "mpi4py<=4.1.1",
59
61
  ]
62
+ gpu = [
63
+ "cupy-cuda12x",
64
+ ]
60
65
  phys = [
61
- "gvec>=1.1.0, <=1.4.1",
66
+ "gvec>=1.1.0, <=1.5.0",
62
67
  "desc-opt<=0.17.1",
63
68
  ]
69
+ pproc = [
70
+ "plasma-plots>=0.1.0",
71
+ ]
64
72
  dev = [
65
73
  "struphy[mpi]",
74
+ "struphy[pproc]",
66
75
  "notebook",
67
76
  "autopep8",
68
77
  "isort",
@@ -76,9 +85,12 @@ dev = [
76
85
  "tomli-w",
77
86
  "kaleido",
78
87
  "pandas",
88
+ "scope-profiler[pproc]",
89
+ "slurm-script-generator>=0.3.6",
79
90
  ]
80
91
  doc = [
81
92
  "struphy[phys]",
93
+ "struphy[pproc]",
82
94
  "jupyter",
83
95
  "nbconvert",
84
96
  "ipykernel",
@@ -94,6 +106,7 @@ doc = [
94
106
  "myst-parser",
95
107
  "docutils",
96
108
  "ipyparallel",
109
+ "scope-profiler[pproc]",
97
110
  ]
98
111
  likwid = [
99
112
  "struphy[dev]",
@@ -101,6 +114,7 @@ likwid = [
101
114
  ]
102
115
  all = [
103
116
  "struphy[phys]",
117
+ "struphy[pproc]",
104
118
  "struphy[dev]",
105
119
  "struphy[mpi]",
106
120
  "struphy[doc]",
@@ -116,7 +130,6 @@ changelog = "https://github.com/struphy-hub/struphy/blob/devel/CHANGELOG.md"
116
130
 
117
131
  [project.scripts]
118
132
  struphy = "struphy.console.main:struphy"
119
- kinetic-diagnostics = "struphy.diagnostics.console_diagn:main"
120
133
 
121
134
  [tool.setuptools.package-data]
122
135
  "struphy.fields_background.mhd_equil.eqdsk" = [
@@ -133,6 +146,8 @@ kinetic-diagnostics = "struphy.diagnostics.console_diagn:main"
133
146
  ]
134
147
  struphy = [
135
148
  "compile_struphy.mk",
149
+ "**/*.cu",
150
+ "**/*.cuh",
136
151
  ]
137
152
 
138
153
  [tool.autopep8]
@@ -176,5 +191,7 @@ markers = [
176
191
  "fluid",
177
192
  "kinetic",
178
193
  "hybrid",
194
+ "toy",
179
195
  "single",
196
+ "mpi_pic",
180
197
  ]
@@ -0,0 +1,253 @@
1
+ # Logging parameters and filters
2
+ import atexit
3
+ import logging
4
+ import logging.config
5
+ import os
6
+ from typing import TYPE_CHECKING
7
+
8
+ from feectools.ddm.mpi import launched_under_mpi
9
+
10
+
11
+ class RankZeroFilter(logging.Filter):
12
+ def __init__(self, rank: int):
13
+ super().__init__()
14
+ self.rank = rank
15
+
16
+ def filter(self, record):
17
+ return self.rank == 0
18
+
19
+
20
+ class BelowWarningFilter(logging.Filter):
21
+ """Let only DEBUG and INFO records pass (WARNING and above go to stderr)."""
22
+
23
+ def filter(self, record):
24
+ return record.levelno < logging.WARNING
25
+
26
+
27
+ # logger configuration
28
+ config = {
29
+ "version": 1,
30
+ "disable_existing_loggers": False,
31
+ "formatters": {
32
+ "simple": {"format": "%(message)s"},
33
+ "detailed": {
34
+ "format": "[%(levelname)s|%(module)s|L%(lineno)d] %(asctime)s: %(message)s",
35
+ "datefmt": "%Y-%m-%dT%H:%M:%S%z",
36
+ },
37
+ },
38
+ "filters": {
39
+ "below_warning": {"()": BelowWarningFilter},
40
+ },
41
+ "handlers": {
42
+ "stdout": {
43
+ "class": "logging.StreamHandler",
44
+ "level": "DEBUG",
45
+ "formatter": "simple",
46
+ "filters": ["below_warning"],
47
+ "stream": "ext://sys.stdout",
48
+ },
49
+ "stderr": {
50
+ "class": "logging.StreamHandler",
51
+ "level": "WARNING",
52
+ "formatter": "simple",
53
+ "stream": "ext://sys.stderr",
54
+ },
55
+ "file": {
56
+ "class": "logging.handlers.RotatingFileHandler",
57
+ "level": "DEBUG",
58
+ "formatter": "detailed",
59
+ # Overridable via STRUPHY_LOG_FILE so processes sharing a cwd (e.g. several
60
+ # profiling jobs launched from the same case directory) don't rotate the
61
+ # same file concurrently -- RotatingFileHandler's rollover isn't safe across
62
+ # separate OS processes and races with FileNotFoundError when they collide.
63
+ "filename": os.environ.get("STRUPHY_LOG_FILE", "struphy.log"),
64
+ "maxBytes": 10000,
65
+ "backupCount": 3,
66
+ },
67
+ },
68
+ "loggers": {"struphy": {"level": "WARNING", "handlers": ["stdout", "stderr", "file"]}},
69
+ }
70
+
71
+
72
+ def set_logging_level(level: int = logging.WARNING):
73
+ """Set logging level for struphy logger and its handlers.
74
+
75
+ Useful levels are:
76
+ * logging.DEBUG: for detailed debugging information.
77
+ * logging.INFO: for general informational messages about the simulation setup and progress, plus key events.
78
+ * logging.WARNING: for warnings about potential issues that do not stop the simulation.
79
+ * logging.ERROR: for errors that occur during the simulation, which may affect results but do not necessarily stop the simulation.
80
+ * logging.CRITICAL: for critical errors that likely cause the simulation to stop or produce invalid results.
81
+
82
+ Which handler a record ends up in is fixed by the configuration and not changed here:
83
+ DEBUG/INFO go to stdout, WARNING and above to stderr; records that pass the logger level are also written to the log file.
84
+ """
85
+ logger = logging.getLogger("struphy")
86
+ logger.setLevel(level)
87
+
88
+ logger.debug(
89
+ f"\nNew logger level: {logger.level}, effective: {logger.getEffectiveLevel()}, propagate: {logger.propagate}"
90
+ )
91
+ for h in logger.handlers:
92
+ logger.debug(f"{type(h).__name__}: handler level: {h.level}")
93
+
94
+
95
+ def setup_logging(logging_level: int = logging.WARNING):
96
+ """Setup logging configuration for struphy."""
97
+ logger = logging.getLogger("struphy")
98
+
99
+ log_path = config["handlers"]["file"]["filename"]
100
+ os.makedirs(os.path.dirname(log_path) or ".", exist_ok=True)
101
+
102
+ logging.config.dictConfig(config)
103
+
104
+ set_logging_level(logging_level)
105
+
106
+ # Add RankZeroFilter to all handlers
107
+ # This helper function figures out whether
108
+ # the current process is launched with mpirun
109
+ # or not without importing mpi4py, which would initialize MPI
110
+ # and cause issues if imported prematurely.
111
+ # Instead, it checks for the presence of certain environment
112
+ # variables that are typically set by MPI launchers (like mpirun or mpiexec).
113
+ if not launched_under_mpi():
114
+ rank = 0
115
+ # Serial run: tell feectools not to import mpi4py (which initializes MPI and takes
116
+ # ~1 s) and use its MockMPI instead. This is an in-process flag, deliberately not an
117
+ # environment variable, so that it is not inherited by ``mpirun`` subprocesses.
118
+ # It only has an effect if feectools.ddm.mpi has not been imported yet.
119
+ import feectools
120
+
121
+ feectools.use_mpi = False
122
+ else:
123
+ # deferred: importing feectools (and thereby mpi4py) is expensive
124
+ from feectools.ddm.mpi import mpi as MPI
125
+
126
+ rank = MPI.COMM_WORLD.Get_rank()
127
+ rank_filter = RankZeroFilter(rank)
128
+
129
+ # Apply filter to struphy logger handlers
130
+ for handler in logger.handlers:
131
+ handler.addFilter(rank_filter)
132
+
133
+ # Apply filter to root logger handlers
134
+ root_logger = logging.getLogger()
135
+ for handler in root_logger.handlers:
136
+ handler.addFilter(rank_filter)
137
+
138
+ # Start queue handler listener if present
139
+ queue_handler = None
140
+ for handler in logger.handlers:
141
+ if hasattr(handler, "listener"):
142
+ queue_handler = handler
143
+ break
144
+ if queue_handler is not None:
145
+ queue_handler.listener.start()
146
+ atexit.register(queue_handler.listener.stop)
147
+
148
+
149
+ # Default logging setup
150
+ logger = logging.getLogger("struphy")
151
+ setup_logging(logging_level=logging.WARNING)
152
+ logger.info(f"Logging setup complete, log-file at {config['handlers']['file']['filename']}")
153
+
154
+ # Public API components.
155
+ #
156
+ # They are resolved lazily (PEP 562): ``import struphy`` stays cheap, and
157
+ # ``from struphy import X`` only imports the module that actually provides ``X``.
158
+ # Importing everything eagerly pulled in the whole package (geometry, models,
159
+ # post-processing, feectools, ...), costing several seconds.
160
+ _LAZY_API = {
161
+ "Compiler": "struphy.api.compiler",
162
+ "domains": "struphy.api.domains",
163
+ "equils": "struphy.api.equils",
164
+ "grids": "struphy.api.grids",
165
+ "maxwellians": "struphy.api.maxwellians",
166
+ "ButcherTableau": "struphy.api.ode",
167
+ "BaseUnits": "struphy.api.options",
168
+ "DerhamOptions": "struphy.api.options",
169
+ "EnvironmentOptions": "struphy.api.options",
170
+ "FieldsBackground": "struphy.api.options",
171
+ "ProfilingOptions": "struphy.api.options",
172
+ "Time": "struphy.api.options",
173
+ "BinningPlot": "struphy.api.particles",
174
+ "BoundaryParameters": "struphy.api.particles",
175
+ "KernelDensityPlot": "struphy.api.particles",
176
+ "LoadingParameters": "struphy.api.particles",
177
+ "SavingParameters": "struphy.api.particles",
178
+ "SortingParameters": "struphy.api.particles",
179
+ "WeightsParameters": "struphy.api.particles",
180
+ "perturbations": "struphy.api.perturbations",
181
+ "Output": "struphy.api.post_processing",
182
+ "open_output": "struphy.api.post_processing",
183
+ "Simulation": "struphy.api.simulation",
184
+ }
185
+
186
+ if TYPE_CHECKING: # static analysis and IDEs see the eager imports
187
+ from struphy.api.compiler import Compiler
188
+ from struphy.api.domains import domains
189
+ from struphy.api.equils import equils
190
+ from struphy.api.grids import grids
191
+ from struphy.api.maxwellians import maxwellians
192
+ from struphy.api.ode import ButcherTableau
193
+ from struphy.api.options import (
194
+ BaseUnits,
195
+ DerhamOptions,
196
+ EnvironmentOptions,
197
+ FieldsBackground,
198
+ ProfilingOptions,
199
+ Time,
200
+ )
201
+ from struphy.api.particles import (
202
+ BinningPlot,
203
+ BoundaryParameters,
204
+ KernelDensityPlot,
205
+ LoadingParameters,
206
+ SavingParameters,
207
+ SortingParameters,
208
+ WeightsParameters,
209
+ )
210
+ from struphy.api.perturbations import perturbations
211
+ from struphy.api.post_processing import Output, open_output
212
+ from struphy.api.simulation import Simulation
213
+
214
+ __all__ = [
215
+ "Compiler",
216
+ "domains",
217
+ "equils",
218
+ "grids",
219
+ "maxwellians",
220
+ "EnvironmentOptions",
221
+ "BaseUnits",
222
+ "Time",
223
+ "ProfilingOptions",
224
+ "perturbations",
225
+ "LoadingParameters",
226
+ "WeightsParameters",
227
+ "BoundaryParameters",
228
+ "SortingParameters",
229
+ "SavingParameters",
230
+ "BinningPlot",
231
+ "KernelDensityPlot",
232
+ "DerhamOptions",
233
+ "FieldsBackground",
234
+ "ButcherTableau",
235
+ "Output",
236
+ "open_output",
237
+ "Simulation",
238
+ ]
239
+
240
+
241
+ def __getattr__(name: str):
242
+ module_name = _LAZY_API.get(name)
243
+ if module_name is None:
244
+ raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
245
+ import importlib
246
+
247
+ value = getattr(importlib.import_module(module_name), name)
248
+ globals()[name] = value # cache: later lookups bypass __getattr__
249
+ return value
250
+
251
+
252
+ def __dir__():
253
+ return sorted(set(globals()) | set(_LAZY_API))
@@ -0,0 +1,3 @@
1
+ from struphy.utils.compiler import Compiler
2
+
3
+ __all__ = ["Compiler"]
@@ -1,3 +1,5 @@
1
+ from scope_profiler import ProfilingOptions
2
+
1
3
  from struphy.io.options import (
2
4
  BaseUnits,
3
5
  DerhamOptions,
@@ -10,6 +12,7 @@ __all__ = [
10
12
  "EnvironmentOptions",
11
13
  "BaseUnits",
12
14
  "Time",
15
+ "ProfilingOptions",
13
16
  #
14
17
  "DerhamOptions",
15
18
  "FieldsBackground",
@@ -0,0 +1,3 @@
1
+ from struphy.post_processing.output import Output, open_output
2
+
3
+ __all__ = ["Output", "open_output"]
@@ -611,8 +611,8 @@ def make_knots(breaks, degree, periodic):
611
611
 
612
612
  if periodic:
613
613
  period = breaks[-1] - breaks[0]
614
- T[0:p] = [xi - period for xi in breaks[-p - 1 : -1]]
615
- T[-p:] = [xi + period for xi in breaks[1 : p + 1]]
614
+ T[0:p] = xp.asarray([xi - period for xi in breaks[-p - 1 : -1]])
615
+ T[-p:] = xp.asarray([xi + period for xi in breaks[1 : p + 1]])
616
616
  else:
617
617
  T[0:p] = breaks[0]
618
618
  T[-p:] = breaks[-1]
@@ -10,8 +10,7 @@ struphy_path := $(shell $(PYTHON) -c "import struphy; print(struphy.__path__[0])
10
10
  # Arguments to this script are:
11
11
  STRUPHY_SOURCES := $(sources)
12
12
  FLAGS := --libdir $(LIBDIR) $(flags) #--debug
13
- FLAGS_openmp_pic := $(flags_openmp_pic)
14
- FLAGS_openmp_mhd := $(flags_openmp_mhd)
13
+ FLAGS_openmp := $(flags_openmp)
15
14
 
16
15
  #--------------------------------------
17
16
  # SOURCE FILES
@@ -35,7 +34,7 @@ all: $(OUTPUTS)
35
34
  @for dep in $^ ; do \
36
35
  echo $$dep ; \
37
36
  done
38
- pyccel compile -v $(FLAGS) $(FLAGS_openmp_pic) $(FLAGS_openmp_mhd) $<
37
+ pyccel compile $(FLAGS) $(FLAGS_openmp) $<
39
38
  @echo ""
40
39
 
41
40
  #--------------------------------------