struphy 2.3.1__tar.gz → 2.3.2__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 (324) hide show
  1. {struphy-2.3.1/src/struphy.egg-info → struphy-2.3.2}/PKG-INFO +3 -3
  2. {struphy-2.3.1 → struphy-2.3.2}/pyproject.toml +3 -3
  3. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/bsplines/evaluation_kernels_3d.py +219 -3
  4. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/conftest.py +5 -0
  5. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/console/compile.py +12 -2
  6. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/console/main.py +131 -66
  7. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/console/pproc.py +16 -8
  8. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/console/run.py +89 -20
  9. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/console/test.py +122 -89
  10. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/diagnostics/continuous_spectra.py +2 -2
  11. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/diagnostics/diagn_tools.py +4 -2
  12. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/eigenvalue_solvers/mhd_axisymmetric_main.py +2 -2
  13. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/feec/basis_projection_kernels.py +49 -40
  14. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/feec/basis_projection_ops.py +1 -1
  15. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/feec/mass.py +120 -42
  16. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/feec/psydac_derham.py +89 -42
  17. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/feec/tests/test_basis_ops.py +268 -0
  18. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/feec/tests/test_field_init.py +4 -1
  19. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/feec/tests/test_l2_projectors.py +7 -2
  20. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/feec/tests/test_local_projectors.py +12 -12
  21. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/feec/tests/test_mass_matrices.py +26 -25
  22. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/feec/utilities_kernels.py +6 -6
  23. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/fields_background/mhd_equil/base.py +82 -6
  24. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/fields_background/mhd_equil/equils.py +52 -19
  25. struphy-2.3.2/src/struphy/fields_background/mhd_equil/projected_equils.py +291 -0
  26. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/fields_background/tests/test_desc_equil.py +3 -2
  27. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/fields_background/tests/test_gvec_equil.py +1 -1
  28. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/geometry/base.py +25 -22
  29. struphy-2.3.2/src/struphy/geometry/evaluation_kernels.py +551 -0
  30. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/geometry/mappings_kernels.py +81 -136
  31. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/geometry/transform_kernels.py +56 -104
  32. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/initial/perturbations.py +110 -6
  33. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/io/inp/parameters.yml +2 -1
  34. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/io/inp/tutorials/params_02.yml +22 -13
  35. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/io/inp/tutorials/params_03.yml +15 -11
  36. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/io/inp/tutorials/params_04a.yml +10 -8
  37. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/io/inp/tutorials/params_04b.yml +10 -6
  38. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/io/inp/tutorials/params_04c.yml +57 -38
  39. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/io/inp/tutorials/params_05a.yml +3 -1
  40. struphy-2.3.2/src/struphy/io/inp/tutorials/params_05b.yml +77 -0
  41. struphy-2.3.1/src/struphy/io/inp/tutorials/params_05b.yml → struphy-2.3.2/src/struphy/io/inp/tutorials/params_05c.yml +4 -2
  42. struphy-2.3.2/src/struphy/io/inp/tutorials/params_05d.yml +84 -0
  43. struphy-2.3.2/src/struphy/io/inp/tutorials/params_05e.yml +84 -0
  44. struphy-2.3.2/src/struphy/io/inp/tutorials/params_05f.yml +84 -0
  45. struphy-2.3.2/src/struphy/io/inp/tutorials/params_12a.yml +77 -0
  46. struphy-2.3.2/src/struphy/io/inp/tutorials/params_12b.yml +79 -0
  47. struphy-2.3.2/src/struphy/io/setup.py +758 -0
  48. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/kinetic_background/base.py +18 -6
  49. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/kinetic_background/maxwellians.py +28 -57
  50. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/kinetic_background/tests/test_maxwellians.py +49 -36
  51. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/linear_algebra/schur_solver.py +23 -10
  52. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/main.py +166 -79
  53. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/models/base.py +524 -277
  54. struphy-2.3.2/src/struphy/models/fluid.py +1070 -0
  55. struphy-2.3.2/src/struphy/models/hybrid.py +1132 -0
  56. struphy-2.3.2/src/struphy/models/kinetic.py +1043 -0
  57. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/models/tests/test_fluid_models.py +7 -5
  58. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/models/tests/test_hybrid_models.py +4 -3
  59. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/models/tests/test_kinetic_models.py +9 -7
  60. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/models/tests/test_toy_models.py +4 -3
  61. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/models/tests/test_xxpproc.py +22 -6
  62. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/models/tests/util.py +3 -3
  63. struphy-2.3.2/src/struphy/models/toy.py +1069 -0
  64. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/pic/accumulation/accum_kernels.py +153 -381
  65. struphy-2.3.2/src/struphy/pic/accumulation/accum_kernels_gc.py +862 -0
  66. struphy-2.3.2/src/struphy/pic/accumulation/filter_kernels.py +117 -0
  67. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/pic/accumulation/particle_to_mat_kernels.py +1702 -1934
  68. struphy-2.3.2/src/struphy/pic/accumulation/particles_to_grid.py +662 -0
  69. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/pic/base.py +224 -78
  70. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/pic/particles.py +117 -74
  71. struphy-2.3.2/src/struphy/pic/pushing/eval_kernels_gc.py +408 -0
  72. struphy-2.3.2/src/struphy/pic/pushing/pusher.py +477 -0
  73. struphy-2.3.2/src/struphy/pic/pushing/pusher_args_kernels.py +123 -0
  74. struphy-2.3.2/src/struphy/pic/pushing/pusher_kernels.py +2709 -0
  75. struphy-2.3.2/src/struphy/pic/pushing/pusher_kernels_gc.py +2171 -0
  76. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/pic/pushing/pusher_utilities_kernels.py +68 -98
  77. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/pic/tests/test_accum_vec_H1.py +47 -14
  78. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/pic/tests/test_accumulation.py +9 -3
  79. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/pic/tests/test_mat_vec_filler.py +104 -55
  80. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/pic/tests/test_pushers.py +110 -249
  81. struphy-2.3.2/src/struphy/pic/utilities.py +62 -0
  82. struphy-2.3.2/src/struphy/pic/utilities_kernels.py +637 -0
  83. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/post_processing/post_processing_tools.py +66 -48
  84. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/post_processing/pproc_struphy.py +46 -20
  85. struphy-2.3.2/src/struphy/profiling/profiling.py +176 -0
  86. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/propagators/base.py +124 -7
  87. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/propagators/propagators_coupling.py +589 -616
  88. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/propagators/propagators_fields.py +1543 -1673
  89. struphy-2.3.2/src/struphy/propagators/propagators_markers.py +1175 -0
  90. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/propagators/tests/test_gyrokinetic_poisson.py +14 -12
  91. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/propagators/tests/test_poisson.py +9 -8
  92. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/tutorials/longer_examples/TAE_tokamak.py +2 -2
  93. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/tutorials/longer_examples/linearextendedmhd.py +89 -87
  94. struphy-2.3.2/src/struphy/tutorials/tests/__init__.py +0 -0
  95. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/tutorials/tests/test_tutorials.py +64 -20
  96. {struphy-2.3.1 → struphy-2.3.2/src/struphy.egg-info}/PKG-INFO +3 -3
  97. {struphy-2.3.1 → struphy-2.3.2}/src/struphy.egg-info/SOURCES.txt +9 -2
  98. {struphy-2.3.1 → struphy-2.3.2}/src/struphy.egg-info/requires.txt +2 -2
  99. struphy-2.3.1/src/struphy/eigenvalue_solvers/tests/test_legacy_mhd_projectors.py +0 -986
  100. struphy-2.3.1/src/struphy/feec/tests/test_basis_operators.py +0 -749
  101. struphy-2.3.1/src/struphy/geometry/evaluation_kernels.py +0 -815
  102. struphy-2.3.1/src/struphy/io/inp/tutorials/params_12a.yml +0 -59
  103. struphy-2.3.1/src/struphy/io/inp/tutorials/params_12b.yml +0 -65
  104. struphy-2.3.1/src/struphy/io/setup.py +0 -521
  105. struphy-2.3.1/src/struphy/models/fluid.py +0 -1107
  106. struphy-2.3.1/src/struphy/models/hybrid.py +0 -1066
  107. struphy-2.3.1/src/struphy/models/kinetic.py +0 -1911
  108. struphy-2.3.1/src/struphy/models/toy.py +0 -1089
  109. struphy-2.3.1/src/struphy/pic/accumulation/accum_kernels_gc.py +0 -2138
  110. struphy-2.3.1/src/struphy/pic/accumulation/particles_to_grid.py +0 -522
  111. struphy-2.3.1/src/struphy/pic/pushing/eval_kernels_gc.py +0 -1688
  112. struphy-2.3.1/src/struphy/pic/pushing/pusher.py +0 -321
  113. struphy-2.3.1/src/struphy/pic/pushing/pusher_kernels.py +0 -3153
  114. struphy-2.3.1/src/struphy/pic/pushing/pusher_kernels_gc.py +0 -3572
  115. struphy-2.3.1/src/struphy/pic/utilities.py +0 -132
  116. struphy-2.3.1/src/struphy/pic/utilities_kernels.py +0 -1226
  117. struphy-2.3.1/src/struphy/propagators/propagators_markers.py +0 -2118
  118. {struphy-2.3.1 → struphy-2.3.2}/LICENSE +0 -0
  119. {struphy-2.3.1 → struphy-2.3.2}/README.md +0 -0
  120. {struphy-2.3.1 → struphy-2.3.2}/setup.cfg +0 -0
  121. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/__init__.py +0 -0
  122. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/bsplines/__init__.py +0 -0
  123. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/bsplines/bsplines.py +0 -0
  124. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/bsplines/bsplines_kernels.py +0 -0
  125. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/bsplines/evaluation_kernels_1d.py +0 -0
  126. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/bsplines/evaluation_kernels_2d.py +0 -0
  127. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/bsplines/shapefunc_kernels.py +0 -0
  128. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/bsplines/tests/__init__.py +0 -0
  129. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/bsplines/tests/test_bsplines_kernels.py +0 -0
  130. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/bsplines/tests/test_eval_spline_mpi.py +0 -0
  131. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/compile_struphy.mk +0 -0
  132. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/console/__init__.py +0 -0
  133. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/console/params.py +0 -0
  134. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/console/profile.py +0 -0
  135. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/console/units.py +0 -0
  136. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/dependencies.py +0 -0
  137. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/diagnostics/__init__.py +0 -0
  138. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/diagnostics/console_diagn.py +0 -0
  139. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/diagnostics/paraview/__init__.py +0 -0
  140. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/diagnostics/paraview/mesh_creator.py +0 -0
  141. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/diagnostics/paraview/vtk_writer.py +0 -0
  142. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/dispersion_relations/__init__.py +0 -0
  143. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/dispersion_relations/analytic.py +0 -0
  144. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/dispersion_relations/base.py +0 -0
  145. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/dispersion_relations/utilities.py +0 -0
  146. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/eigenvalue_solvers/__init__.py +0 -0
  147. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/eigenvalue_solvers/derivatives.py +0 -0
  148. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/eigenvalue_solvers/kernels_2d.py +0 -0
  149. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/eigenvalue_solvers/kernels_3d.py +0 -0
  150. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/eigenvalue_solvers/kernels_projectors_global.py +0 -0
  151. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/eigenvalue_solvers/kernels_projectors_global_mhd.py +0 -0
  152. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/eigenvalue_solvers/legacy/MHD_eigenvalues_cylinder_1D.py +0 -0
  153. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/eigenvalue_solvers/legacy/__init__.py +0 -0
  154. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/eigenvalue_solvers/legacy/control_variates/__init__.py +0 -0
  155. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/eigenvalue_solvers/legacy/control_variates/control_variate.py +0 -0
  156. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/eigenvalue_solvers/legacy/control_variates/kernels_control_variate.py +0 -0
  157. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/eigenvalue_solvers/legacy/control_variates/kinetic_extended/__init__.py +0 -0
  158. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/eigenvalue_solvers/legacy/control_variates/kinetic_extended/fB_massless_control_variate.py +0 -0
  159. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/eigenvalue_solvers/legacy/control_variates/kinetic_extended/fB_massless_kernels_control_variate.py +0 -0
  160. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/eigenvalue_solvers/legacy/control_variates/kinetic_extended/fnB_massless_control_variate.py +0 -0
  161. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/eigenvalue_solvers/legacy/control_variates/kinetic_extended/fnB_massless_cv_kernel_2.py +0 -0
  162. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/eigenvalue_solvers/legacy/control_variates/kinetic_extended/fnB_massless_kernels_control_variate.py +0 -0
  163. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/eigenvalue_solvers/legacy/control_variates/kinetic_extended/massless_control_variate.py +0 -0
  164. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/eigenvalue_solvers/legacy/control_variates/kinetic_extended/massless_cvker.py +0 -0
  165. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/eigenvalue_solvers/legacy/control_variates/kinetic_extended/massless_kernels_control_variate.py +0 -0
  166. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/eigenvalue_solvers/legacy/emw_operators.py +0 -0
  167. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/eigenvalue_solvers/legacy/inner_products_1d.py +0 -0
  168. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/eigenvalue_solvers/legacy/inner_products_2d.py +0 -0
  169. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/eigenvalue_solvers/legacy/inner_products_3d.py +0 -0
  170. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/eigenvalue_solvers/legacy/l2_error_1d.py +0 -0
  171. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/eigenvalue_solvers/legacy/l2_error_2d.py +0 -0
  172. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/eigenvalue_solvers/legacy/l2_error_3d.py +0 -0
  173. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/eigenvalue_solvers/legacy/mass_matrices_3d_pre.py +0 -0
  174. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/eigenvalue_solvers/legacy/massless_operators/__init__.py +0 -0
  175. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/eigenvalue_solvers/legacy/massless_operators/fB_arrays.py +0 -0
  176. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/eigenvalue_solvers/legacy/massless_operators/fB_bb_kernel.py +0 -0
  177. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/eigenvalue_solvers/legacy/massless_operators/fB_bv_kernel.py +0 -0
  178. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/eigenvalue_solvers/legacy/massless_operators/fB_massless_linear_operators.py +0 -0
  179. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/eigenvalue_solvers/legacy/massless_operators/fB_vv_kernel.py +0 -0
  180. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/eigenvalue_solvers/legacy/mhd_operators_MF.py +0 -0
  181. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/eigenvalue_solvers/legacy/projectors_local/__init__.py +0 -0
  182. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/eigenvalue_solvers/legacy/projectors_local/pro_local/__init__.py +0 -0
  183. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/eigenvalue_solvers/legacy/projectors_local/pro_local/kernels_projectors_local.py +0 -0
  184. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/eigenvalue_solvers/legacy/projectors_local/pro_local/kernels_projectors_local_mhd.py +0 -0
  185. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/eigenvalue_solvers/legacy/projectors_local/pro_local/mhd_operators_3d_local.py +0 -0
  186. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/eigenvalue_solvers/legacy/projectors_local/pro_local/projectors_local.py +0 -0
  187. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/eigenvalue_solvers/legacy/projectors_local/shape_pro_local/__init__.py +0 -0
  188. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/eigenvalue_solvers/legacy/projectors_local/shape_pro_local/shape_L2_projector_kernel.py +0 -0
  189. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/eigenvalue_solvers/legacy/projectors_local/shape_pro_local/shape_function_projectors_L2.py +0 -0
  190. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/eigenvalue_solvers/legacy/projectors_local/shape_pro_local/shape_function_projectors_local.py +0 -0
  191. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/eigenvalue_solvers/legacy/projectors_local/shape_pro_local/shape_local_projector_kernel.py +0 -0
  192. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/eigenvalue_solvers/mass_matrices_1d.py +0 -0
  193. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/eigenvalue_solvers/mass_matrices_2d.py +0 -0
  194. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/eigenvalue_solvers/mass_matrices_3d.py +0 -0
  195. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/eigenvalue_solvers/mhd_axisymmetric_pproc.py +0 -0
  196. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/eigenvalue_solvers/mhd_operators.py +0 -0
  197. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/eigenvalue_solvers/mhd_operators_core.py +0 -0
  198. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/eigenvalue_solvers/projectors_global.py +0 -0
  199. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/eigenvalue_solvers/spline_space.py +0 -0
  200. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/eigenvalue_solvers/tests/__init__.py +0 -0
  201. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/examples/_draw_parallel.py +0 -0
  202. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/feec/__init__.py +0 -0
  203. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/feec/banded_to_stencil_kernels.py +0 -0
  204. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/feec/linear_operators.py +0 -0
  205. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/feec/mass_kernels.py +0 -0
  206. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/feec/preconditioner.py +0 -0
  207. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/feec/projectors.py +0 -0
  208. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/feec/tests/__init__.py +0 -0
  209. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/feec/tests/test_derham.py +0 -0
  210. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/feec/tests/test_eval_field.py +0 -0
  211. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/feec/tests/test_lowdim_nel_is_1.py +0 -0
  212. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/feec/tests/test_toarray_struphy.py +0 -0
  213. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/feec/tests/test_tosparse_struphy.py +0 -0
  214. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/feec/tests/xx_test_preconds.py +0 -0
  215. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/feec/utilities.py +0 -0
  216. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/feec/variational_utilities.py +0 -0
  217. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/fields_background/__init__.py +0 -0
  218. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/fields_background/braginskii_equil/__init__.py +0 -0
  219. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/fields_background/braginskii_equil/base.py +0 -0
  220. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/fields_background/braginskii_equil/equils.py +0 -0
  221. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/fields_background/mhd_equil/__init__.py +0 -0
  222. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/fields_background/mhd_equil/eqdsk/__init__.py +0 -0
  223. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/fields_background/mhd_equil/eqdsk/data/AUGNLED_g031213.00830.high +0 -0
  224. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/fields_background/mhd_equil/eqdsk/data/__init__.py +0 -0
  225. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/fields_background/mhd_equil/eqdsk/readeqdsk.py +0 -0
  226. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/fields_background/mhd_equil/gvec/__init__.py +0 -0
  227. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/fields_background/mhd_equil/gvec/ellipstell_v2/newBC_E1D6_M6N6/GVEC_ELLIPSTELL_V2_State_0000_00200000.dat +0 -0
  228. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/fields_background/mhd_equil/gvec/ellipstell_v2/newBC_E1D6_M6N6/parameter.ini +0 -0
  229. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/fields_background/mhd_equil/gvec/ellipstell_v2/newBC_E4D6_M6N6/GVEC_ELLIPSTELL_V2_State_0000_00200000.dat +0 -0
  230. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/fields_background/mhd_equil/gvec/ellipstell_v2/newBC_E4D6_M6N6/parameter.ini +0 -0
  231. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/fields_background/mhd_equil/gvec/ellipstell_v2/oldBC_E40D5M6N6/GVEC_ELLIPSTELL_V2_State_0000_00200000.dat +0 -0
  232. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/fields_background/mhd_equil/gvec/ellipstell_v2/oldBC_E40D5M6N6/parameter.ini +0 -0
  233. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/fields_background/mhd_equil/gvec/output/__init__.py +0 -0
  234. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/fields_background/mhd_equil/gvec/output/vtk/__init__.py +0 -0
  235. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/fields_background/mhd_equil/vmec/__init__.py +0 -0
  236. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/fields_background/tests/__init__.py +0 -0
  237. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/fields_background/tests/test_mhd_equils.py +0 -0
  238. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/fields_background/tests/test_numerical_mhd_equil.py +0 -0
  239. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/geometry/__init__.py +0 -0
  240. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/geometry/domains.py +0 -0
  241. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/geometry/map_coef/__init__.py +0 -0
  242. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/geometry/tests/__init__.py +0 -0
  243. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/geometry/tests/test_domain.py +0 -0
  244. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/geometry/utilities.py +0 -0
  245. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/geometry/utilities_kernels.py +0 -0
  246. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/initial/__init__.py +0 -0
  247. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/initial/eigenfunctions.py +0 -0
  248. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/initial/tests/__init__.py +0 -0
  249. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/initial/tests/test_init_perturbations.py +0 -0
  250. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/initial/utilities.py +0 -0
  251. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/io/__init__.py +0 -0
  252. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/io/batch/batch_cobra.sh +0 -0
  253. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/io/batch/p_016.sh +0 -0
  254. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/io/batch/p_032.sh +0 -0
  255. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/io/batch/p_064.sh +0 -0
  256. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/io/batch/p_128.sh +0 -0
  257. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/io/batch/p_256.sh +0 -0
  258. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/io/batch/p_512.sh +0 -0
  259. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/io/inp/__init__.py +0 -0
  260. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/io/inp/longer_examples/params_TAE_tokamak.yml +0 -0
  261. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/io/inp/longer_examples/params_hybridmhdvlasovcc.yml +0 -0
  262. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/io/inp/longer_examples/params_hybridmhdvlasovpc.yml +0 -0
  263. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/io/inp/longer_examples/params_linearextendedmhd.yml +0 -0
  264. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/io/inp/longer_examples/params_linvlasovmaxwell_landau.yml +0 -0
  265. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/io/inp/longer_examples/params_linvlasovmaxwell_streaming_weibel.yml +0 -0
  266. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/io/inp/longer_examples/params_linvlasovmaxwell_weibel.yml +0 -0
  267. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/io/out/__init__.py +0 -0
  268. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/io/output_handling.py +0 -0
  269. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/kinetic_background/__init__.py +0 -0
  270. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/kinetic_background/tests/__init__.py +0 -0
  271. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/kinetic_background/tests/test_base.py +0 -0
  272. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/linear_algebra/__init__.py +0 -0
  273. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/linear_algebra/linalg_kernels.py +0 -0
  274. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/linear_algebra/linalg_kron.py +0 -0
  275. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/linear_algebra/stencil_dot_kernels.py +0 -0
  276. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/linear_algebra/stencil_transpose_kernels.py +0 -0
  277. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/linear_algebra/tests/__init__.py +0 -0
  278. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/linear_algebra/tests/test_stencil_dot_kernels.py +0 -0
  279. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/linear_algebra/tests/test_stencil_transpose_kernels.py +0 -0
  280. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/models/__init__.py +0 -0
  281. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/models/tests/__init__.py +0 -0
  282. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/pic/__init__.py +0 -0
  283. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/pic/accumulation/__init__.py +0 -0
  284. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/pic/accumulation/filler_kernels.py +0 -0
  285. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/pic/pushing/__init__.py +0 -0
  286. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/pic/sampling_kernels.py +0 -0
  287. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/pic/sobol_seq.py +0 -0
  288. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/pic/tests/__init__.py +0 -0
  289. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/pic/tests/test_binning.py +0 -0
  290. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/pic/tests/test_draw_parallel.py +0 -0
  291. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/pic/tests/test_pic_legacy_files/__init__.py +0 -0
  292. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/pic/tests/test_pic_legacy_files/accumulation.py +0 -0
  293. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/pic/tests/test_pic_legacy_files/accumulation_kernels_3d.py +0 -0
  294. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/pic/tests/test_pic_legacy_files/mappings_3d.py +0 -0
  295. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/pic/tests/test_pic_legacy_files/mappings_3d_fast.py +0 -0
  296. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/pic/tests/test_pic_legacy_files/pusher.py +0 -0
  297. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/pic/tests/test_pic_legacy_files/pusher_pos.py +0 -0
  298. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/pic/tests/test_pic_legacy_files/pusher_vel_2d.py +0 -0
  299. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/pic/tests/test_pic_legacy_files/pusher_vel_3d.py +0 -0
  300. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/pic/tests/test_pic_legacy_files/spline_evaluation_2d.py +0 -0
  301. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/pic/tests/test_pic_legacy_files/spline_evaluation_3d.py +0 -0
  302. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/polar/__init__.py +0 -0
  303. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/polar/basic.py +0 -0
  304. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/polar/extraction_operators.py +0 -0
  305. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/polar/linear_operators.py +0 -0
  306. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/polar/tests/__init__.py +0 -0
  307. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/polar/tests/test_legacy_polar_splines.py +0 -0
  308. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/polar/tests/test_polar.py +0 -0
  309. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/post_processing/__init__.py +0 -0
  310. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/post_processing/cprofile_analyser.py +0 -0
  311. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/post_processing/profile_struphy.py +0 -0
  312. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/post_processing/tests/__init__.py +0 -0
  313. {struphy-2.3.1/src/struphy/propagators → struphy-2.3.2/src/struphy/profiling}/__init__.py +0 -0
  314. {struphy-2.3.1/src/struphy/propagators/tests → struphy-2.3.2/src/struphy/propagators}/__init__.py +0 -0
  315. {struphy-2.3.1/src/struphy/tutorials → struphy-2.3.2/src/struphy/propagators/tests}/__init__.py +0 -0
  316. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/psydac-0.1.13-py3-none-any.whl +0 -0
  317. {struphy-2.3.1/src/struphy/tutorials/longer_examples → struphy-2.3.2/src/struphy/tutorials}/__init__.py +0 -0
  318. {struphy-2.3.1/src/struphy/tutorials/tests → struphy-2.3.2/src/struphy/tutorials/longer_examples}/__init__.py +0 -0
  319. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/tutorials/longer_examples/linearmhdvlasov_cc.py +0 -0
  320. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/tutorials/longer_examples/linearmhdvlasov_pc.py +0 -0
  321. {struphy-2.3.1 → struphy-2.3.2}/src/struphy/tutorials/utilities.py +0 -0
  322. {struphy-2.3.1 → struphy-2.3.2}/src/struphy.egg-info/dependency_links.txt +0 -0
  323. {struphy-2.3.1 → struphy-2.3.2}/src/struphy.egg-info/entry_points.txt +0 -0
  324. {struphy-2.3.1 → struphy-2.3.2}/src/struphy.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: struphy
