Skip to content

[SPH][NIMHD] Add Non-Ideal MHD terms#1765

Open
y-lapeyre wants to merge 13 commits into
Shamrock-code:mainfrom
y-lapeyre:MHD/nonideal
Open

[SPH][NIMHD] Add Non-Ideal MHD terms#1765
y-lapeyre wants to merge 13 commits into
Shamrock-code:mainfrom
y-lapeyre:MHD/nonideal

Conversation

@y-lapeyre
Copy link
Copy Markdown
Collaborator

Add and enable the use of no-ideal MHD in the MHD solver, using the structure I previously set out for it.

Tests:

  • Wave Damping test: frequency is OK, amplitude is not (damping is too slow)
  • Standing shock: TBD

Could be merged as is and fixed with a 2nd PR that adds the wave damping CI test.

@github-actions
Copy link
Copy Markdown
Contributor

Thanks @y-lapeyre for opening this PR!

You can do multiple things directly here:
1 - Comment pre-commit.ci run to run pre-commit checks.
2 - Comment pre-commit.ci autofix to apply fixes.
3 - Add label autofix.ci to fix authorship & pre-commit for every commit made.
4 - Add label light-ci to only trigger a reduced & faster version of the CI (need the full one before merge).
5 - Add label trigger-ci to create an empty commit to trigger the CI.

Once the workflow completes a message will appear displaying informations related to the run.

Also the PR gets automatically reviewed by gemini, you can:
1 - Comment /gemini review to trigger a review
2 - Comment /gemini summary for a summary
3 - Tag it using @gemini-code-assist either in the PR or in review comments on files

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces support for Non-Ideal Magnetohydrodynamics (NIMHD) by adding Ohmic resistivity, Hall effect, and Ambipolar Diffusion terms. Key changes include the addition of NIMHD configuration parameters, mathematical kernels for current and heating terms, and a new CFL timestep constraint for Ambipolar Diffusion. Review feedback highlighted a critical architectural issue regarding the pairwise calculation of electric current, which should be a field quantity requiring a two-pass approach. Additionally, several potential division-by-zero bugs were identified in the mathematical kernels and timestep calculations, along with a likely incorrect gradient index in the induction term and misleading argument names in the Python bindings.

Comment thread src/shammodels/sph/include/shammodels/sph/math/mhd.hpp
Comment thread src/shammodels/sph/include/shammodels/sph/math/mhd.hpp Outdated
Comment thread src/shammodels/sph/include/shammodels/sph/math/mhd.hpp Outdated
Comment thread src/shammodels/sph/src/pySPHModel.cpp
Comment thread src/shammodels/sph/src/Solver.cpp
@y-lapeyre
Copy link
Copy Markdown
Collaborator Author

/gemini review

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces support for Non-Ideal Magnetohydrodynamics (NIMHD) in the SPH solver, adding configuration parameters, mathematical formulations for current density and resistivity, and the corresponding derivative updates. However, several critical issues must be addressed: a bug where the current density J_a is passed by value instead of reference in MagCurrentJ_sum (discarding accumulated values), a race condition and event synchronization bug in the CFL timestep calculation due to variable shadowing, and potential out-of-bounds reads in compute_J from iterating over ghost particles that lack neighbor lists. Additionally, minor improvements are recommended, such as removing unused parameters in B_NI_terms, cleaning up a temporary comment, and renaming a Python binding parameter for consistency.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread src/shammodels/sph/include/shammodels/sph/math/mhd.hpp
Comment thread src/shammodels/sph/src/Solver.cpp
Comment thread src/shammodels/sph/src/modules/UpdateDerivs.cpp Outdated
Comment thread src/shammodels/sph/include/shammodels/sph/math/mhd.hpp
Comment thread src/shammodels/sph/include/shammodels/sph/math/mhd.hpp
Comment thread src/shammodels/sph/src/pySPHModel.cpp
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 4, 2026

Workflow report

workflow report corresponding to commit 8b64f74
Commiter email is yona.lapeyre@ens-lyon.fr
GitHub page artifact URL GitHub page artifact link (can expire)

Pre-commit check report

Pre-commit check: ✅

trim trailing whitespace.................................................Passed
fix end of files.........................................................Passed
check for merge conflicts................................................Passed
check that executables have shebangs.....................................Passed
check that scripts with shebangs are executable..........................Passed
check for added large files..............................................Passed
check for case conflicts.................................................Passed
check for broken symlinks................................................Passed
check yaml...............................................................Passed
detect private key.......................................................Passed
No-tabs checker..........................................................Passed
Tabs remover.............................................................Passed
cmake-format.............................................................Passed
Validate GitHub Workflows................................................Passed
clang-format.............................................................Passed
ruff check...............................................................Passed
ruff format..............................................................Passed
Check doxygen headers....................................................Passed
Check license headers....................................................Passed
Check #pragma once.......................................................Passed
Check SYCL #include......................................................Passed
No ssh in git submodules remote..........................................Passed
No UTF-8 in files (except for authors)...................................Passed

Test pipeline can run.

Clang-tidy diff report


328 warnings generated.
Suppressed 329 warnings (328 in non-user code, 1 NOLINT).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.

600 warnings generated.
Suppressed 601 warnings (598 in non-user code, 2 due to line filter, 1 NOLINT).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.

631 warnings generated.
Suppressed 632 warnings (631 in non-user code, 1 NOLINT).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.

627 warnings generated.
Suppressed 628 warnings (627 in non-user code, 1 NOLINT).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.

631 warnings generated.
Suppressed 632 warnings (631 in non-user code, 1 NOLINT).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.

613 warnings generated.
Suppressed 614 warnings (607 in non-user code, 6 due to line filter, 1 NOLINT).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.

763 warnings generated.
Suppressed 764 warnings (763 in non-user code, 1 NOLINT).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.

1152 warnings generated.
Suppressed 1153 warnings (1012 in non-user code, 140 due to line filter, 1 NOLINT).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.

1089 warnings generated.
Suppressed 1090 warnings (1076 in non-user code, 13 due to line filter, 1 NOLINT).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.

Doxygen diff with main

Removed warnings : 104
New warnings : 113
Warnings count : 7886 → 7895 (0.1%)

