struphy 3.0.4__tar.gz → 3.1.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.
- struphy-3.1.0/PKG-INFO +239 -0
- struphy-3.1.0/README.md +132 -0
- {struphy-3.0.4 → struphy-3.1.0}/pyproject.toml +30 -21
- struphy-3.1.0/src/struphy/__init__.py +152 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/api/simulation/__init__.py +3 -1
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/bsplines/tests/test_bsplines_kers.py +58 -44
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/bsplines/tests/test_eval_spline_mpi.py +236 -160
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/conftest.py +20 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/console/compile.py +28 -24
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/console/format.py +66 -64
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/console/likwid.py +6 -3
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/console/main.py +16 -11
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/console/params.py +8 -5
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/console/profile.py +27 -22
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/console/test.py +4 -1
- struphy-3.0.4/src/struphy/console/tests/test_console.py → struphy-3.1.0/src/struphy/console/tests/xx_test_console.py +7 -4
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/diagnostics/console_diagn.py +4 -1
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/diagnostics/diagn_tools.py +10 -7
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/diagnostics/paraview/mesh_creator.py +6 -2
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/dispersion_relations/analytic.py +6 -2
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/examples/_draw_parallel.py +21 -12
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/feec/basis_projection_ops.py +54 -48
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/feec/local_projectors_kernels.py +46 -46
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/feec/mass.py +885 -1466
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/feec/preconditioner.py +69 -28
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/feec/projectors.py +294 -397
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/feec/psydac_derham.py +1485 -833
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/feec/tests/test_basis_ops.py +121 -121
- struphy-3.1.0/src/struphy/feec/tests/test_derham.py +160 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/feec/tests/test_eval_field.py +90 -75
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/feec/tests/test_field_init.py +159 -128
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/feec/tests/test_l2_projectors.py +67 -40
- struphy-3.1.0/src/struphy/feec/tests/test_local_matrix_vector.py +111 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/feec/tests/test_local_projectors.py +153 -131
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/feec/tests/test_lowdim_nel_is_1.py +71 -64
- struphy-3.1.0/src/struphy/feec/tests/test_mass_matrices.py +1150 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/feec/tests/test_toarray_struphy.py +25 -11
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/feec/tests/test_tosparse_struphy.py +23 -10
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/feec/tests/xx_test_preconds.py +22 -8
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/feec/utilities.py +72 -30
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/feec/utilities_local_projectors.py +46 -46
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/feec/variational_utilities.py +59 -59
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/fields_background/base.py +98 -13
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/fields_background/coil_fields/coil_fields.py +26 -21
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/fields_background/equils.py +57 -51
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/fields_background/mhd_equil/eqdsk/readeqdsk.py +13 -11
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/fields_background/projected_equils.py +12 -9
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/fields_background/tests/test_desc_equil.py +6 -3
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/fields_background/tests/test_mhd_equils.py +52 -77
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/geometry/base.py +185 -68
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/geometry/domains.py +40 -40
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/geometry/evaluation_kernels.py +6 -6
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/geometry/mappings_kernels.py +129 -177
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/geometry/tests/test_domain.py +86 -75
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/geometry/utilities.py +34 -16
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/initial/base.py +58 -3
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/initial/eigenfunctions.py +43 -31
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/initial/perturbations.py +29 -6
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/initial/tests/test_init_perturbations.py +17 -10
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/io/options.py +120 -45
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/io/output_handling.py +7 -4
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/io/setup.py +30 -107
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/kernel_arguments/local_projectors_args_kernels.py +3 -3
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/kernel_arguments/pusher_args_kernels.py +4 -4
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/kinetic_background/tests/test_base.py +4 -4
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/kinetic_background/tests/test_maxwellians.py +149 -125
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/linear_algebra/saddle_point.py +43 -43
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/linear_algebra/tests/test_saddle_point_propagator.py +57 -63
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/linear_algebra/tests/test_saddlepoint_massmatrices.py +41 -34
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/linear_algebra/tests/test_stencil_dot_kers.py +84 -72
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/linear_algebra/tests/test_stencil_transpose_kers.py +85 -73
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/models/__init__.py +2 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/models/base.py +290 -157
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/models/cold_plasma.py +51 -28
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/models/cold_plasma_vlasov.py +81 -48
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/models/deterministic_particle_diffusion.py +8 -10
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/models/drift_kinetic_electrostatic_adiabatic.py +47 -34
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/models/guiding_center.py +47 -36
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/models/hasegawa_wakatani.py +17 -14
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/models/linear_extended_mh_duniform.py +59 -39
- struphy-3.1.0/src/struphy/models/linear_mhd.py +287 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/models/linear_mhd_driftkinetic_cc.py +64 -75
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/models/linear_mhd_vlasov_cc.py +53 -58
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/models/linear_mhd_vlasov_pc.py +52 -87
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/models/linear_vlasov_ampere_one_species.py +51 -22
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/models/linear_vlasov_maxwell_one_species.py +44 -20
- struphy-3.1.0/src/struphy/models/maxwell.py +162 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/models/poisson.py +23 -14
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/models/pressure_less_sph.py +34 -18
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/models/random_particle_diffusion.py +8 -10
- struphy-3.1.0/src/struphy/models/scalars.py +355 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/models/shear_alfven.py +30 -38
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/models/species.py +48 -69
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/models/tests/default_params/test_models.py +5 -1
- struphy-3.1.0/src/struphy/models/tests/test_examples.py +67 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/models/tests/utils_testing.py +43 -3
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/models/tests/verification/test_verif_LinearMHD.py +10 -8
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/models/tests/verification/test_verif_Maxwell.py +14 -12
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/models/tests/verification/test_verif_Poisson.py +8 -4
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/models/tests/verification/test_verif_ViscousEulerSPH.py +6 -10
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/models/tests/verification/test_verif_VlasovAmpereOneSpecies.py +12 -11
- struphy-3.1.0/src/struphy/models/toy_drift.py +216 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/models/two_fluid_quasi_neutral_toy.py +50 -15
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/models/utils.py +11 -9
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/models/variables.py +178 -17
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/models/variational_barotropic_fluid.py +24 -25
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/models/variational_compressible_fluid.py +21 -25
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/models/variational_pressureless_fluid.py +17 -15
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/models/visco_resistive_deltaf_mhd.py +39 -57
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/models/visco_resistive_deltaf_mhd_with_q.py +36 -41
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/models/visco_resistive_linear_mhd.py +38 -56
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/models/visco_resistive_linear_mhd_with_q.py +35 -40
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/models/visco_resistive_mhd.py +31 -41
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/models/visco_resistive_mhd_with_p.py +34 -38
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/models/visco_resistive_mhd_with_q.py +34 -38
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/models/viscous_euler_sph.py +23 -17
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/models/viscous_fluid.py +29 -34
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/models/vlasov.py +30 -20
- struphy-3.1.0/src/struphy/models/vlasov_ampere_one_species.py +348 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/models/vlasov_maxwell_one_species.py +98 -44
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/ode/tests/test_ode_feec.py +17 -11
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/particles/parameters.py +6 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/physics/physics.py +6 -3
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/pic/accumulation/accum_kernels.py +14 -14
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/pic/accumulation/filler_kernels.py +4 -4
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/pic/accumulation/filter.py +13 -13
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/pic/accumulation/filter_kernels.py +4 -4
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/pic/accumulation/particle_to_mat_kernels.py +2 -2
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/pic/accumulation/particles_to_grid.py +48 -24
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/pic/base.py +163 -64
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/pic/particles.py +2 -2
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/pic/pushing/eval_kernels_gc.py +5 -1
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/pic/pushing/pusher.py +13 -9
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/pic/pushing/pusher_kernels.py +10 -10
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/pic/sobol_seq.py +14 -10
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/pic/tests/test_accum_vec_H1.py +31 -18
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/pic/tests/test_draw_parallel.py +29 -20
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/pic/tests/test_mat_vec_filler.py +80 -65
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/pic/tests/test_pushers.py +122 -64
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/pic/tests/test_sorting.py +20 -7
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/pic/tests/test_sph.py +273 -66
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/pic/tests/test_tesselation.py +7 -4
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/pic/utilities.py +14 -13
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/pic/utilities_kernels.py +1 -1
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/polar/basic.py +22 -17
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/polar/extraction_operators.py +8 -8
- struphy-3.1.0/src/struphy/polar/tests/test_polar.py +412 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/post_processing/cprofile_analyser.py +32 -27
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/post_processing/likwid/likwid_parser.py +10 -7
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/post_processing/likwid/plot_likwidproject.py +20 -18
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/post_processing/likwid/plot_time_traces.py +9 -6
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/post_processing/likwid/roofline_plotter.py +20 -17
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/post_processing/orbits/orbits_tools.py +5 -2
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/post_processing/post_processing_tools.py +68 -65
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/post_processing/profile_struphy.py +28 -23
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/propagators/base.py +11 -8
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/propagators/propagators_coupling.py +56 -82
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/propagators/propagators_fields.py +647 -1199
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/propagators/propagators_markers.py +26 -24
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/propagators/tests/test_gyrokinetic_poisson.py +71 -65
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/propagators/tests/test_poisson.py +60 -58
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/simulation/base.py +29 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/simulation/sim.py +411 -170
- struphy-3.1.0/src/struphy/topology/grids.py +53 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/utils/clone_config.py +12 -8
- struphy-3.1.0/src/struphy/utils/cupy_vs_numpy.py +30 -0
- struphy-3.1.0/src/struphy/utils/docstring_converter.py +1087 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/utils/test_clone_config.py +8 -4
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/utils/utils.py +93 -15
- struphy-3.1.0/src/struphy.egg-info/PKG-INFO +239 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy.egg-info/SOURCES.txt +6 -1
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy.egg-info/requires.txt +29 -20
- struphy-3.0.4/PKG-INFO +0 -235
- struphy-3.0.4/README.md +0 -137
- struphy-3.0.4/src/struphy/__init__.py +0 -44
- struphy-3.0.4/src/struphy/feec/tests/test_derham.py +0 -73
- struphy-3.0.4/src/struphy/feec/tests/test_mass_matrices.py +0 -1060
- struphy-3.0.4/src/struphy/models/linear_mhd.py +0 -172
- struphy-3.0.4/src/struphy/models/maxwell.py +0 -99
- struphy-3.0.4/src/struphy/models/vlasov_ampere_one_species.py +0 -247
- struphy-3.0.4/src/struphy/polar/tests/test_polar.py +0 -378
- struphy-3.0.4/src/struphy/topology/grids.py +0 -26
- struphy-3.0.4/src/struphy/utils/cupy_vs_numpy.py +0 -27
- struphy-3.0.4/src/struphy.egg-info/PKG-INFO +0 -235
- {struphy-3.0.4 → struphy-3.1.0}/LICENSE +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/setup.cfg +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/api/__init__.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/api/domains/__init__.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/api/equils/__init__.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/api/grids/__init__.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/api/maxwellians/__init__.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/api/models/__init__.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/api/ode/__init__.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/api/options/__init__.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/api/particles/__init__.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/api/perturbations/__init__.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/api/post_processing/__init__.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/bsplines/__init__.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/bsplines/bsplines.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/bsplines/bsplines_kernels.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/bsplines/evaluation_kernels_1d.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/bsplines/evaluation_kernels_2d.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/bsplines/evaluation_kernels_3d.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/bsplines/shapefunc_kernels.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/bsplines/tests/__init__.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/compile_struphy.mk +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/console/__init__.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/console/parsers.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/dependencies.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/diagnostics/__init__.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/diagnostics/paraview/__init__.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/diagnostics/paraview/vtk_writer.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/dispersion_relations/__init__.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/dispersion_relations/base.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/dispersion_relations/utilities.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/eigenvalue_solvers/derivatives.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/examples/restelli2018/__init__.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/examples/restelli2018/callables.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/feec/__init__.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/feec/banded_to_stencil_kernels.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/feec/basis_projection_kernels.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/feec/linear_operators.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/feec/mass_kernels.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/feec/tests/__init__.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/feec/utilities_kernels.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/fields_background/__init__.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/fields_background/coil_fields/__init__.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/fields_background/coil_fields/base.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/fields_background/mhd_equil/__init__.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/fields_background/mhd_equil/eqdsk/__init__.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/fields_background/mhd_equil/eqdsk/data/AUGNLED_g031213.00830.high +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/fields_background/mhd_equil/eqdsk/data/__init__.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/fields_background/mhd_equil/gvec/__init__.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/fields_background/mhd_equil/gvec/output/__init__.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/fields_background/mhd_equil/gvec/output/vtk/__init__.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/fields_background/mhd_equil/gvec/run_01/CIRCTOK_State_0000_00000000.dat +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/fields_background/mhd_equil/gvec/run_01/CIRCTOK_State_0000_00001000.dat +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/fields_background/mhd_equil/gvec/run_01/parameter.ini +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/fields_background/mhd_equil/gvec/run_02/W7X_State_0000_00000000.dat +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/fields_background/mhd_equil/gvec/run_02/W7X_State_0000_00000100.dat +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/fields_background/mhd_equil/gvec/run_02/parameter-w7x.ini +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/fields_background/mhd_equil/gvec/run_03/NEO-SPITZER_State_0000_00000000.dat +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/fields_background/mhd_equil/gvec/run_03/NEO-SPITZER_State_0000_00003307.dat +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/fields_background/mhd_equil/gvec/run_03/Neo-spitzer-mirror23-well-opt-1-AR10-1.nc +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/fields_background/mhd_equil/gvec/run_03/parameter-fig8.ini +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/fields_background/mhd_equil/vmec/__init__.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/fields_background/tests/__init__.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/fields_background/tests/test_generic_equils.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/fields_background/tests/test_numerical_mhd_equil.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/geometry/__init__.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/geometry/map_coef/__init__.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/geometry/tests/__init__.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/geometry/transform_kernels.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/geometry/utilities_kernels.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/initial/__init__.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/initial/tests/__init__.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/initial/utilities.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/io/__init__.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/kernel_arguments/__init__.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/kinetic_background/__init__.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/kinetic_background/base.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/kinetic_background/maxwellians.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/kinetic_background/moment_functions.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/kinetic_background/tests/__init__.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/linear_algebra/__init__.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/linear_algebra/linalg_kernels.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/linear_algebra/linalg_kron.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/linear_algebra/schur_solver.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/linear_algebra/solver.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/linear_algebra/stencil_dot_kernels.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/linear_algebra/stencil_transpose_kernels.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/linear_algebra/tests/__init__.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/models/tests/__init__.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/models/tests/default_params/__init__.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/models/tests/verification/__init__.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/ode/__init__.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/ode/solvers.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/ode/tests/__init__.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/ode/utils.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/particles/__init__.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/physics/__init__.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/pic/__init__.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/pic/accumulation/__init__.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/pic/accumulation/accum_kernels_gc.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/pic/pushing/__init__.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/pic/pushing/pusher_kernels_gc.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/pic/pushing/pusher_utilities_kernels.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/pic/sampling_kernels.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/pic/sorting_kernels.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/pic/sph_eval_kernels.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/pic/sph_smoothing_kernels.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/pic/tests/__init__.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/pic/tests/test_binning.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/pic/tests/test_set_zero_velocity.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/polar/__init__.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/polar/linear_operators.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/polar/tests/__init__.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/post_processing/__init__.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/post_processing/likwid/__init__.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/post_processing/likwid/hardware_dicts.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/post_processing/likwid/maxplotlylib.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/post_processing/orbits/__init__.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/post_processing/orbits/orbits_kernels.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/post_processing/tests/__init__.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/propagators/__init__.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/propagators/tests/__init__.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/simulation/__init__.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/topology/__init__.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/utils/__init__.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy/utils/pyccel.py +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy.egg-info/dependency_links.txt +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy.egg-info/entry_points.txt +0 -0
- {struphy-3.0.4 → struphy-3.1.0}/src/struphy.egg-info/top_level.txt +0 -0
struphy-3.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: struphy
|
|
3
|
+
Version: 3.1.0
|
|
4
|
+
Summary: Multi-model plasma physics package
|
|
5
|
+
Author: Max Planck Institute for Plasma Physics
|
|
6
|
+
Author-email: stefan.possanner@ipp.mpg.de, max.lindqvist@ipp.mpg.de, eric.sonnendruecker@ipp.mpg.de
|
|
7
|
+
License: Copyright (c) 2019-2026, Struphy developers, Max Planck Institute for Plasma Physics
|
|
8
|
+
|
|
9
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
|
|
10
|
+
associated documentation files (the "Software"), to deal in the Software without restriction,
|
|
11
|
+
including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
12
|
+
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
|
|
13
|
+
subject to the following conditions:
|
|
14
|
+
|
|
15
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial
|
|
16
|
+
portions of the Software.
|
|
17
|
+
|
|
18
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
|
|
19
|
+
NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
20
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
21
|
+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
22
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
23
|
+
Project-URL: homepage, https://struphy-hub.github.io/struphy/index.html
|
|
24
|
+
Project-URL: documentation, https://struphy-hub.github.io/struphy/index.html
|
|
25
|
+
Project-URL: repository, https://github.com/struphy-hub/struphy
|
|
26
|
+
Project-URL: changelog, https://github.com/struphy-hub/struphy/blob/devel/CHANGELOG.md
|
|
27
|
+
Project-URL: Bug Tracker, https://github.com/struphy-hub/struphy/issues
|
|
28
|
+
Keywords: plasma physics, fusion, numerical modeling, partial differential equations, energetic particles
|
|
29
|
+
Classifier: Programming Language :: Python :: 3
|
|
30
|
+
Requires-Python: >=3.10
|
|
31
|
+
Description-Content-Type: text/markdown
|
|
32
|
+
License-File: LICENSE
|
|
33
|
+
Requires-Dist: numpy<=2.4.3
|
|
34
|
+
Requires-Dist: cunumpy<=0.1.1
|
|
35
|
+
Requires-Dist: pyccel<=2.2.3,>=2.1
|
|
36
|
+
Requires-Dist: feectools<=0.1.3
|
|
37
|
+
Requires-Dist: scipy<=1.17.1
|
|
38
|
+
Requires-Dist: h5py<=3.16.0
|
|
39
|
+
Requires-Dist: matplotlib<=3.10.8
|
|
40
|
+
Requires-Dist: pyyaml<=6.0.3
|
|
41
|
+
Requires-Dist: vtk<=9.6.1
|
|
42
|
+
Requires-Dist: tqdm<=4.67.3
|
|
43
|
+
Requires-Dist: argcomplete<=3.6.3
|
|
44
|
+
Requires-Dist: ipywidgets<=8.1.8
|
|
45
|
+
Requires-Dist: plotly<=6.6.0
|
|
46
|
+
Requires-Dist: pyvista<=0.47.3
|
|
47
|
+
Requires-Dist: trame<=3.12.0
|
|
48
|
+
Requires-Dist: trame-vtk<=2.11.8
|
|
49
|
+
Requires-Dist: trame-vuetify<=3.2.1
|
|
50
|
+
Requires-Dist: nest_asyncio2<=1.7.2
|
|
51
|
+
Requires-Dist: vtk<=9.6.1
|
|
52
|
+
Requires-Dist: pytest<=9.0.3
|
|
53
|
+
Requires-Dist: pytest-mpi<=0.6
|
|
54
|
+
Requires-Dist: pytest-testmon<=2.2.0
|
|
55
|
+
Requires-Dist: ruff<=0.15.11,>=0.15.0
|
|
56
|
+
Requires-Dist: line_profiler<=5.0.2
|
|
57
|
+
Requires-Dist: scope-profiler<=0.1.9,>=0.1.7
|
|
58
|
+
Requires-Dist: jax-finufft<=1.2.0
|
|
59
|
+
Provides-Extra: phys
|
|
60
|
+
Requires-Dist: gvec<=1.4.1,>=1.1.0; extra == "phys"
|
|
61
|
+
Requires-Dist: desc-opt<=0.17.1; extra == "phys"
|
|
62
|
+
Provides-Extra: dev
|
|
63
|
+
Requires-Dist: struphy[mpi]; extra == "dev"
|
|
64
|
+
Requires-Dist: notebook<=7.5.5; extra == "dev"
|
|
65
|
+
Requires-Dist: autopep8<=2.3.2; extra == "dev"
|
|
66
|
+
Requires-Dist: isort<=8.0.1; extra == "dev"
|
|
67
|
+
Requires-Dist: flake8<=7.3.0; extra == "dev"
|
|
68
|
+
Requires-Dist: pylint<=4.0.5; extra == "dev"
|
|
69
|
+
Requires-Dist: ssort<=0.16.0; extra == "dev"
|
|
70
|
+
Requires-Dist: add-trailing-comma<=4.0.0; extra == "dev"
|
|
71
|
+
Requires-Dist: pre-commit<=4.6.0; extra == "dev"
|
|
72
|
+
Requires-Dist: nbstripout<=0.9.1; extra == "dev"
|
|
73
|
+
Requires-Dist: tabulate<=0.10.0; extra == "dev"
|
|
74
|
+
Requires-Dist: tomli-w<=1.2.0; extra == "dev"
|
|
75
|
+
Requires-Dist: kaleido<=1.2.0; extra == "dev"
|
|
76
|
+
Requires-Dist: pandas<=3.0.2; extra == "dev"
|
|
77
|
+
Provides-Extra: mpi
|
|
78
|
+
Requires-Dist: mpi4py<=4.1.1; extra == "mpi"
|
|
79
|
+
Provides-Extra: doc
|
|
80
|
+
Requires-Dist: struphy[phys]; extra == "doc"
|
|
81
|
+
Requires-Dist: jupyter<=1.1.1; extra == "doc"
|
|
82
|
+
Requires-Dist: nbconvert<=6.5.4; extra == "doc"
|
|
83
|
+
Requires-Dist: ipykernel<=7.2.0; extra == "doc"
|
|
84
|
+
Requires-Dist: sphinx<=9.1.0; extra == "doc"
|
|
85
|
+
Requires-Dist: sphinx-design<=0.7.0; extra == "doc"
|
|
86
|
+
Requires-Dist: lxml_html_clean<=0.4.4; extra == "doc"
|
|
87
|
+
Requires-Dist: sphinxcontrib-napoleon<=0.7; extra == "doc"
|
|
88
|
+
Requires-Dist: sphinx-copybutton<=0.5.2; extra == "doc"
|
|
89
|
+
Requires-Dist: sphinx-collections<=0.3.1; extra == "doc"
|
|
90
|
+
Requires-Dist: pydata-sphinx-theme<=0.17.1; extra == "doc"
|
|
91
|
+
Requires-Dist: nbsphinx<=0.9.8; extra == "doc"
|
|
92
|
+
Requires-Dist: m2r2<=0.3.4; extra == "doc"
|
|
93
|
+
Requires-Dist: myst-parser<=5.0.0; extra == "doc"
|
|
94
|
+
Requires-Dist: mistune<=0.8.4; extra == "doc"
|
|
95
|
+
Requires-Dist: docutils<=0.22.4; extra == "doc"
|
|
96
|
+
Requires-Dist: ipyparallel<=9.1.0; extra == "doc"
|
|
97
|
+
Provides-Extra: likwid
|
|
98
|
+
Requires-Dist: struphy[dev]; extra == "likwid"
|
|
99
|
+
Requires-Dist: pylikwid; extra == "likwid"
|
|
100
|
+
Provides-Extra: all
|
|
101
|
+
Requires-Dist: struphy[phys]; extra == "all"
|
|
102
|
+
Requires-Dist: struphy[dev]; extra == "all"
|
|
103
|
+
Requires-Dist: struphy[mpi]; extra == "all"
|
|
104
|
+
Requires-Dist: struphy[doc]; extra == "all"
|
|
105
|
+
Requires-Dist: struphy[likwid]; extra == "all"
|
|
106
|
+
Dynamic: license-file
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+

