I’m solving a simultaneous system of linear differential equations (about 40 million simultaneous equations). I am using QNDF solver, with option dense= false. it works well. Since I have a lot of save points, storage is an issue. I don’t want to store all 40 million values at my save points. I just want the ODE solver to save the average of all the values, at each save point. I am aware of call backs in Julia, but I’m unsure of how to utilise that for my problem. Kindly suggest codes to solve this issue.

Note: my problem may be similar to a 3D convection diffusion type equations but not exactly that. If any further information is required I will be willing to share.