Skip to content

Commit

Permalink
Fix output of neutral source terms
Browse files Browse the repository at this point in the history
  • Loading branch information
johnomotani committed Sep 12, 2024
1 parent fe922fa commit 5ecabac
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions moment_kinetics/src/file_io.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2707,23 +2707,24 @@ function write_neutral_moments_data_to_binary(scratch, moments, n_neutral_specie
append_to_dynamic_var(io_moments.thermal_speed_neutral, moments.neutral.vth,
t_idx, parallel_io, z, r, n_neutral_species)
if io_moments.external_source_neutral_amplitude !== nothing
n_sources = size(moments.neutral.external_source_amplitude)[3]
append_to_dynamic_var(io_moments.external_source_neutral_amplitude,
moments.neutral.external_source_amplitude, t_idx,
parallel_io, z, r)
parallel_io, z, r, n_sources)
if moments.evolve_density
append_to_dynamic_var(io_moments.external_source_neutral_density_amplitude,
moments.neutral.external_source_density_amplitude,
t_idx, parallel_io, z, r)
t_idx, parallel_io, z, r, n_sources)
end
if moments.evolve_upar
append_to_dynamic_var(io_moments.external_source_neutral_momentum_amplitude,
moments.neutral.external_source_momentum_amplitude,
t_idx, parallel_io, z, r)
t_idx, parallel_io, z, r, n_sources)
end
if moments.evolve_ppar
append_to_dynamic_var(io_moments.external_source_neutral_pressure_amplitude,
moments.neutral.external_source_pressure_amplitude,
t_idx, parallel_io, z, r)
t_idx, parallel_io, z, r, n_sources)
end
end
if io_moments.external_source_neutral_controller_integral !== nothing
Expand Down

0 comments on commit 5ecabac

Please sign in to comment.