3
- Version: 2.3.1
3
+ Version: 2.3.2
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, eric.sonnendruecker@ipp.mpg.de
@@ -32,7 +32,7 @@ Description-Content-Type: text/markdown
32
32
  License-File: LICENSE
33
33
  Requires-Dist: PyYAML==6.0.1
34
34
  Requires-Dist: argcomplete==3.4.0
35
- Requires-Dist: desc-opt==0.11.1
35
+ Requires-Dist: desc-opt==0.12.0
36
36
  Requires-Dist: docutils==0.21.2
37
37
  Requires-Dist: gvec-to-python==1.2.2
38
38
  Requires-Dist: h5py==3.11.0
@@ -47,7 +47,7 @@ Requires-Dist: nbsphinx==0.9.4
47
47
  Requires-Dist: netCDF4==1.6.5
48
48
  Requires-Dist: notebook==7.2.1
49
49
  Requires-Dist: numpy==1.24.4
50
- Requires-Dist: pyccel==1.12.0
50
+ Requires-Dist: pyccel==1.12.1
51
51
  Requires-Dist: pydata-sphinx-theme==0.15.3
52
52
  Requires-Dist: pytest==8.2.2
53
53
  Requires-Dist: pytest-monitor==1.6.6
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "struphy"
7
- version = "2.3.1"
7
+ version = "2.3.2"
8
8
  readme = "README.md"