|
|
111
|
+
|
|
112
|
+
<p>
|
|
113
|
+
|
|
114
|
+
<a href="https://github.com/struphy-hub/struphy/releases"><img src="https://img.shields.io/github/v/release/struphy-hub/struphy?label=Release" alt="Release"></a> <a href="https://github.com/struphy-hub/struphy/blob/devel/LICENSE"><img src="https://img.shields.io/badge/License-MIT-violet" alt="License"></a> <a href="https://mybinder.org/v2/gh/struphy-hub/struphy-tutorials/main"><img src="https://img.shields.io/badge/launch-tutorials-579ACA.svg?logo=data:image/png;base64,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" alt="badge"></a> <a href="https://github.com/struphy-hub/struphy/actions/workflows/scheduled-ubuntu.yml"><img src="https://github.com/struphy-hub/struphy/actions/workflows/scheduled-ubuntu.yml/badge.svg" alt="Ubuntu latest"></a> <a href="https://github.com/struphy-hub/struphy/actions/workflows/scheduled-macos.yml"><img src="https://github.com/struphy-hub/struphy/actions/workflows/scheduled-macos.yml/badge.svg" alt="MacOS latest"></a> <a href="https://github.com/struphy-hub/struphy/actions/workflows/static_analysis.yml"><img src="https://github.com/struphy-hub/struphy/actions/workflows/static_analysis.yml/badge.svg" alt="isort and ruff"></a> <a href="https://pypi.org/project/struphy/"><img src="https://img.shields.io/pypi/v/struphy?label=PyPI" alt="PyPI"></a> <a href="https://pypi.org/project/struphy/"><img src="https://img.shields.io/pypi/dm/struphy.svg?label=PyPI%20downloads" alt="PyPI Downloads"></a>
|
|
115
|
+
</p>
|
|
116
|
+
|
|
117
|
+
# Welcome!
|
|
118
|
+
|
|
119
|
+
**This is a Python package for solving partial differential equations (PDEs) mainly - but not exclusively - for plasma physics.**
|
|
120
|
+
|
|
121
|
+
**STRUPHY** stands for **STRU**cture-**P**reserving **HY**brid code (or **STRU**cture-preserving **PHY**sics code). The package provides off-the-shelf models for plasma physics problems, such as
|
|
122
|
+
|
|
123
|
+
- Maxwell’s equations
|
|
124
|
+
- Magneto-hydrodynamics (MHD)
|
|
125
|
+
- Vlasov-Poisson and Vlasov-Maxwell kinetic models
|
|
126
|
+
- Drift-kinetic models for strongly magnetized plasma
|
|
127
|
+
- MHD-kinetic hybrid models
|
|
128
|
+
|
|
129
|
+
All models can be run on multiple cores through MPI (distributed memory) and OpenMP (shared memory). The compute-intensive parts of the code are translated and compiled (“transpiled”) using [pyccel](https://github.com/pyccel/pyccel), giving you the speed of Fortran or C while working within the familiar Python environment.
|
|
130
|
+
|
|
131
|
+
The code is freely available under an [MIT license](https://github.com/struphy-hub/struphy/blob/devel/LICENSE) - Copyright (c) 2019-2026, Struphy developers, Max Planck Institute for Plasma Physics.
|
|
132
|
+
|
|
133
|
+

|
|
134
|
+
|
|
135
|
+
## Tutorials
|
|
136
|
+
|
|
137
|
+
Get familiar with Struphy right away on [mybinder](https://mybinder.org/v2/gh/struphy-hub/struphy-tutorials/main) - no installation needed.
|
|
138
|
+
|
|
139
|
+
## Quick install
|
|
140
|
+
|
|
141
|
+
Quick install on your computer (using a virtual environment):
|
|
142
|
+
|
|
143
|
+
python -m venv struphy_env
|
|
144
|
+
source struphy_env/bin/activate
|
|
145
|
+
pip install -U pip
|
|
146
|
+
pip install -U struphy
|
|
147
|
+
struphy compile
|
|
148
|
+
|
|
149
|
+
In case you face troubles with install/compile:
|
|
150
|
+
|
|
151
|
+
1. check the [prerequisites](https://struphy-hub.github.io/struphy/sections/install.html#requirements)
|
|
152
|
+
2. visit [trouble shooting](https://struphy-hub.github.io/struphy/sections/install.html#trouble-shooting)
|
|
153
|
+
|
|
154
|
+
## Python API
|
|
155
|
+
|
|
156
|
+
Try out the Python API in a Jupyter notebook or any Python environment. For example, you can create a simulation object and show the domain and equilibrium magnetic field of the linear MHD model via
|
|
157
|
+
|
|
158
|
+
``` python
|
|
159
|
+
from struphy import (
|
|
160
|
+
Simulation,
|
|
161
|
+
domains,
|
|
162
|
+
equils,
|
|
163
|
+
)
|
|
164
|
+
from struphy.models import LinearMHD
|
|
165
|
+
|
|
166
|
+
model = LinearMHD()
|
|
167
|
+
|
|
168
|
+
domain = domains.DESCunit()
|
|
169
|
+
equil = equils.DESCequilibrium(use_nfp=False)
|
|
170
|
+
|
|
171
|
+
sim = Simulation(
|
|
172
|
+
model=model,
|
|
173
|
+
domain=domain,
|
|
174
|
+
equil=equil,
|
|
175
|
+
)
|
|
176
|
+
|
|
177
|
+
sim.show_domain(scalars="absB0", window_size = (850, 250), zoom_factor=2.0)
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+

|
|
181
|
+
|
|
182
|
+
This will show the domain and equilibrium magnetic field of the linear MHD model. You can find more examples in the [documentation](https://struphy-hub.github.io/struphy/index.html).
|
|
183
|
+
|
|
184
|
+
## Quick run
|
|
185
|
+
|
|
186
|
+
As an example, let’s say we want to solve Maxwell’s equations. We can use the CLI and generate a default launch file via
|
|
187
|
+
|
|
188
|
+
struphy params Maxwell
|
|
189
|
+
|
|
190
|
+
Hit yes when prompted - this will create the file `params_Maxwell.py` in your current working directory (cwd). You can open the file and - if you feel like it already - change some parameters, then run
|
|
191
|
+
|
|
192
|
+
python params_Maxwell.py
|
|
193
|
+
|
|
194
|
+
The default output is in `sim_1/` in your cwd. You can change the output path via the class `EnvironmentOptions` in the parameter file.
|
|
195
|
+
|
|
196
|
+
Parallel simulations are run for example with
|
|
197
|
+
|
|
198
|
+
pip install -U mpi4py
|
|
199
|
+
mpirun -n 4 python params_Maxwell.py
|
|
200
|
+
|
|
201
|
+
You can also put the run command in a batch script.
|
|
202
|
+
|
|
203
|
+
## Docker
|
|
204
|
+
|
|
205
|
+
If you want to get started right away without installing anything, you can use the [Docker image](https://hub.docker.com/r/spossann/struphy) - just pull and run:
|
|
206
|
+
|
|
207
|
+
docker pull spossann/struphy:main
|
|
208
|
+
docker run -it --rm spossann/struphy:main
|
|
209
|
+
ls struphy_*
|
|
210
|
+
|
|
211
|
+
This will show three available Struphy environments, which you can activate for example via
|
|
212
|
+
|
|
213
|
+
source struphy_fortran_/env_fortran_/bin/activate
|
|
214
|
+
|
|
215
|
+
There is also a [Docker image with just the prerequisites](https://hub.docker.com/r/spossann/ubuntu-for-struphy) (on Ubuntu), so you can install and compile Struphy on top of it yourself:
|
|
216
|
+
|
|
217
|
+
docker pull spossann/ubuntu-for-struphy:main
|
|
218
|
+
docker run -it --rm spossann/ubuntu-for-struphy:main
|
|
219
|
+
|
|
220
|
+
## Documentation
|
|
221
|
+
|
|
222
|
+
The doc is on [Github pages](https://struphy-hub.github.io/struphy/index.html), we recommend in particular to visit:
|
|
223
|
+
|
|
224
|
+
- [Install](https://struphy-hub.github.io/struphy/sections/install.html)
|
|
225
|
+
- [Userguide](https://struphy-hub.github.io/struphy/sections/userguide.html)
|
|
226
|
+
- [Available models](https://struphy-hub.github.io/struphy/sections/models.html)
|
|
227
|
+
- [Numerical methods](https://struphy-hub.github.io/struphy/sections/numerics.html)
|
|
228
|
+
|
|
229
|
+
## Get in touch
|
|
230
|
+
|
|
231
|
+
- [Issues](https://github.com/struphy-hub/struphy/issues)
|
|
232
|
+
- [Discussions](https://github.com/struphy-hub/struphy/discussions)
|
|
233
|
+
- [@spossann](https://github.com/spossann) [stefan.possanner@ipp.mpg.de](mailto:spossann@ipp.mpg.de) (Maintainer)
|
|
234
|
+
- [@max-models](https://github.com/max-models) [max.lindqvist@ipp.mpg.de](mailto:Max.Lindqvist@ipp.mpg.de) (Maintainer)
|
|
235
|
+
- [LinkedIn profile](https://www.linkedin.com/company/struphy/)
|
|
236
|
+
|
|
237
|
+
## Citing Struphy
|
|
238
|
+
|
|
239
|
+
- S. Possanner, F. Holderied, Y. Li, B.-K. Na, D. Bell, S. Hadjout and Y. Güçlü, [**High-Order Structure-Preserving Algorithms for Plasma Hybrid Models**](https://link.springer.com/chapter/10.1007/978-3-031-38299-4_28), International Conference on Geometric Science of Information 2023, 263-271, Springer Nature Switzerland.
|
struphy-3.1.0/README.md
ADDED
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+
|
|
5
|
+
<p>
|
|
6
|
+
|
|
7
|
+
<a href="https://github.com/struphy-hub/struphy/releases"><img src="https://img.shields.io/github/v/release/struphy-hub/struphy?label=Release" alt="Release"></a> <a href="https://github.com/struphy-hub/struphy/blob/devel/LICENSE"><img src="https://img.shields.io/badge/License-MIT-violet" alt="License"></a> <a href="https://mybinder.org/v2/gh/struphy-hub/struphy-tutorials/main"><img src="https://img.shields.io/badge/launch-tutorials-579ACA.svg?logo=data:image/png;base64,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" alt="badge"></a> <a href="https://github.com/struphy-hub/struphy/actions/workflows/scheduled-ubuntu.yml"><img src="https://github.com/struphy-hub/struphy/actions/workflows/scheduled-ubuntu.yml/badge.svg" alt="Ubuntu latest"></a> <a href="https://github.com/struphy-hub/struphy/actions/workflows/scheduled-macos.yml"><img src="https://github.com/struphy-hub/struphy/actions/workflows/scheduled-macos.yml/badge.svg" alt="MacOS latest"></a> <a href="https://github.com/struphy-hub/struphy/actions/workflows/static_analysis.yml"><img src="https://github.com/struphy-hub/struphy/actions/workflows/static_analysis.yml/badge.svg" alt="isort and ruff"></a> <a href="https://pypi.org/project/struphy/"><img src="https://img.shields.io/pypi/v/struphy?label=PyPI" alt="PyPI"></a> <a href="https://pypi.org/project/struphy/"><img src="https://img.shields.io/pypi/dm/struphy.svg?label=PyPI%20downloads" alt="PyPI Downloads"></a>
|
|
8
|
+
</p>
|
|
9
|
+
|
|
10
|
+
# Welcome!
|
|
11
|
+
|
|
12
|
+
**This is a Python package for solving partial differential equations (PDEs) mainly - but not exclusively - for plasma physics.**
|
|
13
|
+
|
|
14
|
+
**STRUPHY** stands for **STRU**cture-**P**reserving **HY**brid code (or **STRU**cture-preserving **PHY**sics code). The package provides off-the-shelf models for plasma physics problems, such as
|
|
15
|
+
|
|
16
|
+
- Maxwell’s equations
|
|
17
|
+
- Magneto-hydrodynamics (MHD)
|
|
18
|
+
- Vlasov-Poisson and Vlasov-Maxwell kinetic models
|
|
19
|
+
- Drift-kinetic models for strongly magnetized plasma
|
|
20
|
+
- MHD-kinetic hybrid models
|
|
21
|
+
|
|
22
|
+
All models can be run on multiple cores through MPI (distributed memory) and OpenMP (shared memory). The compute-intensive parts of the code are translated and compiled (“transpiled”) using [pyccel](https://github.com/pyccel/pyccel), giving you the speed of Fortran or C while working within the familiar Python environment.
|
|
23
|
+
|
|
24
|
+
The code is freely available under an [MIT license](https://github.com/struphy-hub/struphy/blob/devel/LICENSE) - Copyright (c) 2019-2026, Struphy developers, Max Planck Institute for Plasma Physics.
|
|
25
|
+
|
|
26
|
+

|
|
27
|
+
|
|
28
|
+
## Tutorials
|
|
29
|
+
|
|
30
|
+
Get familiar with Struphy right away on [mybinder](https://mybinder.org/v2/gh/struphy-hub/struphy-tutorials/main) - no installation needed.
|
|
31
|
+
|
|
32
|
+
## Quick install
|
|
33
|
+
|
|
34
|
+
Quick install on your computer (using a virtual environment):
|
|
35
|
+
|
|
36
|
+
python -m venv struphy_env
|
|
37
|
+
source struphy_env/bin/activate
|
|
38
|
+
pip install -U pip
|
|
39
|
+
pip install -U struphy
|
|
40
|
+
struphy compile
|
|
41
|
+
|
|
42
|
+
In case you face troubles with install/compile:
|
|
43
|
+
|
|
44
|
+
1. check the [prerequisites](https://struphy-hub.github.io/struphy/sections/install.html#requirements)
|
|
45
|
+
2. visit [trouble shooting](https://struphy-hub.github.io/struphy/sections/install.html#trouble-shooting)
|
|
46
|
+
|
|
47
|
+
## Python API
|
|
48
|
+
|
|
49
|
+
Try out the Python API in a Jupyter notebook or any Python environment. For example, you can create a simulation object and show the domain and equilibrium magnetic field of the linear MHD model via
|
|
50
|
+
|
|
51
|
+
``` python
|
|
52
|
+
from struphy import (
|
|
53
|
+
Simulation,
|
|
54
|
+
domains,
|
|
55
|
+
equils,
|
|
56
|
+
)
|
|
57
|
+
from struphy.models import LinearMHD
|
|
58
|
+
|
|
59
|
+
model = LinearMHD()
|
|
60
|
+
|
|
61
|
+
domain = domains.DESCunit()
|
|
62
|
+
equil = equils.DESCequilibrium(use_nfp=False)
|
|
63
|
+
|
|
64
|
+
sim = Simulation(
|
|
65
|
+
model=model,
|
|
66
|
+
domain=domain,
|
|
67
|
+
equil=equil,
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
sim.show_domain(scalars="absB0", window_size = (850, 250), zoom_factor=2.0)
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+

|
|
74
|
+
|
|
75
|
+
This will show the domain and equilibrium magnetic field of the linear MHD model. You can find more examples in the [documentation](https://struphy-hub.github.io/struphy/index.html).
|
|
76
|
+
|
|
77
|
+
## Quick run
|
|
78
|
+
|
|
79
|
+
As an example, let’s say we want to solve Maxwell’s equations. We can use the CLI and generate a default launch file via
|
|
80
|
+
|
|
81
|
+
struphy params Maxwell
|
|
82
|
+
|
|
83
|
+
Hit yes when prompted - this will create the file `params_Maxwell.py` in your current working directory (cwd). You can open the file and - if you feel like it already - change some parameters, then run
|
|
84
|
+
|
|
85
|
+
python params_Maxwell.py
|
|
86
|
+
|
|
87
|
+
The default output is in `sim_1/` in your cwd. You can change the output path via the class `EnvironmentOptions` in the parameter file.
|
|
88
|
+
|
|
89
|
+
Parallel simulations are run for example with
|
|
90
|
+
|
|
91
|
+
pip install -U mpi4py
|
|
92
|
+
mpirun -n 4 python params_Maxwell.py
|
|
93
|
+
|
|
94
|
+
You can also put the run command in a batch script.
|
|
95
|
+
|
|
96
|
+
## Docker
|
|
97
|
+
|
|
98
|
+
If you want to get started right away without installing anything, you can use the [Docker image](https://hub.docker.com/r/spossann/struphy) - just pull and run:
|
|
99
|
+
|
|
100
|
+
docker pull spossann/struphy:main
|
|
101
|
+
docker run -it --rm spossann/struphy:main
|
|
102
|
+
ls struphy_*
|
|
103
|
+
|
|
104
|
+
This will show three available Struphy environments, which you can activate for example via
|
|
105
|
+
|
|
106
|
+
source struphy_fortran_/env_fortran_/bin/activate
|
|
107
|
+
|
|
108
|
+
There is also a [Docker image with just the prerequisites](https://hub.docker.com/r/spossann/ubuntu-for-struphy) (on Ubuntu), so you can install and compile Struphy on top of it yourself:
|
|
109
|
+
|
|
110
|
+
docker pull spossann/ubuntu-for-struphy:main
|
|
111
|
+
docker run -it --rm spossann/ubuntu-for-struphy:main
|
|
112
|
+
|
|
113
|
+
## Documentation
|
|
114
|
+
|
|
115
|
+
The doc is on [Github pages](https://struphy-hub.github.io/struphy/index.html), we recommend in particular to visit:
|
|
116
|
+
|
|
117
|
+
- [Install](https://struphy-hub.github.io/struphy/sections/install.html)
|
|
118
|
+
- [Userguide](https://struphy-hub.github.io/struphy/sections/userguide.html)
|
|
119
|
+
- [Available models](https://struphy-hub.github.io/struphy/sections/models.html)
|
|
120
|
+
- [Numerical methods](https://struphy-hub.github.io/struphy/sections/numerics.html)
|
|
121
|
+
|
|
122
|
+
## Get in touch
|
|
123
|
+
|
|
124
|
+
- [Issues](https://github.com/struphy-hub/struphy/issues)
|
|
125
|
+
- [Discussions](https://github.com/struphy-hub/struphy/discussions)
|
|
126
|
+
- [@spossann](https://github.com/spossann) [stefan.possanner@ipp.mpg.de](mailto:spossann@ipp.mpg.de) (Maintainer)
|
|
127
|
+
- [@max-models](https://github.com/max-models) [max.lindqvist@ipp.mpg.de](mailto:Max.Lindqvist@ipp.mpg.de) (Maintainer)
|
|
128
|
+
- [LinkedIn profile](https://www.linkedin.com/company/struphy/)
|
|
129
|
+
|
|
130
|
+
## Citing Struphy
|
|
131
|
+
|
|
132
|
+
- S. Possanner, F. Holderied, Y. Li, B.-K. Na, D. Bell, S. Hadjout and Y. Güçlü, [**High-Order Structure-Preserving Algorithms for Plasma Hybrid Models**](https://link.springer.com/chapter/10.1007/978-3-031-38299-4_28), International Conference on Geometric Science of Information 2023, 263-271, Springer Nature Switzerland.
|
|
@@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
|
|
|
6
6
|
|
|
7
7
|
[project]
|
|
8
8
|
name = "struphy"
|
|
9
|
-
version = "3.0
|
|
9
|
+
version = "3.1.0"
|
|
10
10
|
readme = "README.md"
|
|
11
11
|
requires-python = ">=3.10"
|
|
12
12
|
authors = [
|
|
@@ -23,23 +23,32 @@ classifiers = [
|
|
|
23
23
|
"Programming Language :: Python :: 3",
|
|
24
24
|
]
|
|
25
25
|
dependencies = [
|
|
26
|
-
"numpy<=2.
|
|
27
|
-
"cunumpy<=0.1",
|
|
28
|
-
"pyccel<=2.2.
|
|
26
|
+
"numpy<=2.4.3",
|
|
27
|
+
"cunumpy<=0.1.1",
|
|
28
|
+
"pyccel<=2.2.3, >=2.1",
|
|
29
29
|
"feectools<=0.1.3",
|
|
30
|
-
"scipy<=1.
|
|
31
|
-
"h5py<=3.
|
|
32
|
-
"matplotlib<=3.10.
|
|
30
|
+
"scipy<=1.17.1",
|
|
31
|
+
"h5py<=3.16.0",
|
|
32
|
+
"matplotlib<=3.10.8",
|
|
33
33
|
"pyyaml<=6.0.3",
|
|
34
|
-
"vtk<=9.6.
|
|
34
|
+
"vtk<=9.6.1",
|
|
35
35
|
"tqdm<=4.67.3",
|
|
36
36
|
"argcomplete<=3.6.3",
|
|
37
|
-
"
|
|
38
|
-
"
|
|
37
|
+
"ipywidgets<=8.1.8",
|
|
38
|
+
"plotly<=6.6.0",
|
|
39
|
+
"pyvista<=0.47.3",
|
|
40
|
+
"trame<=3.12.0",
|
|
41
|
+
"trame-vtk<=2.11.8",
|
|
42
|
+
"trame-vuetify<=3.2.1",
|
|
43
|
+
"nest_asyncio2<=1.7.2",
|
|
44
|
+
"vtk<=9.6.1",
|
|
45
|
+
"pytest<=9.0.3",
|
|
39
46
|
"pytest-mpi<=0.6",
|
|
40
47
|
"pytest-testmon<=2.2.0",
|
|
48
|
+
"ruff<=0.15.11, >=0.15.0",
|
|
41
49
|
"line_profiler<=5.0.2",
|
|
42
|
-
"scope-profiler<=0.1.
|
|
50
|
+
"scope-profiler<=0.1.9, >=0.1.7",
|
|
51
|
+
"jax-finufft<=1.2.0",
|
|
43
52
|
]
|
|
44
53
|
|
|
45
54
|
[project.license]
|
|
@@ -47,25 +56,24 @@ file = "LICENSE"
|
|
|
47
56
|
|
|
48
57
|
[project.optional-dependencies]
|
|
49
58
|
phys = [
|
|
50
|
-
"gvec<=1.
|
|
51
|
-
"desc-opt<=0.
|
|
59
|
+
"gvec<=1.4.1, >=1.1.0",
|
|
60
|
+
"desc-opt<=0.17.1",
|
|
52
61
|
]
|
|
53
62
|
dev = [
|
|
54
63
|
"struphy[mpi]",
|
|
55
|
-
"notebook<=7.5.
|
|
64
|
+
"notebook<=7.5.5",
|
|
56
65
|
"autopep8<=2.3.2",
|
|
57
|
-
"isort<=8.0.
|
|
66
|
+
"isort<=8.0.1",
|
|
58
67
|
"flake8<=7.3.0",
|
|
59
68
|
"pylint<=4.0.5",
|
|
60
69
|
"ssort<=0.16.0",
|
|
61
70
|
"add-trailing-comma<=4.0.0",
|
|
62
|
-
"
|
|
63
|
-
"pre-commit<=4.5.1",
|
|
71
|
+
"pre-commit<=4.6.0",
|
|
64
72
|
"nbstripout<=0.9.1",
|
|
65
|
-
"tabulate<=0.
|
|
73
|
+
"tabulate<=0.10.0",
|
|
66
74
|
"tomli-w<=1.2.0",
|
|
67
75
|
"kaleido<=1.2.0",
|
|
68
|
-
"pandas<=3.0.
|
|
76
|
+
"pandas<=3.0.2",
|
|
69
77
|
]
|
|
70
78
|
mpi = [
|
|
71
79
|
"mpi4py<=4.1.1",
|
|
@@ -80,13 +88,14 @@ doc = [
|
|
|
80
88
|
"lxml_html_clean<=0.4.4",
|
|
81
89
|
"sphinxcontrib-napoleon<=0.7",
|
|
82
90
|
"sphinx-copybutton<=0.5.2",
|
|
83
|
-
"
|
|
91
|
+
"sphinx-collections<=0.3.1",
|
|
92
|
+
"pydata-sphinx-theme<=0.17.1",
|
|
84
93
|
"nbsphinx<=0.9.8",
|
|
85
94
|
"m2r2<=0.3.4",
|
|
86
95
|
"myst-parser<=5.0.0",
|
|
87
96
|
"mistune<=0.8.4",
|
|
88
97
|
"docutils<=0.22.4",
|
|
89
|
-
"ipyparallel<=9.0
|
|
98
|
+
"ipyparallel<=9.1.0",
|
|
90
99
|
]
|
|
91
100
|
likwid = [
|
|
92
101
|
"struphy[dev]",
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
# Logging parameters and filters
|
|
2
|
+
import atexit
|
|
3
|
+
import logging
|
|
4
|
+
import logging.config
|
|
5
|
+
|
|
6
|
+
from feectools.ddm.mpi import mpi as MPI
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class RankZeroFilter(logging.Filter):
|
|
10
|
+
def __init__(self, rank: int):
|
|
11
|
+
super().__init__()
|
|
12
|
+
self.rank = rank
|
|
13
|
+
|
|
14
|
+
def filter(self, record):
|
|
15
|
+
return self.rank == 0
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
# logger configuration
|
|
19
|
+
config = {
|
|
20
|
+
"version": 1,
|
|
21
|
+
"disable_existing_loggers": False,
|
|
22
|
+
"formatters": {
|
|
23
|
+
"simple": {"format": "%(message)s"},
|
|
24
|
+
"detailed": {
|
|
25
|
+
"format": "[%(levelname)s|%(module)s|L%(lineno)d] %(asctime)s: %(message)s",
|
|
26
|
+
"datefmt": "%Y-%m-%dT%H:%M:%S%z",
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
"handlers": {
|
|
30
|
+
"stderr": {
|
|
31
|
+
"class": "logging.StreamHandler",
|
|
32
|
+
"level": "WARNING",
|
|
33
|
+
"formatter": "simple",
|
|
34
|
+
"stream": "ext://sys.stderr",
|
|
35
|
+
},
|
|
36
|
+
"file": {
|
|
37
|
+
"class": "logging.handlers.RotatingFileHandler",
|
|
38
|
+
"level": "WARNING",
|
|
39
|
+
"formatter": "detailed",
|
|
40
|
+
"filename": "/tmp/struphy.log",
|
|
41
|
+
"maxBytes": 10000,
|
|
42
|
+
"backupCount": 3,
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
"loggers": {"struphy": {"level": "WARNING", "handlers": ["stderr", "file"]}},
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def set_logging_level(level: int = logging.WARNING):
|
|
50
|
+
"""Set logging level for struphy logger and its handlers.
|
|
51
|
+
|
|
52
|
+
Useful levels are:
|
|
53
|
+
* logging.DEBUG: for detailed debugging information.
|
|
54
|
+
* logging.INFO: for general informational messages about the simulation setup and progress, plus key events.
|
|
55
|
+
* logging.WARNING: for warnings about potential issues that do not stop the simulation.
|
|
56
|
+
* logging.ERROR: for errors that occur during the simulation, which may affect results but do not necessarily stop the simulation.
|
|
57
|
+
* logging.CRITICAL: for critical errors that likely cause the simulation to stop or produce invalid results.
|
|
58
|
+
"""
|
|
59
|
+
logger = logging.getLogger("struphy")
|
|
60
|
+
logger.setLevel(level)
|
|
61
|
+
for handler in logger.handlers:
|
|
62
|
+
handler.setLevel(level)
|
|
63
|
+
|
|
64
|
+
logger.debug(
|
|
65
|
+
f"\nNew logger level: {logger.level}, effective: {logger.getEffectiveLevel()}, propagate: {logger.propagate}"
|
|
66
|
+
)
|
|
67
|
+
for h in logger.handlers:
|
|
68
|
+
logger.debug(f"{type(h).__name__}: handler level: {h.level}")
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
def setup_logging(logging_level: int = logging.WARNING):
|
|
72
|
+
"""Setup logging configuration for struphy."""
|
|
73
|
+
logger = logging.getLogger("struphy")
|
|
74
|
+
|
|
75
|
+
logging.config.dictConfig(config)
|
|
76
|
+
|
|
77
|
+
set_logging_level(logging_level)
|
|
78
|
+
|
|
79
|
+
# Add RankZeroFilter to all handlers
|
|
80
|
+
rank = MPI.COMM_WORLD.Get_rank()
|
|
81
|
+
rank_filter = RankZeroFilter(rank)
|
|
82
|
+
|
|
83
|
+
# Apply filter to struphy logger handlers
|
|
84
|
+
for handler in logger.handlers:
|
|
85
|
+
handler.addFilter(rank_filter)
|
|
86
|
+
|
|
87
|
+
# Apply filter to root logger handlers
|
|
88
|
+
root_logger = logging.getLogger()
|
|
89
|
+
for handler in root_logger.handlers:
|
|
90
|
+
handler.addFilter(rank_filter)
|
|
91
|
+
|
|
92
|
+
# Start queue handler listener if present
|
|
93
|
+
queue_handler = None
|
|
94
|
+
for handler in logger.handlers:
|
|
95
|
+
if hasattr(handler, "listener"):
|
|
96
|
+
queue_handler = handler
|
|
97
|
+
break
|
|
98
|
+
if queue_handler is not None:
|
|
99
|
+
queue_handler.listener.start()
|
|
100
|
+
atexit.register(queue_handler.listener.stop)
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
# Default logging setup
|
|
104
|
+
logger = logging.getLogger("struphy")
|
|
105
|
+
setup_logging(logging_level=logging.WARNING)
|
|
106
|
+
logger.info("Logging setup complete.")
|
|
107
|
+
|
|
108
|
+
# Import API components
|
|
109
|
+
from struphy.api.domains import domains
|
|
110
|
+
from struphy.api.equils import equils
|
|
111
|
+
from struphy.api.grids import grids
|
|
112
|
+
from struphy.api.maxwellians import maxwellians
|
|
113
|
+
from struphy.api.ode import ButcherTableau
|
|
114
|
+
from struphy.api.options import (
|
|
115
|
+
BaseUnits,
|
|
116
|
+
DerhamOptions,
|
|
117
|
+
EnvironmentOptions,
|
|
118
|
+
FieldsBackground,
|
|
119
|
+
Time,
|
|
120
|
+
)
|
|
121
|
+
from struphy.api.particles import (
|
|
122
|
+
BinningPlot,
|
|
123
|
+
BoundaryParameters,
|
|
124
|
+
KernelDensityPlot,
|
|
125
|
+
LoadingParameters,
|
|
126
|
+
WeightsParameters,
|
|
127
|
+
)
|
|
128
|
+
from struphy.api.perturbations import perturbations
|
|
129
|
+
from struphy.api.post_processing import PlottingData, PostProcessor
|
|
130
|
+
from struphy.api.simulation import Simulation
|
|
131
|
+
|
|
132
|
+
__all__ = [
|
|
133
|
+
"domains",
|
|
134
|
+
"equils",
|
|
135
|
+
"grids",
|
|
136
|
+
"maxwellians",
|
|
137
|
+
"EnvironmentOptions",
|
|
138
|
+
"BaseUnits",
|
|
139
|
+
"Time",
|
|
140
|
+
"perturbations",
|
|
141
|
+
"LoadingParameters",
|
|
142
|
+
"WeightsParameters",
|
|
143
|
+
"BoundaryParameters",
|
|
144
|
+
"BinningPlot",
|
|
145
|
+
"KernelDensityPlot",
|
|
146
|
+
"DerhamOptions",
|
|
147
|
+
"FieldsBackground",
|
|
148
|
+
"ButcherTableau",
|
|
149
|
+
"PostProcessor",
|
|
150
|
+
"PlottingData",
|
|
151
|
+
"Simulation",
|
|
152
|
+
]
|