google-deepmind / torax

TORAX: Tokamak transport simulation in JAX
https://torax.readthedocs.io
Other
345 stars 31 forks source link

`jtot_hires` is not always needed #219

Closed theo-brown closed 3 months ago

theo-brown commented 3 months ago

jtot_hires is meant to be used when computing the psi field from prescribed currents.

As this is only done in some cases, jtot_hires should be an optional parameter of the Currents dataclass.

For example, the function _calculate_currents_from_psi is meant to compute self-consistent currents from the psi field, and therefore does not require the jtot_hires to be set.