Detailed changes :
- src/shammodels/sph/include/shammodels/sph/SolverConfig.hpp:1002: warning: Member check_config() (function) of struct shammodels::sph::SolverConfig is not documented.
+ src/shammodels/sph/include/shammodels/sph/SolverConfig.hpp:1005: warning: Member check_config() (function) of struct shammodels::sph::SolverConfig is not documented.
- src/shammodels/sph/include/shammodels/sph/SolverConfig.hpp:1020: warning: Member set_layout(shamrock::patch::PatchDataLayerLayout &pdl) (function) of struct shammodels::sph::SolverConfig is not documented.
- src/shammodels/sph/include/shammodels/sph/SolverConfig.hpp:1021: warning: Member set_ghost_layout(shamrock::patch::PatchDataLayerLayout &ghost_layout) (function) of struct shammodels::sph::SolverConfig is not documented.
+ src/shammodels/sph/include/shammodels/sph/SolverConfig.hpp:1023: warning: Member set_layout(shamrock::patch::PatchDataLayerLayout &pdl) (function) of struct shammodels::sph::SolverConfig is not documented.
+ src/shammodels/sph/include/shammodels/sph/SolverConfig.hpp:1024: warning: Member set_ghost_layout(shamrock::patch::PatchDataLayerLayout &ghost_layout) (function) of struct shammodels::sph::SolverConfig is not documented.
- src/shammodels/sph/include/shammodels/sph/SolverConfig.hpp:1090: warning: Member to_json(nlohmann::json &j, const ParticleKillingConfig< Tvec > &p) (function) of namespace shammodels::sph is not documented.
+ src/shammodels/sph/include/shammodels/sph/SolverConfig.hpp:1093: warning: Member to_json(nlohmann::json &j, const ParticleKillingConfig< Tvec > &p) (function) of namespace shammodels::sph is not documented.
- src/shammodels/sph/include/shammodels/sph/SolverConfig.hpp:1103: warning: Member from_json(const nlohmann::json &j, ParticleKillingConfig< Tvec > &p) (function) of namespace shammodels::sph is not documented.
+ src/shammodels/sph/include/shammodels/sph/SolverConfig.hpp:1106: warning: Member from_json(const nlohmann::json &j, ParticleKillingConfig< Tvec > &p) (function) of namespace shammodels::sph is not documented.
- src/shammodels/sph/include/shammodels/sph/SolverConfig.hpp:1118: warning: Member to_json(nlohmann::json &j, const SmoothingLengthConfig &p) (function) of namespace shammodels::sph is not documented.
+ src/shammodels/sph/include/shammodels/sph/SolverConfig.hpp:1121: warning: Member to_json(nlohmann::json &j, const SmoothingLengthConfig &p) (function) of namespace shammodels::sph is not documented.
- src/shammodels/sph/include/shammodels/sph/SolverConfig.hpp:1138: warning: Member from_json(const nlohmann::json &j, SmoothingLengthConfig &p) (function) of namespace shammodels::sph is not documented.
+ src/shammodels/sph/include/shammodels/sph/SolverConfig.hpp:1141: warning: Member from_json(const nlohmann::json &j, SmoothingLengthConfig &p) (function) of namespace shammodels::sph is not documented.
- src/shammodels/sph/include/shammodels/sph/SolverConfig.hpp:1236: warning: Member to_json(nlohmann::json &j, const DustConfig< Tvec > &p) (function) of namespace shammodels::sph is not documented.
+ src/shammodels/sph/include/shammodels/sph/SolverConfig.hpp:1239: warning: Member to_json(nlohmann::json &j, const DustConfig< Tvec > &p) (function) of namespace shammodels::sph is not documented.
- src/shammodels/sph/include/shammodels/sph/SolverConfig.hpp:1244: warning: Member from_json(const nlohmann::json &j, DustConfig< Tvec > &p) (function) of namespace shammodels::sph is not documented.
+ src/shammodels/sph/include/shammodels/sph/SolverConfig.hpp:1247: warning: Member from_json(const nlohmann::json &j, DustConfig< Tvec > &p) (function) of namespace shammodels::sph is not documented.
- src/shammodels/sph/include/shammodels/sph/SolverConfig.hpp:990: warning: Member use_luminosity(bool enable) (function) of struct shammodels::sph::SolverConfig is not documented.
+ src/shammodels/sph/include/shammodels/sph/SolverConfig.hpp:993: warning: Member use_luminosity(bool enable) (function) of struct shammodels::sph::SolverConfig is not documented.
+ src/shammodels/sph/include/shammodels/sph/config/MHDConfig.hpp:47: warning: Member etaO (variable) of struct shammodels::sph::MHDConfig::NonIdealMHD is not documented.
+ src/shammodels/sph/include/shammodels/sph/config/MHDConfig.hpp:48: warning: Member etaH (variable) of struct shammodels::sph::MHDConfig::NonIdealMHD is not documented.
+ src/shammodels/sph/include/shammodels/sph/config/MHDConfig.hpp:49: warning: Member etaAD (variable) of struct shammodels::sph::MHDConfig::NonIdealMHD is not documented.
- src/shammodels/sph/include/shammodels/sph/config/MHDConfig.hpp:53: warning: Member Variant (typedef) of struct shammodels::sph::MHDConfig is not documented.
- src/shammodels/sph/include/shammodels/sph/config/MHDConfig.hpp:55: warning: Member config (variable) of struct shammodels::sph::MHDConfig is not documented.
+ src/shammodels/sph/include/shammodels/sph/config/MHDConfig.hpp:56: warning: Member Variant (typedef) of struct shammodels::sph::MHDConfig is not documented.
- src/shammodels/sph/include/shammodels/sph/config/MHDConfig.hpp:57: warning: Member set(Variant v) (function) of struct shammodels::sph::MHDConfig is not documented.
+ src/shammodels/sph/include/shammodels/sph/config/MHDConfig.hpp:58: warning: Member configMHD (variable) of struct shammodels::sph::MHDConfig is not documented.
- src/shammodels/sph/include/shammodels/sph/config/MHDConfig.hpp:59: warning: Member has_B_field() (function) of struct shammodels::sph::MHDConfig is not documented.
+ src/shammodels/sph/include/shammodels/sph/config/MHDConfig.hpp:60: warning: Member set(Variant v) (function) of struct shammodels::sph::MHDConfig is not documented.
+ src/shammodels/sph/include/shammodels/sph/config/MHDConfig.hpp:62: warning: Member do_NIMHD() (function) of struct shammodels::sph::MHDConfig is not documented.
- src/shammodels/sph/include/shammodels/sph/config/MHDConfig.hpp:65: warning: Member has_psi_field() (function) of struct shammodels::sph::MHDConfig is not documented.
+ src/shammodels/sph/include/shammodels/sph/config/MHDConfig.hpp:67: warning: Member has_B_field() (function) of struct shammodels::sph::MHDConfig is not documented.
- src/shammodels/sph/include/shammodels/sph/config/MHDConfig.hpp:71: warning: Member has_divB_field() (function) of struct shammodels::sph::MHDConfig is not documented.
+ src/shammodels/sph/include/shammodels/sph/config/MHDConfig.hpp:73: warning: Member has_psi_field() (function) of struct shammodels::sph::MHDConfig is not documented.
- src/shammodels/sph/include/shammodels/sph/config/MHDConfig.hpp:76: warning: Member has_curlB_field() (function) of struct shammodels::sph::MHDConfig is not documented.
+ src/shammodels/sph/include/shammodels/sph/config/MHDConfig.hpp:79: warning: Member has_divB_field() (function) of struct shammodels::sph::MHDConfig is not documented.
- src/shammodels/sph/include/shammodels/sph/config/MHDConfig.hpp:81: warning: Member has_dtdivB_field() (function) of struct shammodels::sph::MHDConfig is not documented.
+ src/shammodels/sph/include/shammodels/sph/config/MHDConfig.hpp:84: warning: Member has_curlB_field() (function) of struct shammodels::sph::MHDConfig is not documented.
- src/shammodels/sph/include/shammodels/sph/config/MHDConfig.hpp:86: warning: Member print_status() (function) of struct shammodels::sph::MHDConfig is not documented.
+ src/shammodels/sph/include/shammodels/sph/config/MHDConfig.hpp:89: warning: Member has_dtdivB_field() (function) of struct shammodels::sph::MHDConfig is not documented.
+ src/shammodels/sph/include/shammodels/sph/config/MHDConfig.hpp:94: warning: Member print_status() (function) of struct shammodels::sph::MHDConfig is not documented.
+ src/shammodels/sph/include/shammodels/sph/math/mhd.hpp:107: warning: Member mag_tension(Tscal m_b, Tvec B_a, Tvec B_b, Tvec nabla_Wab_ha, Tvec nabla_Wab_hb, Tscal sub_fact_a, Tscal sub_fact_b, Tscal mu_0) (function) of namespace shamrock::sph::mhd is not documented.
- src/shammodels/sph/include/shammodels/sph/math/mhd.hpp:109: warning: Member lambda_artes(Tscal m_b, Tscal rho_a_sq, Tscal rho_b_sq, Tscal vsigb, Tvec B_a, Tvec B_b, Tscal omega_a, Tscal omega_b, Tscal Fab_a, Tscal Fab_b) (function) of namespace shamrock::sph::mhd is not documented.
- src/shammodels/sph/include/shammodels/sph/math/mhd.hpp:134: warning: Member dB_on_rho_induction_term(Tscal m_b, Tscal rho_a_sq, Tvec B_a, Tscal omega_a, Tvec nabla_Wab_ha) (function) of namespace shamrock::sph::mhd is not documented.
+ src/shammodels/sph/include/shammodels/sph/math/mhd.hpp:136: warning: Member fdivB(Tscal m_b, Tvec B_a, Tvec B_b, Tvec nabla_Wab_ha, Tvec nabla_Wab_hb, Tscal sub_fact_a, Tscal sub_fact_b, Tscal mu_0) (function) of namespace shamrock::sph::mhd is not documented.
- src/shammodels/sph/include/shammodels/sph/math/mhd.hpp:145: warning: Member dB_on_rho_psi_term(Tscal m_b, Tscal rho_a_sq, Tscal rho_b_sq, Tscal psi_a, Tscal psi_b, Tscal omega_a, Tscal omega_b, Tvec nabla_Wab_ha, Tvec nabla_Wab_hb) (function) of namespace shamrock::sph::mhd is not documented.
+ src/shammodels/sph/include/shammodels/sph/math/mhd.hpp:153: warning: Member lambda_artes(Tscal m_b, Tscal rho_a_sq, Tscal rho_b_sq, Tscal vsigb, Tvec B_a, Tvec B_b, Tscal omega_a, Tscal omega_b, Tscal Fab_a, Tscal Fab_b) (function) of namespace shamrock::sph::mhd is not documented.
- src/shammodels/sph/include/shammodels/sph/math/mhd.hpp:168: warning: Member dpsi_on_ch_parabolic_propag(Tscal m_b, Tscal rho_a, Tvec B_a, Tvec B_b, Tscal omega_a, Tvec nabla_Wab_ha, Tscal ch_a) (function) of namespace shamrock::sph::mhd is not documented.
+ src/shammodels/sph/include/shammodels/sph/math/mhd.hpp:178: warning: Member dB_on_rho_induction_term(Tscal m_b, Tscal rho_a_sq, Tvec B_a, Tscal omega_a, Tvec nabla_Wab_ha) (function) of namespace shamrock::sph::mhd is not documented.
- src/shammodels/sph/include/shammodels/sph/math/mhd.hpp:183: warning: Member dpsi_on_ch_parabolic_diff(Tscal m_b, Tscal rho_a, Tvec v_ab, Tscal psi_a, Tscal omega_a, Tvec nabla_Wab_ha, Tscal ch_a) (function) of namespace shamrock::sph::mhd is not documented.
+ src/shammodels/sph/include/shammodels/sph/math/mhd.hpp:189: warning: Member dB_on_rho_psi_term(Tscal m_b, Tscal rho_a_sq, Tscal rho_b_sq, Tscal psi_a, Tscal psi_b, Tscal omega_a, Tscal omega_b, Tvec nabla_Wab_ha, Tvec nabla_Wab_hb) (function) of namespace shamrock::sph::mhd is not documented.
- src/shammodels/sph/include/shammodels/sph/math/mhd.hpp:201: warning: Member add_to_derivs_spmhd(Tscal pmass, Tvec dr, Tscal rab, Tscal rho_a, Tscal rho_a_sq, Tscal omega_a_rho_a_inv, Tscal rho_a_inv, Tscal rho_b, Tscal omega_a, Tscal omega_b, Tscal Fab_a, Tscal Fab_b, Tvec vxyz_a, Tvec vxyz_b, Tscal u_a, Tscal u_b, Tscal P_a, Tscal P_b, Tscal cs_a, Tscal cs_b, Tscal h_a, Tscal h_b, Tscal alpha_u, Tvec B_a, Tvec B_b, Tscal psi_a, Tscal psi_b, Tscal mu_0, Tscal sigma_mhd, Tvec &dv_dt, Tscal &du_dt, Tvec &dB_on_rho_dt, Tscal &dpsi_on_ch_dt, Tscal &drho_dt, Tvec &mag_pressure, Tvec &mag_tension, Tvec &gas_pressure, Tvec &tensile_corr, Tscal &psi_propag, Tscal &psi_diff, Tscal &psi_cons, Tscal &u_pressure_viscous_heating) (function) of namespace shamrock::sph::mhd is not documented.
+ src/shammodels/sph/include/shammodels/sph/math/mhd.hpp:212: warning: Member dpsi_on_ch_parabolic_propag(Tscal m_b, Tscal rho_a, Tvec B_a, Tvec B_b, Tscal omega_a, Tvec nabla_Wab_ha, Tscal ch_a) (function) of namespace shamrock::sph::mhd is not documented.
+ src/shammodels/sph/include/shammodels/sph/math/mhd.hpp:227: warning: Member dpsi_on_ch_parabolic_diff(Tscal m_b, Tscal rho_a, Tvec v_ab, Tscal psi_a, Tscal omega_a, Tvec nabla_Wab_ha, Tscal ch_a) (function) of namespace shamrock::sph::mhd is not documented.
+ src/shammodels/sph/include/shammodels/sph/math/mhd.hpp:245: warning: Member add_to_derivs_spmhd(Tscal pmass, Tvec dr, Tscal rab, Tscal rho_a, Tscal rho_a_sq, Tscal omega_a_rho_a_inv, Tscal rho_a_inv, Tscal rho_b, Tscal omega_a, Tscal omega_b, Tscal Fab_a, Tscal Fab_b, Tvec vxyz_a, Tvec vxyz_b, Tscal u_a, Tscal u_b, Tscal P_a, Tscal P_b, Tscal cs_a, Tscal cs_b, Tscal h_a, Tscal h_b, Tscal alpha_u, Tvec B_a, Tvec B_b, Tvec J_a, Tvec J_b, Tscal psi_a, Tscal psi_b, Tscal mu_0, Tscal sigma_mhd, Tscal etaO, Tscal etaH, Tscal etaAD, Tvec &dv_dt, Tscal &du_dt, Tvec &dB_on_rho_dt, Tscal &dpsi_on_ch_dt, Tscal &drho_dt, Tvec &mag_pressure, Tvec &mag_tension, Tvec &gas_pressure, Tvec &tensile_corr, Tscal &psi_propag, Tscal &psi_diff, Tscal &psi_cons, Tscal &u_pressure_viscous_heating) (function) of namespace shamrock::sph::mhd is not documented.
- src/shammodels/sph/include/shammodels/sph/math/mhd.hpp:33: warning: Member MHDType (enumeration) of namespace shamrock::sph::mhd is not documented.
+ src/shammodels/sph/include/shammodels/sph/math/mhd.hpp:34: warning: Member MHDType (enumeration) of namespace shamrock::sph::mhd is not documented.
- src/shammodels/sph/include/shammodels/sph/math/mhd.hpp:37: warning: Member B_dot_grad_W(Tscal m_b, Tscal rho_a_sq, Tscal rho_b_sq, Tvec B_a, Tvec B_b, Tscal omega_a, Tscal omega_b, Tvec nabla_Wab_ha, Tvec nabla_Wab_hb, Tscal mu_0) (function) of namespace shamrock::sph::mhd is not documented.
+ src/shammodels/sph/include/shammodels/sph/math/mhd.hpp:37: warning: Member MagCurrentJ_sum(Tscal m_b, Tvec B_a, Tvec B_b, Tvec nabla_Wab_ha, Tscal sub_fact_a, Tscal mu_0, Tvec &J_a) (function) of namespace shamrock::sph::mhd is not documented.
+ src/shammodels/sph/include/shammodels/sph/math/mhd.hpp:44: warning: Member WursterD(Tvec B, Tvec J, Tscal etaO, Tscal etaH, Tscal etaAD) (function) of namespace shamrock::sph::mhd is not documented.
+ src/shammodels/sph/include/shammodels/sph/math/mhd.hpp:54: warning: Member u_NI_heating(Tvec D, Tvec J, Tscal rho) (function) of namespace shamrock::sph::mhd is not documented.
+ src/shammodels/sph/include/shammodels/sph/math/mhd.hpp:60: warning: Member B_NI_terms(Tvec D_a, Tvec D_b, Tscal m_b, Tscal rho_a_sq, Tscal rho_b_sq, Tscal omega_a, Tscal omega_b, Tvec nabla_Wab_ha, Tvec nabla_Wab_hb) (function) of namespace shamrock::sph::mhd is not documented.
- src/shammodels/sph/include/shammodels/sph/math/mhd.hpp:63: warning: Member mag_tension(Tscal m_b, Tvec B_a, Tvec B_b, Tvec nabla_Wab_ha, Tvec nabla_Wab_hb, Tscal sub_fact_a, Tscal sub_fact_b, Tscal mu_0) (function) of namespace shamrock::sph::mhd is not documented.
+ src/shammodels/sph/include/shammodels/sph/math/mhd.hpp:81: warning: Member B_dot_grad_W(Tscal m_b, Tscal rho_a_sq, Tscal rho_b_sq, Tvec B_a, Tvec B_b, Tscal omega_a, Tscal omega_b, Tvec nabla_Wab_ha, Tvec nabla_Wab_hb, Tscal mu_0) (function) of namespace shamrock::sph::mhd is not documented.
- src/shammodels/sph/include/shammodels/sph/math/mhd.hpp:92: warning: Member fdivB(Tscal m_b, Tvec B_a, Tvec B_b, Tvec nabla_Wab_ha, Tvec nabla_Wab_hb, Tscal sub_fact_a, Tscal sub_fact_b, Tscal mu_0) (function) of namespace shamrock::sph::mhd is not documented.
+ src/shammodels/sph/include/shammodels/sph/modules/SolverStorage.hpp:108: warning: Member MagCurrentJ (variable) of class shammodels::sph::SolverStorage is not documented.
- src/shammodels/sph/include/shammodels/sph/modules/SolverStorage.hpp:108: warning: Member old_dtepsilon (variable) of class shammodels::sph::SolverStorage is not documented.
- src/shammodels/sph/include/shammodels/sph/modules/SolverStorage.hpp:109: warning: Member old_dtdeltav (variable) of class shammodels::sph::SolverStorage is not documented.
- src/shammodels/sph/include/shammodels/sph/modules/SolverStorage.hpp:110: warning: Member old_ds_j_dt (variable) of class shammodels::sph::SolverStorage is not documented.
+ src/shammodels/sph/include/shammodels/sph/modules/SolverStorage.hpp:110: warning: Member old_dtepsilon (variable) of class shammodels::sph::SolverStorage is not documented.
+ src/shammodels/sph/include/shammodels/sph/modules/SolverStorage.hpp:111: warning: Member old_dtdeltav (variable) of class shammodels::sph::SolverStorage is not documented.
+ src/shammodels/sph/include/shammodels/sph/modules/SolverStorage.hpp:112: warning: Member old_ds_j_dt (variable) of class shammodels::sph::SolverStorage is not documented.
- src/shammodels/sph/include/shammodels/sph/modules/SolverStorage.hpp:112: warning: Member sinks (variable) of class shammodels::sph::SolverStorage is not documented.
- src/shammodels/sph/include/shammodels/sph/modules/SolverStorage.hpp:114: warning: Compound shammodels::sph::SolverStorage::Timings is not documented.
+ src/shammodels/sph/include/shammodels/sph/modules/SolverStorage.hpp:114: warning: Member sinks (variable) of class shammodels::sph::SolverStorage is not documented.
- src/shammodels/sph/include/shammodels/sph/modules/SolverStorage.hpp:115: warning: Member interface (variable) of struct shammodels::sph::SolverStorage::Timings is not documented.
+ src/shammodels/sph/include/shammodels/sph/modules/SolverStorage.hpp:116: warning: Compound shammodels::sph::SolverStorage::Timings is not documented.
- src/shammodels/sph/include/shammodels/sph/modules/SolverStorage.hpp:116: warning: Member neighbors (variable) of struct shammodels::sph::SolverStorage::Timings is not documented.
+ src/shammodels/sph/include/shammodels/sph/modules/SolverStorage.hpp:117: warning: Member interface (variable) of struct shammodels::sph::SolverStorage::Timings is not documented.
- src/shammodels/sph/include/shammodels/sph/modules/SolverStorage.hpp:117: warning: Member io (variable) of struct shammodels::sph::SolverStorage::Timings is not documented.
+ src/shammodels/sph/include/shammodels/sph/modules/SolverStorage.hpp:118: warning: Member neighbors (variable) of struct shammodels::sph::SolverStorage::Timings is not documented.
+ src/shammodels/sph/include/shammodels/sph/modules/SolverStorage.hpp:119: warning: Member io (variable) of struct shammodels::sph::SolverStorage::Timings is not documented.
- src/shammodels/sph/include/shammodels/sph/modules/SolverStorage.hpp:121: warning: Member timings_details (variable) of class shammodels::sph::SolverStorage is not documented.
+ src/shammodels/sph/include/shammodels/sph/modules/SolverStorage.hpp:123: warning: Member timings_details (variable) of class shammodels::sph::SolverStorage is not documented.
- src/shammodels/sph/include/shammodels/sph/modules/UpdateDerivs.hpp:28: warning: Compound shammodels::sph::modules::UpdateDerivs is not documented.
+ src/shammodels/sph/include/shammodels/sph/modules/UpdateDerivs.hpp:29: warning: Compound shammodels::sph::modules::UpdateDerivs is not documented.
- src/shammodels/sph/include/shammodels/sph/modules/UpdateDerivs.hpp:30: warning: Member Tscal (typedef) of class shammodels::sph::modules::UpdateDerivs is not documented.
+ src/shammodels/sph/include/shammodels/sph/modules/UpdateDerivs.hpp:31: warning: Member Tscal (typedef) of class shammodels::sph::modules::UpdateDerivs is not documented.
- src/shammodels/sph/include/shammodels/sph/modules/UpdateDerivs.hpp:31: warning: Member dim (variable) of class shammodels::sph::modules::UpdateDerivs is not documented.
- src/shammodels/sph/include/shammodels/sph/modules/UpdateDerivs.hpp:32: warning: Member Kernel (typedef) of class shammodels::sph::modules::UpdateDerivs is not documented.
+ src/shammodels/sph/include/shammodels/sph/modules/UpdateDerivs.hpp:32: warning: Member dim (variable) of class shammodels::sph::modules::UpdateDerivs is not documented.
+ src/shammodels/sph/include/shammodels/sph/modules/UpdateDerivs.hpp:33: warning: Member Kernel (typedef) of class shammodels::sph::modules::UpdateDerivs is not documented.
- src/shammodels/sph/include/shammodels/sph/modules/UpdateDerivs.hpp:34: warning: Member Config (typedef) of class shammodels::sph::modules::UpdateDerivs is not documented.
+ src/shammodels/sph/include/shammodels/sph/modules/UpdateDerivs.hpp:35: warning: Member Config (typedef) of class shammodels::sph::modules::UpdateDerivs is not documented.
- src/shammodels/sph/include/shammodels/sph/modules/UpdateDerivs.hpp:35: warning: Member Storage (typedef) of class shammodels::sph::modules::UpdateDerivs is not documented.
+ src/shammodels/sph/include/shammodels/sph/modules/UpdateDerivs.hpp:36: warning: Member Storage (typedef) of class shammodels::sph::modules::UpdateDerivs is not documented.
- src/shammodels/sph/include/shammodels/sph/modules/UpdateDerivs.hpp:37: warning: Member context (variable) of class shammodels::sph::modules::UpdateDerivs is not documented.
+ src/shammodels/sph/include/shammodels/sph/modules/UpdateDerivs.hpp:38: warning: Member context (variable) of class shammodels::sph::modules::UpdateDerivs is not documented.
- src/shammodels/sph/include/shammodels/sph/modules/UpdateDerivs.hpp:38: warning: Member solver_config (variable) of class shammodels::sph::modules::UpdateDerivs is not documented.
+ src/shammodels/sph/include/shammodels/sph/modules/UpdateDerivs.hpp:39: warning: Member solver_config (variable) of class shammodels::sph::modules::UpdateDerivs is not documented.
- src/shammodels/sph/include/shammodels/sph/modules/UpdateDerivs.hpp:39: warning: Member storage (variable) of class shammodels::sph::modules::UpdateDerivs is not documented.
+ src/shammodels/sph/include/shammodels/sph/modules/UpdateDerivs.hpp:40: warning: Member storage (variable) of class shammodels::sph::modules::UpdateDerivs is not documented.
- src/shammodels/sph/include/shammodels/sph/modules/UpdateDerivs.hpp:41: warning: Member UpdateDerivs(ShamrockCtx &context, Config &solver_config, Storage &storage) (function) of class shammodels::sph::modules::UpdateDerivs is not documented.
+ src/shammodels/sph/include/shammodels/sph/modules/UpdateDerivs.hpp:42: warning: Member UpdateDerivs(ShamrockCtx &context, Config &solver_config, Storage &storage) (function) of class shammodels::sph::modules::UpdateDerivs is not documented.
- src/shammodels/sph/include/shammodels/sph/modules/UpdateDerivs.hpp:44: warning: Member update_derivs() (function) of class shammodels::sph::modules::UpdateDerivs is not documented.
+ src/shammodels/sph/include/shammodels/sph/modules/UpdateDerivs.hpp:45: warning: Member update_derivs() (function) of class shammodels::sph::modules::UpdateDerivs is not documented.
- src/shammodels/sph/src/pySPHModel.cpp:1339: warning: Member add_analysisBarycenter_instance(py::module &m, const std::string &name_model) (function) of file pySPHModel.cpp is not documented.
+ src/shammodels/sph/src/pySPHModel.cpp:1350: warning: Member add_analysisBarycenter_instance(py::module &m, const std::string &name_model) (function) of file pySPHModel.cpp is not documented.
- src/shammodels/sph/src/pySPHModel.cpp:1357: warning: Member add_analysisEnergyKinetic_instance(py::module &m, const std::string &name_model) (function) of file pySPHModel.cpp is not documented.
+ src/shammodels/sph/src/pySPHModel.cpp:1368: warning: Member add_analysisEnergyKinetic_instance(py::module &m, const std::string &name_model) (function) of file pySPHModel.cpp is not documented.
- src/shammodels/sph/src/pySPHModel.cpp:1373: warning: Member add_analysisEnergyPotential_instance(py::module &m, const std::string &name_model) (function) of file pySPHModel.cpp is not documented.
+ src/shammodels/sph/src/pySPHModel.cpp:1384: warning: Member add_analysisEnergyPotential_instance(py::module &m, const std::string &name_model) (function) of file pySPHModel.cpp is not documented.
- src/shammodels/sph/src/pySPHModel.cpp:1389: warning: Member add_analysisTotalMomentum_instance(py::module &m, const std::string &name_model) (function) of file pySPHModel.cpp is not documented.
+ src/shammodels/sph/src/pySPHModel.cpp:1400: warning: Member add_analysisTotalMomentum_instance(py::module &m, const std::string &name_model) (function) of file pySPHModel.cpp is not documented.
- src/shammodels/sph/src/pySPHModel.cpp:1405: warning: Member add_analysisAngularMomentum_instance(py::module &m, const std::string &name_model) (function) of file pySPHModel.cpp is not documented.
+ src/shammodels/sph/src/pySPHModel.cpp:1416: warning: Member add_analysisAngularMomentum_instance(py::module &m, const std::string &name_model) (function) of file pySPHModel.cpp is not documented.
- src/shammodels/sph/src/pySPHModel.cpp:1422: warning: Member analysis_impl(shammodels::sph::Model< Tvec, SPHKernel > &model) -> Analysis (function) of file pySPHModel.cpp is not documented.
- src/shammodels/sph/src/pySPHModel.cpp:1427: warning: Member register_analysis_impl_for_each_kernel(py::module &msph, const char *name_class) (function) of file pySPHModel.cpp is not documented.
+ src/shammodels/sph/src/pySPHModel.cpp:1433: warning: Member analysis_impl(shammodels::sph::Model< Tvec, SPHKernel > &model) -> Analysis (function) of file pySPHModel.cpp is not documented.
+ src/shammodels/sph/src/pySPHModel.cpp:1438: warning: Member register_analysis_impl_for_each_kernel(py::module &msph, const char *name_class) (function) of file pySPHModel.cpp is not documented.
- src/shammodels/sph/src/pySPHModel.cpp:1487: warning: Member ON_PYTHON_INIT (variable) of file pySPHModel.cpp is not documented.
- src/shammodels/sph/src/pySPHModel.cpp:1490: warning: Member add_instance< f64_3, shammath::C2 >(msph, "SPHModel_f64_3_C2_SolverConfig", "SPHModel_f64_3_C2") (function) of file pySPHModel.cpp is not documented.
- src/shammodels/sph/src/pySPHModel.cpp:1490: warning: Member add_instance< f64_3, shammath::C4 >(msph, "SPHModel_f64_3_C4_SolverConfig", "SPHModel_f64_3_C4") (function) of file pySPHModel.cpp is not documented.
- src/shammodels/sph/src/pySPHModel.cpp:1490: warning: Member add_instance< f64_3, shammath::C6 >(msph, "SPHModel_f64_3_C6_SolverConfig", "SPHModel_f64_3_C6") (function) of file pySPHModel.cpp is not documented.
- src/shammodels/sph/src/pySPHModel.cpp:1490: warning: Member add_instance< f64_3, shammath::M4 >(msph, "SPHModel_f64_3_M4_SolverConfig", "SPHModel_f64_3_M4") (function) of file pySPHModel.cpp is not documented.
- src/shammodels/sph/src/pySPHModel.cpp:1490: warning: Member add_instance< f64_3, shammath::M6 >(msph, "SPHModel_f64_3_M6_SolverConfig", "SPHModel_f64_3_M6") (function) of file pySPHModel.cpp is not documented.
- src/shammodels/sph/src/pySPHModel.cpp:1490: warning: Member add_instance< f64_3, shammath::M8 >(msph, "SPHModel_f64_3_M8_SolverConfig", "SPHModel_f64_3_M8") (function) of file pySPHModel.cpp is not documented.
- src/shammodels/sph/src/pySPHModel.cpp:1490: warning: Member msph (variable) of file pySPHModel.cpp is not documented.
+ src/shammodels/sph/src/pySPHModel.cpp:1498: warning: Member ON_PYTHON_INIT (variable) of file pySPHModel.cpp is not documented.
+ src/shammodels/sph/src/pySPHModel.cpp:1501: warning: Member add_instance< f64_3, shammath::C2 >(msph, "SPHModel_f64_3_C2_SolverConfig", "SPHModel_f64_3_C2") (function) of file pySPHModel.cpp is not documented.
+ src/shammodels/sph/src/pySPHModel.cpp:1501: warning: Member add_instance< f64_3, shammath::C4 >(msph, "SPHModel_f64_3_C4_SolverConfig", "SPHModel_f64_3_C4") (function) of file pySPHModel.cpp is not documented.
+ src/shammodels/sph/src/pySPHModel.cpp:1501: warning: Member add_instance< f64_3, shammath::C6 >(msph, "SPHModel_f64_3_C6_SolverConfig", "SPHModel_f64_3_C6") (function) of file pySPHModel.cpp is not documented.
+ src/shammodels/sph/src/pySPHModel.cpp:1501: warning: Member add_instance< f64_3, shammath::M4 >(msph, "SPHModel_f64_3_M4_SolverConfig", "SPHModel_f64_3_M4") (function) of file pySPHModel.cpp is not documented.
+ src/shammodels/sph/src/pySPHModel.cpp:1501: warning: Member add_instance< f64_3, shammath::M6 >(msph, "SPHModel_f64_3_M6_SolverConfig", "SPHModel_f64_3_M6") (function) of file pySPHModel.cpp is not documented.
+ src/shammodels/sph/src/pySPHModel.cpp:1501: warning: Member add_instance< f64_3, shammath::M8 >(msph, "SPHModel_f64_3_M8_SolverConfig", "SPHModel_f64_3_M8") (function) of file pySPHModel.cpp is not documented.
+ src/shammodels/sph/src/pySPHModel.cpp:1501: warning: Member msph (variable) of file pySPHModel.cpp is not documented.
- src/shammodels/sph/src/pySPHModel.cpp:1502: warning: Member VariantSPHModelBind (typedef) of file pySPHModel.cpp is not documented.
- src/shammodels/sph/src/pySPHModel.cpp:1510: warning: Member def("get_Model_SPH", [](ShamrockCtx &ctx, const std::string &vector_type, const std::string &kernel) -> VariantSPHModelBind { VariantSPHModelBind ret;if(vector_type=="f64_3" &&kernel=="M4") { ret=std::make_unique< Model< f64_3, shammath::M4 > >(ctx);} else if(vector_type=="f64_3" &&kernel=="M6") { ret=std::make_unique< Model< f64_3, shammath::M6 > >(ctx);} else if(vector_type=="f64_3" &&kernel=="M8") { ret=std::make_unique< Model< f64_3, shammath::M8 > >(ctx);} else if(vector_type=="f64_3" &&kernel=="C2") { ret=std::make_unique< Model< f64_3, shammath::C2 > >(ctx);} else if(vector_type=="f64_3" &&kernel=="C4") { ret=std::make_unique< Model< f64_3, shammath::C4 > >(ctx);} else if(vector_type=="f64_3" &&kernel=="C6") { ret=std::make_unique< Model< f64_3, shammath::C6 > >(ctx);} else { throw shambase::make_except_with_loc< std::invalid_argument >("unknown combination of representation and kernel");} return ret;}, py::kw_only(), py::arg("context"), py::arg("vector_type"), py::arg("sph_kernel")) (function) of file pySPHModel.cpp is not documented.
- src/shammodels/sph/src/pySPHModel.cpp:1510: warning: Member py::class_< shammodels::sph::modules::ISPHSetupNode, std::shared_ptr< shammodels::sph::modules::ISPHSetupNode > >(msph, "ISPHSetupNode") .def("get_dot" (function) of file pySPHModel.cpp is not documented.
+ src/shammodels/sph/src/pySPHModel.cpp:1513: warning: Member VariantSPHModelBind (typedef) of file pySPHModel.cpp is not documented.
+ src/shammodels/sph/src/pySPHModel.cpp:1521: warning: Member def("get_Model_SPH", [](ShamrockCtx &ctx, const std::string &vector_type, const std::string &kernel) -> VariantSPHModelBind { VariantSPHModelBind ret;if(vector_type=="f64_3" &&kernel=="M4") { ret=std::make_unique< Model< f64_3, shammath::M4 > >(ctx);} else if(vector_type=="f64_3" &&kernel=="M6") { ret=std::make_unique< Model< f64_3, shammath::M6 > >(ctx);} else if(vector_type=="f64_3" &&kernel=="M8") { ret=std::make_unique< Model< f64_3, shammath::M8 > >(ctx);} else if(vector_type=="f64_3" &&kernel=="C2") { ret=std::make_unique< Model< f64_3, shammath::C2 > >(ctx);} else if(vector_type=="f64_3" &&kernel=="C4") { ret=std::make_unique< Model< f64_3, shammath::C4 > >(ctx);} else if(vector_type=="f64_3" &&kernel=="C6") { ret=std::make_unique< Model< f64_3, shammath::C6 > >(ctx);} else { throw shambase::make_except_with_loc< std::invalid_argument >("unknown combination of representation and kernel");} return ret;}, py::kw_only(), py::arg("context"), py::arg("vector_type"), py::arg("sph_kernel")) (function) of file pySPHModel.cpp is not documented.
+ src/shammodels/sph/src/pySPHModel.cpp:1521: warning: Member py::class_< shammodels::sph::modules::ISPHSetupNode, std::shared_ptr< shammodels::sph::modules::ISPHSetupNode > >(msph, "ISPHSetupNode") .def("get_dot" (function) of file pySPHModel.cpp is not documented.
- src/shammodels/sph/src/pySPHModel.cpp:1544: warning: Member add_analysisAngularMomentum_instance< f64_3, shammath::C2 >(msph, "AnalysisAngularMomentum_f64_3_C2") (function) of file pySPHModel.cpp is not documented.
- src/shammodels/sph/src/pySPHModel.cpp:1544: warning: Member add_analysisAngularMomentum_instance< f64_3, shammath::C4 >(msph, "AnalysisAngularMomentum_f64_3_C4") (function) of file pySPHModel.cpp is not documented.
- src/shammodels/sph/src/pySPHModel.cpp:1544: warning: Member add_analysisAngularMomentum_instance< f64_3, shammath::C6 >(msph, "AnalysisAngularMomentum_f64_3_C6") (function) of file pySPHModel.cpp is not documented.
- src/shammodels/sph/src/pySPHModel.cpp:1544: warning: Member add_analysisAngularMomentum_instance< f64_3, shammath::M4 >(msph, "AnalysisAngularMomentum_f64_3_M4") (function) of file pySPHModel.cpp is not documented.
- src/shammodels/sph/src/pySPHModel.cpp:1544: warning: Member add_analysisAngularMomentum_instance< f64_3, shammath::M6 >(msph, "AnalysisAngularMomentum_f64_3_M6") (function) of file pySPHModel.cpp is not documented.
- src/shammodels/sph/src/pySPHModel.cpp:1544: warning: Member add_analysisAngularMomentum_instance< f64_3, shammath::M8 >(msph, "AnalysisAngularMomentum_f64_3_M8") (function) of file pySPHModel.cpp is not documented.
- src/shammodels/sph/src/pySPHModel.cpp:1544: warning: Member add_analysisBarycenter_instance< f64_3, shammath::C2 >(msph, "AnalysisBarycenter_f64_3_C2") (function) of file pySPHModel.cpp is not documented.
- src/shammodels/sph/src/pySPHModel.cpp:1544: warning: Member add_analysisBarycenter_instance< f64_3, shammath::C4 >(msph, "AnalysisBarycenter_f64_3_C4") (function) of file pySPHModel.cpp is not documented.
- src/shammodels/sph/src/pySPHModel.cpp:1544: warning: Member add_analysisBarycenter_instance< f64_3, shammath::C6 >(msph, "AnalysisBarycenter_f64_3_C6") (function) of file pySPHModel.cpp is not documented.
- src/shammodels/sph/src/pySPHModel.cpp:1544: warning: Member add_analysisBarycenter_instance< f64_3, shammath::M4 >(msph, "AnalysisBarycenter_f64_3_M4") (function) of file pySPHModel.cpp is not documented.
- src/shammodels/sph/src/pySPHModel.cpp:1544: warning: Member add_analysisBarycenter_instance< f64_3, shammath::M6 >(msph, "AnalysisBarycenter_f64_3_M6") (function) of file pySPHModel.cpp is not documented.
- src/shammodels/sph/src/pySPHModel.cpp:1544: warning: Member add_analysisBarycenter_instance< f64_3, shammath::M8 >(msph, "AnalysisBarycenter_f64_3_M8") (function) of file pySPHModel.cpp is not documented.
- src/shammodels/sph/src/pySPHModel.cpp:1544: warning: Member add_analysisEnergyKinetic_instance< f64_3, shammath::C2 >(msph, "AnalysisEnergyKinetic_f64_3_C2") (function) of file pySPHModel.cpp is not documented.
- src/shammodels/sph/src/pySPHModel.cpp:1544: warning: Member add_analysisEnergyKinetic_instance< f64_3, shammath::C4 >(msph, "AnalysisEnergyKinetic_f64_3_C4") (function) of file pySPHModel.cpp is not documented.
- src/shammodels/sph/src/pySPHModel.cpp:1544: warning: Member add_analysisEnergyKinetic_instance< f64_3, shammath::C6 >(msph, "AnalysisEnergyKinetic_f64_3_C6") (function) of file pySPHModel.cpp is not documented.
- src/shammodels/sph/src/pySPHModel.cpp:1544: warning: Member add_analysisEnergyKinetic_instance< f64_3, shammath::M4 >(msph, "AnalysisEnergyKinetic_f64_3_M4") (function) of file pySPHModel.cpp is not documented.
- src/shammodels/sph/src/pySPHModel.cpp:1544: warning: Member add_analysisEnergyKinetic_instance< f64_3, shammath::M6 >(msph, "AnalysisEnergyKinetic_f64_3_M6") (function) of file pySPHModel.cpp is not documented.
- src/shammodels/sph/src/pySPHModel.cpp:1544: warning: Member add_analysisEnergyKinetic_instance< f64_3, shammath::M8 >(msph, "AnalysisEnergyKinetic_f64_3_M8") (function) of file pySPHModel.cpp is not documented.
- src/shammodels/sph/src/pySPHModel.cpp:1544: warning: Member add_analysisEnergyPotential_instance< f64_3, shammath::C2 >(msph, "AnalysisEnergyPotential_f64_3_C2") (function) of file pySPHModel.cpp is not documented.
- src/shammodels/sph/src/pySPHModel.cpp:1544: warning: Member add_analysisEnergyPotential_instance< f64_3, shammath::C4 >(msph, "AnalysisEnergyPotential_f64_3_C4") (function) of file pySPHModel.cpp is not documented.
- src/shammodels/sph/src/pySPHModel.cpp:1544: warning: Member add_analysisEnergyPotential_instance< f64_3, shammath::C6 >(msph, "AnalysisEnergyPotential_f64_3_C6") (function) of file pySPHModel.cpp is not documented.
- src/shammodels/sph/src/pySPHModel.cpp:1544: warning: Member add_analysisEnergyPotential_instance< f64_3, shammath::M4 >(msph, "AnalysisEnergyPotential_f64_3_M4") (function) of file pySPHModel.cpp is not documented.
- src/shammodels/sph/src/pySPHModel.cpp:1544: warning: Member add_analysisEnergyPotential_instance< f64_3, shammath::M6 >(msph, "AnalysisEnergyPotential_f64_3_M6") (function) of file pySPHModel.cpp is not documented.
- src/shammodels/sph/src/pySPHModel.cpp:1544: warning: Member add_analysisEnergyPotential_instance< f64_3, shammath::M8 >(msph, "AnalysisEnergyPotential_f64_3_M8") (function) of file pySPHModel.cpp is not documented.
- src/shammodels/sph/src/pySPHModel.cpp:1544: warning: Member add_analysisTotalMomentum_instance< f64_3, shammath::C2 >(msph, "AnalysisTotalMomentum_f64_3_C2") (function) of file pySPHModel.cpp is not documented.
- src/shammodels/sph/src/pySPHModel.cpp:1544: warning: Member add_analysisTotalMomentum_instance< f64_3, shammath::C4 >(msph, "AnalysisTotalMomentum_f64_3_C4") (function) of file pySPHModel.cpp is not documented.
- src/shammodels/sph/src/pySPHModel.cpp:1544: warning: Member add_analysisTotalMomentum_instance< f64_3, shammath::C6 >(msph, "AnalysisTotalMomentum_f64_3_C6") (function) of file pySPHModel.cpp is not documented.
- src/shammodels/sph/src/pySPHModel.cpp:1544: warning: Member add_analysisTotalMomentum_instance< f64_3, shammath::M4 >(msph, "AnalysisTotalMomentum_f64_3_M4") (function) of file pySPHModel.cpp is not documented.
- src/shammodels/sph/src/pySPHModel.cpp:1544: warning: Member add_analysisTotalMomentum_instance< f64_3, shammath::M6 >(msph, "AnalysisTotalMomentum_f64_3_M6") (function) of file pySPHModel.cpp is not documented.
- src/shammodels/sph/src/pySPHModel.cpp:1544: warning: Member add_analysisTotalMomentum_instance< f64_3, shammath::M8 >(msph, "AnalysisTotalMomentum_f64_3_M8") (function) of file pySPHModel.cpp is not documented.
- src/shammodels/sph/src/pySPHModel.cpp:1544: warning: Member register_analysis_impl_for_each_kernel< modules::AnalysisAngularMomentum >(msph, "analysisAngularMomentum") (function) of file pySPHModel.cpp is not documented.
- src/shammodels/sph/src/pySPHModel.cpp:1544: warning: Member register_analysis_impl_for_each_kernel< modules::AnalysisBarycenter >(msph, "analysisBarycenter") (function) of file pySPHModel.cpp is not documented.
- src/shammodels/sph/src/pySPHModel.cpp:1544: warning: Member register_analysis_impl_for_each_kernel< modules::AnalysisEnergyKinetic >(msph, "analysisEnergyKinetic") (function) of file pySPHModel.cpp is not documented.
- src/shammodels/sph/src/pySPHModel.cpp:1544: warning: Member register_analysis_impl_for_each_kernel< modules::AnalysisEnergyPotential >(msph, "analysisEnergyPotential") (function) of file pySPHModel.cpp is not documented.
- src/shammodels/sph/src/pySPHModel.cpp:1544: warning: Member register_analysis_impl_for_each_kernel< modules::AnalysisTotalMomentum >(msph, "analysisTotalMomentum") (function) of file pySPHModel.cpp is not documented.
- src/shammodels/sph/src/pySPHModel.cpp:1544: warning: Member self (variable) of file pySPHModel.cpp is not documented.
- src/shammodels/sph/src/pySPHModel.cpp:1555: warning: Found ';' while parsing initializer list! (doxygen could be confused by a macro call without semicolon)
+ src/shammodels/sph/src/pySPHModel.cpp:1555: warning: Member add_analysisAngularMomentum_instance< f64_3, shammath::C2 >(msph, "AnalysisAngularMomentum_f64_3_C2") (function) of file pySPHModel.cpp is not documented.
+ src/shammodels/sph/src/pySPHModel.cpp:1555: warning: Member add_analysisAngularMomentum_instance< f64_3, shammath::C4 >(msph, "AnalysisAngularMomentum_f64_3_C4") (function) of file pySPHModel.cpp is not documented.
+ src/shammodels/sph/src/pySPHModel.cpp:1555: warning: Member add_analysisAngularMomentum_instance< f64_3, shammath::C6 >(msph, "AnalysisAngularMomentum_f64_3_C6") (function) of file pySPHModel.cpp is not documented.
+ src/shammodels/sph/src/pySPHModel.cpp:1555: warning: Member add_analysisAngularMomentum_instance< f64_3, shammath::M4 >(msph, "AnalysisAngularMomentum_f64_3_M4") (function) of file pySPHModel.cpp is not documented.
+ src/shammodels/sph/src/pySPHModel.cpp:1555: warning: Member add_analysisAngularMomentum_instance< f64_3, shammath::M6 >(msph, "AnalysisAngularMomentum_f64_3_M6") (function) of file pySPHModel.cpp is not documented.
+ src/shammodels/sph/src/pySPHModel.cpp:1555: warning: Member add_analysisAngularMomentum_instance< f64_3, shammath::M8 >(msph, "AnalysisAngularMomentum_f64_3_M8") (function) of file pySPHModel.cpp is not documented.
+ src/shammodels/sph/src/pySPHModel.cpp:1555: warning: Member add_analysisBarycenter_instance< f64_3, shammath::C2 >(msph, "AnalysisBarycenter_f64_3_C2") (function) of file pySPHModel.cpp is not documented.
+ src/shammodels/sph/src/pySPHModel.cpp:1555: warning: Member add_analysisBarycenter_instance< f64_3, shammath::C4 >(msph, "AnalysisBarycenter_f64_3_C4") (function) of file pySPHModel.cpp is not documented.
+ src/shammodels/sph/src/pySPHModel.cpp:1555: warning: Member add_analysisBarycenter_instance< f64_3, shammath::C6 >(msph, "AnalysisBarycenter_f64_3_C6") (function) of file pySPHModel.cpp is not documented.
+ src/shammodels/sph/src/pySPHModel.cpp:1555: warning: Member add_analysisBarycenter_instance< f64_3, shammath::M4 >(msph, "AnalysisBarycenter_f64_3_M4") (function) of file pySPHModel.cpp is not documented.
+ src/shammodels/sph/src/pySPHModel.cpp:1555: warning: Member add_analysisBarycenter_instance< f64_3, shammath::M6 >(msph, "AnalysisBarycenter_f64_3_M6") (function) of file pySPHModel.cpp is not documented.
+ src/shammodels/sph/src/pySPHModel.cpp:1555: warning: Member add_analysisBarycenter_instance< f64_3, shammath::M8 >(msph, "AnalysisBarycenter_f64_3_M8") (function) of file pySPHModel.cpp is not documented.
+ src/shammodels/sph/src/pySPHModel.cpp:1555: warning: Member add_analysisEnergyKinetic_instance< f64_3, shammath::C2 >(msph, "AnalysisEnergyKinetic_f64_3_C2") (function) of file pySPHModel.cpp is not documented.
+ src/shammodels/sph/src/pySPHModel.cpp:1555: warning: Member add_analysisEnergyKinetic_instance< f64_3, shammath::C4 >(msph, "AnalysisEnergyKinetic_f64_3_C4") (function) of file pySPHModel.cpp is not documented.
+ src/shammodels/sph/src/pySPHModel.cpp:1555: warning: Member add_analysisEnergyKinetic_instance< f64_3, shammath::C6 >(msph, "AnalysisEnergyKinetic_f64_3_C6") (function) of file pySPHModel.cpp is not documented.
+ src/shammodels/sph/src/pySPHModel.cpp:1555: warning: Member add_analysisEnergyKinetic_instance< f64_3, shammath::M4 >(msph, "AnalysisEnergyKinetic_f64_3_M4") (function) of file pySPHModel.cpp is not documented.
+ src/shammodels/sph/src/pySPHModel.cpp:1555: warning: Member add_analysisEnergyKinetic_instance< f64_3, shammath::M6 >(msph, "AnalysisEnergyKinetic_f64_3_M6") (function) of file pySPHModel.cpp is not documented.
+ src/shammodels/sph/src/pySPHModel.cpp:1555: warning: Member add_analysisEnergyKinetic_instance< f64_3, shammath::M8 >(msph, "AnalysisEnergyKinetic_f64_3_M8") (function) of file pySPHModel.cpp is not documented.
+ src/shammodels/sph/src/pySPHModel.cpp:1555: warning: Member add_analysisEnergyPotential_instance< f64_3, shammath::C2 >(msph, "AnalysisEnergyPotential_f64_3_C2") (function) of file pySPHModel.cpp is not documented.
+ src/shammodels/sph/src/pySPHModel.cpp:1555: warning: Member add_analysisEnergyPotential_instance< f64_3, shammath::C4 >(msph, "AnalysisEnergyPotential_f64_3_C4") (function) of file pySPHModel.cpp is not documented.
+ src/shammodels/sph/src/pySPHModel.cpp:1555: warning: Member add_analysisEnergyPotential_instance< f64_3, shammath::C6 >(msph, "AnalysisEnergyPotential_f64_3_C6") (function) of file pySPHModel.cpp is not documented.
+ src/shammodels/sph/src/pySPHModel.cpp:1555: warning: Member add_analysisEnergyPotential_instance< f64_3, shammath::M4 >(msph, "AnalysisEnergyPotential_f64_3_M4") (function) of file pySPHModel.cpp is not documented.
+ src/shammodels/sph/src/pySPHModel.cpp:1555: warning: Member add_analysisEnergyPotential_instance< f64_3, shammath::M6 >(msph, "AnalysisEnergyPotential_f64_3_M6") (function) of file pySPHModel.cpp is not documented.
+ src/shammodels/sph/src/pySPHModel.cpp:1555: warning: Member add_analysisEnergyPotential_instance< f64_3, shammath::M8 >(msph, "AnalysisEnergyPotential_f64_3_M8") (function) of file pySPHModel.cpp is not documented.
+ src/shammodels/sph/src/pySPHModel.cpp:1555: warning: Member add_analysisTotalMomentum_instance< f64_3, shammath::C2 >(msph, "AnalysisTotalMomentum_f64_3_C2") (function) of file pySPHModel.cpp is not documented.
+ src/shammodels/sph/src/pySPHModel.cpp:1555: warning: Member add_analysisTotalMomentum_instance< f64_3, shammath::C4 >(msph, "AnalysisTotalMomentum_f64_3_C4") (function) of file pySPHModel.cpp is not documented.
+ src/shammodels/sph/src/pySPHModel.cpp:1555: warning: Member add_analysisTotalMomentum_instance< f64_3, shammath::C6 >(msph, "AnalysisTotalMomentum_f64_3_C6") (function) of file pySPHModel.cpp is not documented.
+ src/shammodels/sph/src/pySPHModel.cpp:1555: warning: Member add_analysisTotalMomentum_instance< f64_3, shammath::M4 >(msph, "AnalysisTotalMomentum_f64_3_M4") (function) of file pySPHModel.cpp is not documented.
+ src/shammodels/sph/src/pySPHModel.cpp:1555: warning: Member add_analysisTotalMomentum_instance< f64_3, shammath::M6 >(msph, "AnalysisTotalMomentum_f64_3_M6") (function) of file pySPHModel.cpp is not documented.
+ src/shammodels/sph/src/pySPHModel.cpp:1555: warning: Member add_analysisTotalMomentum_instance< f64_3, shammath::M8 >(msph, "AnalysisTotalMomentum_f64_3_M8") (function) of file pySPHModel.cpp is not documented.
+ src/shammodels/sph/src/pySPHModel.cpp:1555: warning: Member register_analysis_impl_for_each_kernel< modules::AnalysisAngularMomentum >(msph, "analysisAngularMomentum") (function) of file pySPHModel.cpp is not documented.
+ src/shammodels/sph/src/pySPHModel.cpp:1555: warning: Member register_analysis_impl_for_each_kernel< modules::AnalysisBarycenter >(msph, "analysisBarycenter") (function) of file pySPHModel.cpp is not documented.
+ src/shammodels/sph/src/pySPHModel.cpp:1555: warning: Member register_analysis_impl_for_each_kernel< modules::AnalysisEnergyKinetic >(msph, "analysisEnergyKinetic") (function) of file pySPHModel.cpp is not documented.
+ src/shammodels/sph/src/pySPHModel.cpp:1555: warning: Member register_analysis_impl_for_each_kernel< modules::AnalysisEnergyPotential >(msph, "analysisEnergyPotential") (function) of file pySPHModel.cpp is not documented.
+ src/shammodels/sph/src/pySPHModel.cpp:1555: warning: Member register_analysis_impl_for_each_kernel< modules::AnalysisTotalMomentum >(msph, "analysisTotalMomentum") (function) of file pySPHModel.cpp is not documented.
+ src/shammodels/sph/src/pySPHModel.cpp:1555: warning: Member self (variable) of file pySPHModel.cpp is not documented.
+ src/shammodels/sph/src/pySPHModel.cpp:1566: warning: Found ';' while parsing initializer list! (doxygen could be confused by a macro call without semicolon)

@y-lapeyre
Copy link
Copy Markdown
Collaborator Author

/gemini review

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces Non-Ideal Magnetohydrodynamics (NIMHD) support to the SPH solver, including configurations for Ohmic resistivity, Hall effect, and Ambipolar diffusion, as well as the calculation of electric current density and non-ideal heating/induction terms. The review feedback highlights critical issues with SYCL event shadowing that can lead to concurrent kernel execution and data races on the timestep buffer. Other recommendations include evaluating the NIMHD flag at compile-time, skipping self-interactions in SPH neighbor loops, removing commented-out code, and resolving a developer query about the correct kernel gradient.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

// first, finish the outer kernel and write in cfl_dt
// then, compute psi_dt and write in cfl_dt
depends_list.add_event(e);
auto e = q.submit(depends_list, [&](sycl::handler &cgh) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

The variable e is shadowed here using auto e = ... inside the if (has_psi_field) block. This prevents the outer e variable (from the first CFL kernel) from being updated. Consequently, when entering the if (do_NIMHD) block, depends_list.add_event(e) will add the first CFL kernel's event instead of the psi cleaning kernel's event. This causes the NIMHD kernel and the psi cleaning kernel to run concurrently, leading to a data race on cfl_dt and potential undefined behavior. Removing auto to reassign the outer e variable resolves this issue.

Suggested change
auto e = q.submit(depends_list, [&](sycl::handler &cgh) {
e = q.submit(depends_list, [&](sycl::handler &cgh) {


if (do_NIMHD) {
depends_list.add_event(e);
auto e = q.submit(depends_list, [&](sycl::handler &cgh) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

Similarly, e is shadowed here using auto e = ... inside the if (do_NIMHD) block. This prevents the outer e from being updated to the NIMHD kernel's event, meaning the subsequent complete_event_state(e) calls on lines 2614-2616 may not wait for the NIMHD kernel to finish. Removing auto to reassign the outer e variable resolves this issue.

Suggested change
auto e = q.submit(depends_list, [&](sycl::handler &cgh) {
e = q.submit(depends_list, [&](sycl::handler &cgh) {

u32 iB_on_rho_interf = ghost_layout.get_field_idx<Tvec>("B/rho");
u32 ipsi_on_ch_interf = ghost_layout.get_field_idx<Tscal>("psi/ch");

bool do_NIMHD = solver_config.do_NIMHD();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

do_NIMHD is evaluated at runtime using solver_config.do_NIMHD(). Since MHD_mode is a template parameter of update_derivs_MHD_impl, this can be evaluated at compile-time as constexpr bool do_NIMHD = (MHD_mode == shamrock::sph::mhd::MHDType::NonIdeal);. This allows the compiler to optimize away the Non-Ideal branches when compiling the Ideal MHD version.

Suggested change
bool do_NIMHD = solver_config.do_NIMHD();
constexpr bool do_NIMHD = (MHD_mode == shamrock::sph::mhd::MHDType::NonIdeal);

Comment on lines +822 to +825
particle_looper.for_each_object(id_a, [&](u32 id_b) {
Tvec dr = xyz_a - xyz[id_b];
Tscal rab2 = sycl::dot(dr, dr);
Tscal h_b = hpart[id_b];
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

In SPH neighbor loops, self-interaction (id_a == id_b) can be skipped early to avoid redundant calculations (since B_a - B_b is zero, the contribution to J_a is mathematically zero).

                particle_looper.for_each_object(id_a, [&](u32 id_b) {
                    if (id_a == id_b) {
                        return;
                    }
                    Tvec dr    = xyz_a - xyz[id_b];
                    Tscal rab2 = sycl::dot(dr, dr);
                    Tscal h_b  = hpart[id_b];

Comment on lines +1079 to +1082
particle_looper.for_each_object(id_a, [&](u32 id_b) {
Tvec dr = xyz_a - xyz[id_b];
Tscal rab2 = sycl::dot(dr, dr);
Tscal h_b = hpart[id_b];
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

In SPH neighbor loops, self-interaction (id_a == id_b) can be skipped early to avoid redundant calculations.

                particle_looper.for_each_object(id_a, [&](u32 id_b) {
                    if (id_a == id_b) {
                        return;
                    }
                    Tvec dr    = xyz_a - xyz[id_b];
                    Tscal rab2 = sycl::dot(dr, dr);
                    Tscal h_b  = hpart[id_b];

Comment on lines +461 to +464
// Tvec J_a = MagCurrentJ<Tvec, Tscal, MHD_mode>(
// pmass, B_a, B_b, r_ab_unit * dWab_a, sub_fact_a, mu_0);
// Tvec J_b = MagCurrentJ<Tvec, Tscal, MHD_mode>(
// pmass, B_a, B_b, r_ab_unit * dWab_b, sub_fact_b, mu_0);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Commented-out code for J_a and J_b calculation should be removed.

+= v_ab * dB_on_rho_induction_term(pmass, rho_a_sq, B_a, omega_a, r_ab_unit * dWab_b);
dB_on_rho_dt += v_ab
* dB_on_rho_induction_term(
pmass, rho_a_sq, B_a, omega_a, r_ab_unit * dWab_a); // @@@ dWab_b ?
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The developer left a query // @@@ dWab_b ? regarding whether dWab_a or dWab_b should be used. Since the induction term is evaluated for particle a using particle a's properties (rho_a_sq, B_a, omega_a), the kernel gradient must be evaluated with respect to particle a's smoothing length (h_a), which corresponds to dWab_a. Thus, dWab_a is mathematically correct, and the comment can be removed.

Suggested change
pmass, rho_a_sq, B_a, omega_a, r_ab_unit * dWab_a); // @@@ dWab_b ?
pmass, rho_a_sq, B_a, omega_a, r_ab_unit * dWab_a);

@tdavidcl tdavidcl changed the title [non-ideal MHD] Add Non-Ideal MHD terms [SPH][NIMHD] Add Non-Ideal MHD terms Jun 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant