You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
VlasovAmpereOneSpecies: total_energy jumps after the first step with the control variate (and is offset at t=0 with full-f weights) #767
Bug: with WeightsParameters(control_variate=True), the total_energy scalar of VlasovAmpereOneSpecies jumps after the first time step. A second, smaller offset at t=0 also appears with full-f weights.
Control variate.kinetic_energy (KineticEnergyPIC, models/scalars.py) sums weights * |v|^2. At t=0 it is computed with the full-f weights, and after the first step (once update_weights has run in VlasovAmpereCoupling) with the delta-f weights. The two values are energies of different quantities, so total_energy is not comparable across the first step, and energy conservation cannot be checked with the control variate.
Full-f weights.total_energy is conserved from step to step to about 1e-9 (Crank-Nicolson coupling, pcg tolerance 1e-12), but its value at t=0 differs from the later values by about 2e-4 relative. Not investigated yet; probably the initial diagnostic, not the time stepping.
Both were found in #734: its e2e test test_gpu_VlasovAmpereOneSpecies.py uses full-f weights for this reason, and checks the t=0 value only loosely (check_reference).
Expected: the kinetic energy diagnostic uses the same weights (full f, i.e. delta-f weights plus the background contribution) at every time, and total_energy at t=0 matches the conserved value.
Activity
[gpu-1] End-to-end GPU test of VlasovAmpereOneSpecies on 1 and 2 ranks (
spossann commentedon Oct 14, 2026
fixed in #738