Skip to content

Commit

Permalink
Consolidate jitting in post_processing to make_outputs
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 726234907
  • Loading branch information
jcitrin authored and Torax team committed Feb 13, 2025
1 parent b695cc5 commit a0bb163
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions torax/post_processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
}


@jax_utils.jit
def _compute_pressure(
core_profiles: state.CoreProfiles,
) -> tuple[array_typing.ArrayFloat, ...]:
Expand Down Expand Up @@ -88,7 +87,6 @@ def _compute_pressure(
)


@jax_utils.jit
def _compute_pprime(
core_profiles: state.CoreProfiles,
) -> array_typing.ArrayFloat:
Expand Down Expand Up @@ -137,7 +135,6 @@ def _compute_pprime(


# pylint: disable=invalid-name
@jax_utils.jit
def _compute_FFprime(
core_profiles: state.CoreProfiles,
geo: geometry.Geometry,
Expand Down Expand Up @@ -178,7 +175,6 @@ def _compute_FFprime(
# pylint: enable=invalid-name


@jax_utils.jit
def _compute_stored_thermal_energy(
p_el: array_typing.ArrayFloat,
p_ion: array_typing.ArrayFloat,
Expand All @@ -205,7 +201,6 @@ def _compute_stored_thermal_energy(
return wth_el, wth_ion, wth_tot


@jax_utils.jit
def _calculate_integrated_sources(
geo: geometry.Geometry,
core_profiles: state.CoreProfiles,
Expand Down Expand Up @@ -301,7 +296,6 @@ def _calculate_integrated_sources(
return integrated


@jax_utils.jit
def _calculate_q95(
psi_norm_face: array_typing.ArrayFloat,
core_profiles: state.CoreProfiles,
Expand All @@ -320,6 +314,7 @@ def _calculate_q95(
return q95


@jax_utils.jit
def make_outputs(
sim_state: state.ToraxSimState,
geo: geometry.Geometry,
Expand Down
Binary file modified torax/tests/test_data/test_changing_config_after.nc
Binary file not shown.
Binary file modified torax/tests/test_data/test_changing_config_before.nc
Binary file not shown.

0 comments on commit a0bb163

Please sign in to comment.