Warwick-Plasma / epoch

Particle-in-cell code for plasma physics simulations
https://epochpic.github.io
GNU General Public License v3.0
182 stars 58 forks source link

Fields subsets, skip doesn't work on species derived grid variables #365

Open DoubleAgentDave opened 2 years ago

DoubleAgentDave commented 2 years ago

I'm trying to only output reduced grid variables as the simulations I'm running are very large, and this seems to work on everything except derived and species variables. I'm pretty sure this is just an issue with my syntax rather than a bug but when using the following syntax in the input deck (does 'single' do anything anymore?):

input.deck syntax

begin:subset
    name = fields_reduced
    skip = 4
end:subset

begin:output
    name = fields
    file_prefix = fields
    use_offset_grid = F
    dt_snapshot = 5 * femto
    time_stop = 300*femto
    particles = never

    grid = fields_reduced + always + single
    ex = fields_reduced + always + single
    ey = fields_reduced + always + single
    ez = fields_reduced + always + single
    bx = fields_reduced + always + single
    by = fields_reduced + always + single
    bz = fields_reduced + always + single
    jx = fields_reduced + always + single
    jy = fields_reduced + always + single
    jz = fields_reduced + always + single
    number_density = fields_reduced + always + single + species
    ekbar = fields_reduced + always + single + species

end:output

dumped variable names

These variables are then dumped (ignoring all the surface variables):

Current_Jx_Reduced_fields_reduced Current_Jy_Reduced_fields_reduced Current_Jz_Reduced_fields_reduced Derived_Average_Particle_Energy Derived_Average_Particle_Energy_Carbon Derived_Average_Particle_Energy_Electron Derived_Average_Particle_Energy_Subset_fields_reduced_Reduced Derived_Jx_Subset_fields_reduced_Reduced Derived_Jy_Subset_fields_reduced_Reduced Derived_Jz_Subset_fields_reduced_Reduced Derived_Number_Density Derived_Number_Density_Carbon Derived_Number_Density_Electron Derived_Number_Density_Subset_fields_reduced_Reduced Electric_Field_Ex_Reduced_fields_reduced Electric_Field_Ey_Reduced_fields_reduced Electric_Field_Ez_Reduced_fields_reduced Grid_CPUs_Original_rank Grid_CPUs_Original_rank_mid Grid_Grid Grid_Grid_mid Grid_Reduced_fields_reduced Grid_Reduced_fields_reduced_mid Header Magnetic_Field_Bx_Reduced_fields_reduced Magnetic_Field_By_Reduced_fields_reduced Magnetic_Field_Bz_Reduced_fields_reduced

Also what exactly is the difference between Current_Jx and Derived_Jx? I've not got current smoothing on or anything so I'd assume these should be the same?

DoubleAgentDave commented 2 years ago

Also doesn't work on averaged variables :(