9
9
  requires-python = ">=3.10, <3.12"
10
10
  license = {file = "LICENSE"}
@@ -21,7 +21,7 @@ classifiers = [
21
21
  dependencies = [
22
22
  'PyYAML==6.0.1',
23
23
  'argcomplete==3.4.0',
24
- 'desc-opt==0.11.1',
24
+ 'desc-opt==0.12.0',
25
25
  'docutils==0.21.2',
26
26
  'gvec-to-python==1.2.2',
27
27
  'h5py==3.11.0',
@@ -36,7 +36,7 @@ dependencies = [
36
36
  'netCDF4==1.6.5',
37
37
  'notebook==7.2.1',
38
38
  'numpy==1.24.4',
39
- 'pyccel==1.12.0',
39
+ 'pyccel==1.12.1',
40
40
  'pydata-sphinx-theme==0.15.3',
41
41
  'pytest==8.2.2',
42
42
  'pytest-monitor==1.6.6',
@@ -24,9 +24,14 @@ from numpy import empty, zeros
24
24
 
25
25
  import struphy.bsplines.bsplines_kernels as bsplines_kernels
26
26
 
27
+ import struphy.pic.pushing.pusher_args_kernels as pusher_args_kernels
28
+ from struphy.pic.pushing.pusher_args_kernels import DerhamArguments, DomainArguments
29
+
27
30
  #################################
28
31
  ### Single process evaluation ###
29
32
  #################################
33
+
34
+
30
35
  def evaluation_kernel_3d(p1: int, p2: int, p3: int, basis1: 'float[:]', basis2: 'float[:]', basis3: 'float[:]', ind1: 'int[:]', ind2: 'int[:]', ind3: 'int[:]', coeff: 'float[:,:,:]') -> float:
31
36
  """
32
37
  Summing non-zero contributions of a spline function (serial, needs global arrays).
@@ -404,7 +409,19 @@ def evaluate_sparse(t1: 'float[:]', t2: 'float[:]', t3: 'float[:]', p1: int, p2:
404
409
  ##############################
405
410
  ### Distributed evaluation ###
406
411
  ##############################
407
- def eval_spline_mpi_kernel(p1: 'int', p2: 'int', p3: 'int', basis1: 'float[:]', basis2: 'float[:]', basis3: 'float[:]', span1: 'int', span2: 'int', span3: 'int', _data: 'float[:,:,:]', starts: 'int[:]') -> float:
412
+
413
+
414
+ def eval_spline_mpi_kernel(p1: 'int',
415
+ p2: 'int',
416
+ p3: 'int',
417
+ basis1: 'float[:]',
418
+ basis2: 'float[:]',
419
+ basis3: 'float[:]',
420
+ span1: 'int',
421
+ span2: 'int',
422
+ span3: 'int',
423
+ _data: 'float[:,:,:]',
424
+ starts: 'int[:]') -> float:
408
425
  """
409
426
  Summing non-zero contributions of a spline function with distributed memory (domain decomposition).
410
427
 
@@ -767,7 +784,7 @@ def eval_spline_mpi_tensor_product_fixed(span1s: 'int[:]', span2s: 'int[:]', spa
767
784
  for k in range(nk):
768
785
  span3 = span3s[k]
769
786
  b3[:] = b3s[k, :]
770
-
787
+
771
788
  values[i, j, k] = eval_spline_mpi_kernel(pn[0] - kind[0],
772
789
  pn[1] - kind[1],
773
790
  pn[2] - kind[2],
@@ -876,4 +893,203 @@ def eval_spline_mpi_sparse_meshgrid(eta1: 'float[:,:,:]', eta2: 'float[:,:,:]',
876
893
  continue # point not in process domain
877
894
 
878
895
  values[i, j, k] = eval_spline_mpi(
879
- eta1[i, 0, 0], eta2[0, j, 0], eta3[0, 0, k], _data, kind, pn, tn1, tn2, tn3, starts)
896
+ eta1[i, 0, 0], eta2[0, j, 0], eta3[0, 0, k], _data, kind, pn, tn1, tn2, tn3, starts)
897
+
898
+
899
+ ###########################################
900
+ ### Distributed Derham field evaluation ###
901
+ ###########################################
902
+
903
+ def get_spans(eta1: float,
904
+ eta2: float,
905
+ eta3: float,
906
+ args_derham: 'DerhamArguments'):
907
+ '''Compute the knot span index,
908
+ the N-spline values (in bn) and the D-spline values (in bd)
909
+ at (eta1, eta2, eta3).'''
910
+
911
+ # find spans
912
+ span1 = bsplines_kernels.find_span(
913
+ args_derham.tn1, args_derham.pn[0], eta1)
914
+ span2 = bsplines_kernels.find_span(
915
+ args_derham.tn2, args_derham.pn[1], eta2)
916
+ span3 = bsplines_kernels.find_span(
917
+ args_derham.tn3, args_derham.pn[2], eta3)
918
+
919
+ # get spline values at eta
920
+ bsplines_kernels.b_d_splines_slim(
921
+ args_derham.tn1, args_derham.pn[0], eta1, int(span1), args_derham.bn1, args_derham.bd1)
922
+ bsplines_kernels.b_d_splines_slim(
923
+ args_derham.tn2, args_derham.pn[1], eta2, int(span2), args_derham.bn2, args_derham.bd2)
924
+ bsplines_kernels.b_d_splines_slim(
925
+ args_derham.tn3, args_derham.pn[2], eta3, int(span3), args_derham.bn3, args_derham.bd3)
926
+
927
+ return span1, span2, span3
928
+
929
+
930
+ def eval_0form_spline_mpi(span1: int,
931
+ span2: int,
932
+ span3: int,
933
+ args_derham: 'DerhamArguments',
934
+ form_coeffs: 'float[:,:,:]') -> float:
935
+ '''Single-point evaluation of Derham 0-form spline defined by form_coeffs,
936
+ given N-spline values (in bn) and knot span indices span.'''
937
+
938
+ out = eval_spline_mpi_kernel(args_derham.pn[0],
939
+ args_derham.pn[1],
940
+ args_derham.pn[2],
941
+ args_derham.bn1,
942
+ args_derham.bn2,
943
+ args_derham.bn3,
944
+ span1, span2, span3,
945
+ form_coeffs,
946
+ args_derham.starts)
947
+ return out
948
+
949
+
950
+ def eval_1form_spline_mpi(span1: int,
951
+ span2: int,
952
+ span3: int,
953
+ args_derham: 'DerhamArguments',
954
+ form_coeffs_1: 'float[:,:,:]',
955
+ form_coeffs_2: 'float[:,:,:]',
956
+ form_coeffs_3: 'float[:,:,:]',
957
+ out: 'float[:]'):
958
+ '''Single-point evaluation of Derham 1-form spline defined by form_coeffs,
959
+ given N-spline values (in bn), D-spline values (in bd)
960
+ and knot span indices span.'''
961
+
962
+ out[0] = eval_spline_mpi_kernel(args_derham.pn[0] - 1,
963
+ args_derham.pn[1],
964
+ args_derham.pn[2],
965
+ args_derham.bd1,
966
+ args_derham.bn2,
967
+ args_derham.bn3,
968
+ span1, span2, span3,
969
+ form_coeffs_1,
970
+ args_derham.starts)
971
+
972
+ out[1] = eval_spline_mpi_kernel(args_derham.pn[0],
973
+ args_derham.pn[1] - 1,
974
+ args_derham.pn[2],
975
+ args_derham.bn1,
976
+ args_derham.bd2,
977
+ args_derham.bn3,
978
+ span1, span2, span3,
979
+ form_coeffs_2,
980
+ args_derham.starts)
981
+
982
+ out[2] = eval_spline_mpi_kernel(args_derham.pn[0],
983
+ args_derham.pn[1],
984
+ args_derham.pn[2] - 1,
985
+ args_derham.bn1,
986
+ args_derham.bn2,
987
+ args_derham.bd3,
988
+ span1, span2, span3,
989
+ form_coeffs_3,
990
+ args_derham.starts)
991
+
992
+
993
+ def eval_2form_spline_mpi(span1: int,
994
+ span2: int,
995
+ span3: int,
996
+ args_derham: 'DerhamArguments',
997
+ form_coeffs_1: 'float[:,:,:]',
998
+ form_coeffs_2: 'float[:,:,:]',
999
+ form_coeffs_3: 'float[:,:,:]',
1000
+ out: 'float[:]'):
1001
+ '''Single-point evaluation of Derham 2-form spline defined by form_coeffs,
1002
+ given N-spline values (in bn), D-spline values (in bd)
1003
+ and knot span indices span.'''
1004
+
1005
+ out[0] = eval_spline_mpi_kernel(args_derham.pn[0],
1006
+ args_derham.pn[1] - 1,
1007
+ args_derham.pn[2] - 1,
1008
+ args_derham.bn1,
1009
+ args_derham.bd2,
1010
+ args_derham.bd3,
1011
+ span1, span2, span3,
1012
+ form_coeffs_1,
1013
+ args_derham.starts)
1014
+
1015
+ out[1] = eval_spline_mpi_kernel(args_derham.pn[0] - 1,
1016
+ args_derham.pn[1],
1017
+ args_derham.pn[2] - 1,
1018
+ args_derham.bd1,
1019
+ args_derham.bn2,
1020
+ args_derham.bd3,
1021
+ span1, span2, span3,
1022
+ form_coeffs_2,
1023
+ args_derham.starts)
1024
+
1025
+ out[2] = eval_spline_mpi_kernel(args_derham.pn[0] - 1,
1026
+ args_derham.pn[1] - 1,
1027
+ args_derham.pn[2],
1028
+ args_derham.bd1,
1029
+ args_derham.bd2,
1030
+ args_derham.bn3,
1031
+ span1, span2, span3,
1032
+ form_coeffs_3,
1033
+ args_derham.starts)
1034
+
1035
+
1036
+ def eval_3form_spline_mpi(span1: int,
1037
+ span2: int,
1038
+ span3: int,
1039
+ args_derham: 'DerhamArguments',
1040
+ form_coeffs: 'float[:,:,:]') -> float:
1041
+ '''Single-point evaluation of Derham 0-form spline defined by form_coeffs,
1042
+ given D-spline values (in bd) and knot span indices span.'''
1043
+
1044
+ out = eval_spline_mpi_kernel(args_derham.pn[0] - 1,
1045
+ args_derham.pn[1] - 1,
1046
+ args_derham.pn[2] - 1,
1047
+ args_derham.bd1,
1048
+ args_derham.bd2,
1049
+ args_derham.bd3,
1050
+ span1, span2, span3,
1051
+ form_coeffs,
1052
+ args_derham.starts)
1053
+ return out
1054
+
1055
+
1056
+ def eval_vectorfield_spline_mpi(span1: int,
1057
+ span2: int,
1058
+ span3: int,
1059
+ args_derham: 'DerhamArguments',
1060
+ form_coeffs_1: 'float[:,:,:]',
1061
+ form_coeffs_2: 'float[:,:,:]',
1062
+ form_coeffs_3: 'float[:,:,:]',
1063
+ out: 'float[:]'):
1064
+ '''Single-point evaluation of vector-field spline (H^1)^3 defined by form_coeffs,
1065
+ given N-spline values (in bn) and knot span indices span.'''
1066
+
1067
+ out[0] = eval_spline_mpi_kernel(args_derham.pn[0],
1068
+ args_derham.pn[1],
1069
+ args_derham.pn[2],
1070
+ args_derham.bn1,
1071
+ args_derham.bn2,
1072
+ args_derham.bn3,
1073
+ span1, span2, span3,
1074
+ form_coeffs_1,
1075
+ args_derham.starts)
1076
+
1077
+ out[1] = eval_spline_mpi_kernel(args_derham.pn[0],
1078
+ args_derham.pn[1],
1079
+ args_derham.pn[2],
1080
+ args_derham.bn1,
1081
+ args_derham.bn2,
1082
+ args_derham.bn3,
1083
+ span1, span2, span3,
1084
+ form_coeffs_2,
1085
+ args_derham.starts)
1086
+
1087
+ out[2] = eval_spline_mpi_kernel(args_derham.pn[0],
1088
+ args_derham.pn[1],
1089
+ args_derham.pn[2],
1090
+ args_derham.bn1,
1091
+ args_derham.bn2,
1092
+ args_derham.bn3,
1093
+ span1, span2, span3,
1094
+ form_coeffs_3,
1095
+ args_derham.starts)
@@ -1,5 +1,6 @@
1
1
  def pytest_addoption(parser):
2
2
  parser.addoption("--fast", action="store_true")
3
+ parser.addoption("--with-desc", action="store_true")
3
4
 
4
5
 
5
6
  def pytest_generate_tests(metafunc):
@@ -8,3 +9,7 @@ def pytest_generate_tests(metafunc):
8
9
  option_value = metafunc.config.option.fast
9
10
  if 'fast' in metafunc.fixturenames and option_value is not None:
10
11
  metafunc.parametrize("fast", [option_value])
12
+
13
+ option_value = metafunc.config.option.with_desc
14
+ if 'with_desc' in metafunc.fixturenames and option_value is not None:
15
+ metafunc.parametrize("with_desc", [option_value])
@@ -28,7 +28,7 @@ def struphy_compile(language, compiler, omp_pic, omp_feec, delete, status, verbo
28
28
 
29
29
  dependencies : bool
30
30
  Whether to print Struphy kernels (to be compiled) and their dependencies on screen.
31
-
31
+
32
32
  yes : bool
33
33
  Whether to say yes to prompt when changing the language.
34
34
  """
@@ -91,6 +91,10 @@ def struphy_compile(language, compiler, omp_pic, omp_feec, delete, status, verbo
91
91
  '--status',
92
92
  ], check=True, cwd=libpath)
93
93
 
94
+ print('\nDeleting state.yml ...')
95
+ os.remove(os.path.join(libpath, 'state.yml'))
96
+ print('Done.')
97
+
94
98
  elif status:
95
99
 
96
100
  # update status
@@ -183,7 +187,7 @@ def struphy_compile(language, compiler, omp_pic, omp_feec, delete, status, verbo
183
187
  else:
184
188
  yesno = input(
185
189
  f'Kernels compiled in language {state["last_used_language"]} exist, will be deleted, continue (Y/n)?')
186
-
190
+
187
191
  if yesno in ('', 'Y', 'y', 'yes'):
188
192
  subprocess.run(['struphy',
189
193
  'compile',
@@ -261,3 +265,9 @@ def struphy_compile(language, compiler, omp_pic, omp_feec, delete, status, verbo
261
265
  'compile',
262
266
  '--status',
263
267
  ], check=True, cwd=libpath)
268
+
269
+ # collect available models
270
+ print('')
271
+ subprocess.run(['struphy',
272
+ '--refresh-models',
273
+ ], check=True, cwd=libpath)
@@ -13,10 +13,9 @@ def struphy():
13
13
  Struphy main executable. Performs argument parsing and sub-command call.
14
14
  '''
15
15
 
16
- import inspect
16
+ import pickle
17
17
  import argparse
18
18
  import yaml
19
- from struphy.models import fluid, kinetic, hybrid, toy
20
19
  from struphy.console.compile import struphy_compile
21
20
  from struphy.console.run import struphy_run
22
21
  from struphy.console.units import struphy_units
@@ -91,67 +90,15 @@ def struphy():
91
90
  batch_files = recursive_get_files(
92
91
  b_path, contains=('.sh'), out=[], prefix=[])
93
92
 
94
- # collect available model, contains=('.yml', '.yaml')s
95
- list_fluid = []
96
- fluid_string = ''
97
- for name, obj in inspect.getmembers(fluid):
98
- if inspect.isclass(obj):
99
- if name not in {'StruphyModel', }:
100
- list_fluid += [name]
101
- fluid_string += '"' + name + '"\n'
102
-
103
- list_kinetic = []
104
- kinetic_string = ''
105
- for name, obj in inspect.getmembers(kinetic):
106
- if inspect.isclass(obj):
107
- if name not in {'StruphyModel', }:
108
- list_kinetic += [name]
109
- kinetic_string += '"' + name + '"\n'
110
-
111
- list_hybrid = []
112
- hybrid_string = ''
113
- for name, obj in inspect.getmembers(hybrid):
114
- if inspect.isclass(obj):
115
- if name not in {'StruphyModel', }:
116
- list_hybrid += [name]
117
- hybrid_string += '"' + name + '"\n'
118
-
119
- list_toy = []
120
- toy_string = ''
121
- for name, obj in inspect.getmembers(toy):
122
- if inspect.isclass(obj):
123
- if name not in {'StruphyModel', }:
124
- list_toy += [name]
125
- toy_string += '"' + name + '"\n'
126
-
127
- list_models = list_fluid + list_kinetic + list_hybrid + list_toy
128
-
129
- # fluid message
130
- fluid_message = 'Fluid models:\n'
131
- fluid_message += '-------------\n'
132
- fluid_message += fluid_string
133
-
134
- # kinetic message
135
- kinetic_message = 'Kinetic models:\n'
136
- kinetic_message += '---------------\n'
137
- kinetic_message += kinetic_string
138
-
139
- # hybrid message
140
- hybrid_message = 'Hybrid models:\n'
141
- hybrid_message += '--------------\n'
142
- hybrid_message += hybrid_string
143
-
144
- # toy message
145
- toy_message = 'Toy models:\n'
146
- toy_message += '-----------\n'
147
- toy_message += toy_string
148
-
149
- # model message
150
- model_message = 'run one of the following models:\n'
151
- model_message += '\n' + fluid_message
152
- model_message += '\n' + kinetic_message
153
- model_message += '\n' + hybrid_message
154
- model_message += '\n' + toy_message
93
+ try:
94
+ with open(os.path.join(libpath, 'models', 'models_list'), "rb") as fp:
95
+ list_models = pickle.load(fp)
96
+ with open(os.path.join(libpath, 'models', 'models_message'), "rb") as fp:
97
+ model_message, fluid_message, kinetic_message, hybrid_message, toy_message = pickle.load(
98
+ fp)
99
+ except:
100
+ list_models = []
101
+ model_message = ''
155
102
 
156
103
  # 0. basic options
157
104
  parser.add_argument('-v', '--version', action='version',
@@ -168,6 +115,9 @@ def struphy():
168
115
  help='display available hybrid models')
169
116
  parser.add_argument('--toy', action='store_true',
170
117
  help='display available toy models')
118
+ parser.add_argument('--refresh-models',
119
+ help='refresh list of available model names',
120
+ action='store_true',)
171
121
  parser.add_argument('--set-i',
172
122
  type=str,
173
123
  metavar='PATH',
@@ -364,6 +314,24 @@ def struphy():
364
314
  parser_params.add_argument('-y', '--yes',
365
315
  help='Say yes on prompt to overwrite .yml FILE',
366
316
  action='store_true')
317
+
318
+ parser_run.add_argument('--likwid',
319
+ help='run with Likwid',
320
+ action='store_true',)
321
+
322
+ parser_run.add_argument('-li', '--likwid-inp',
323
+ type=str,
324
+ metavar='FILE',
325
+ help='likwid parameter file (.yml) in current I/O path',)
326
+
327
+ parser_run.add_argument('--likwid-input-abs',
328
+ type=str,
329
+ metavar='FILE',
330
+ help='likwid parameter file (.yml), absolute path',)
331
+ parser_run.add_argument('-lr', '--likwid-repetitions',
332
+ type=int,
333
+ help='number of repetitions of the same simulation',
334
+ default=1,)
367
335
 
368
336
  # 5. "profile" sub-command
369
337
  parser_profile = subparsers.add_parser(
@@ -432,6 +400,10 @@ def struphy():
432
400
  help='divide each grid cell by N for field evaluation (default=1)',
433
401
  default=1)
434
402
 
403
+ parser_pproc.add_argument('--physical',
404
+ help='in addition to logical components, evaluates push-forwarded physical (xyz) components',
405
+ action='store_true')
406
+
435
407
  # 7. "test" sub-command
436
408
  parser_test = subparsers.add_parser('test',
437
409
  formatter_class=lambda prog: argparse.RawTextHelpFormatter(
@@ -442,11 +414,17 @@ def struphy():
442
414
  parser_test.add_argument('group',
443
415
  type=str,
444
416
  choices=list_models +
445
- ['models'] + ['unit'] +
446
- ['tutorials'] + ['timings'],
417
+ ['models'] +
418
+ ['unit'] +
419
+ ['tutorials'] +
420
+ ['timings'] +
421
+ ['fluid'] +
422
+ ['kinetic'] +
423
+ ['hybrid'] +
424
+ ['toy'],
447
425
  metavar='GROUP',
448
426
  help='can be either:\na) a model name (tests on 1 MPI process in "Cuboid", "HollowTorus" and "Tokamak" geometries) \
449
- \nb) "models" for quick testing of all models \
427
+ \nb) "models" for quick testing of all models (or "fluid", "kinetic", "hybrid", "toy" for testing just a sub-group) \
450
428
  \nc) "unit" for performing unit tests \
451
429
  \nd) "tutorials" for notebook tutorials, see `https://struphy.pages.mpcdf.de/struphy/sections/tutorials.html`_ \
452
430
  \ne) "timings" for creating .html and .json files of test metrics (include --verbose to print metrics to screen)',)
@@ -461,6 +439,10 @@ def struphy():
461
439
  help='test model(s) just in slab geometry (Cuboid)',
462
440
  action='store_true')
463
441
 
442
+ parser_test.add_argument('--with-desc',
443
+ help='include DESC equilibrium in tests (mem consuming)',
444
+ action='store_true')
445
+
464
446
  parser_test.add_argument('-v', '--verbose',
465
447
  help='print timings to screen',
466
448
  action='store_true')
@@ -614,6 +596,88 @@ def struphy():
614
596
  subprocess.run(['struphy', '--set-b', b_path])
615
597
 
616
598
  exit()
599
+
600
+ if args.refresh_models:
601
+
602
+ print('Collecting available models ...')
603
+
604
+ import inspect
605
+ from struphy.models import fluid, kinetic, hybrid, toy
606
+ import pickle
607
+
608
+ list_fluid = []
609
+ fluid_string = ''
610
+ for name, obj in inspect.getmembers(fluid):
611
+ if inspect.isclass(obj):
612
+ if name not in {'StruphyModel', 'Propagator'}:
613
+ list_fluid += [name]
614
+ fluid_string += '"' + name + '"\n'
615
+
616
+ list_kinetic = []
617
+ kinetic_string = ''
618
+ for name, obj in inspect.getmembers(kinetic):
619
+ if inspect.isclass(obj):
620
+ if name not in {'StruphyModel', 'Propagator'}:
621
+ list_kinetic += [name]
622
+ kinetic_string += '"' + name + '"\n'
623
+
624
+ list_hybrid = []
625
+ hybrid_string = ''
626
+ for name, obj in inspect.getmembers(hybrid):
627
+ if inspect.isclass(obj):
628
+ if name not in {'StruphyModel', 'Propagator'}:
629
+ list_hybrid += [name]
630
+ hybrid_string += '"' + name + '"\n'
631
+
632
+ list_toy = []
633
+ toy_string = ''
634
+ for name, obj in inspect.getmembers(toy):
635
+ if inspect.isclass(obj):
636
+ if name not in {'StruphyModel', 'Propagator'}:
637
+ list_toy += [name]
638
+ toy_string += '"' + name + '"\n'
639
+
640
+ list_models = list_fluid + list_kinetic + list_hybrid + list_toy
641
+
642
+ with open(os.path.join(libpath, 'models', 'models_list'), "wb") as fp:
643
+ pickle.dump(list_models, fp)
644
+
645
+ # fluid message
646
+ fluid_message = 'Fluid models:\n'
647
+ fluid_message += '-------------\n'
648
+ fluid_message += fluid_string
649
+
650
+ # kinetic message
651
+ kinetic_message = 'Kinetic models:\n'
652
+ kinetic_message += '---------------\n'
653
+ kinetic_message += kinetic_string
654
+
655
+ # hybrid message
656
+ hybrid_message = 'Hybrid models:\n'
657
+ hybrid_message += '--------------\n'
658
+ hybrid_message += hybrid_string
659
+
660
+ # toy message
661
+ toy_message = 'Toy models:\n'
662
+ toy_message += '-----------\n'
663
+ toy_message += toy_string
664
+
665
+ # model message
666
+ model_message = 'run one of the following models:\n'
667
+ model_message += '\n' + fluid_message
668
+ model_message += '\n' + kinetic_message
669
+ model_message += '\n' + hybrid_message
670
+ model_message += '\n' + toy_message
671
+
672
+ with open(os.path.join(libpath, 'models', 'models_message'), "wb") as fp:
673
+ pickle.dump([model_message,
674
+ fluid_message,
675
+ kinetic_message,
676
+ hybrid_message,
677
+ toy_message], fp)
678
+
679
+ print('Done.')
680
+ exit()
617
681
 
618
682
  # load sub-command function (see functions below)
619
683
  func = locals()['struphy_' + args.command]
@@ -630,6 +694,7 @@ def struphy():
630
694
  kwargs.pop('set_o')
631
695
  kwargs.pop('set_b')
632
696
  kwargs.pop('set_iob')
697
+ kwargs.pop('refresh_models')
633
698
 
634
699
  # start sub-command function with all parameters of that function
635
700
  # for k, v in kwargs.items():
@@ -1,4 +1,4 @@
1
- def struphy_pproc(dirr, dir_abs=None, step=1, celldivide=1):
1
+ def struphy_pproc(dirr, dir_abs=None, step=1, celldivide=1, physical=False):
2
2
  """
3
3
  Post process data from finished Struphy runs.
4
4
 
@@ -15,6 +15,9 @@ def struphy_pproc(dirr, dir_abs=None, step=1, celldivide=1):
15
15
 
16
16
  celldivide : int, optional
17
17
  Number of grid point in each cell used to create vtk files (default=1).
18
+
19
+ physical : bool
20
+ Wether to do post-processing into push-forwarded physical (xyz) components of fields.
18
21
  """
19
22
  import subprocess
20
23
  import os
@@ -34,13 +37,18 @@ def struphy_pproc(dirr, dir_abs=None, step=1, celldivide=1):
34
37
 
35
38
  print(f'Post processing data in {dir_abs}')
36
39
 
40
+ command = ['python3',
41
+ 'post_processing/pproc_struphy.py',
42
+ dir_abs,
43
+ '-s',
44
+ str(step),
45
+ '--celldivide',
46
+ str(celldivide)]
47
+
48
+ if physical:
49
+ command += ['--physical']
50
+
37
51
  # loop over output folders and call post-processing .py file
38
- subprocess.run(['python3',
39
- 'post_processing/pproc_struphy.py',
40
- dir_abs,
41
- '-s',
42
- str(step),
43
- '--celldivide',
44
- str(celldivide)],
52
+ subprocess.run(command,
45
53
  cwd=libpath,
46
54
  check=True)