Closed lehnertu closed 6 years ago
With this approach it is not possible to make a snapshot of the fields around the bunch. This would require some history (trajectory) long enough for the fields to spread over the observation volume.
Maybe this can be decided dynamically depending on whether a snapshot is required or not. If so, one should also provide som extrapolation of the trajectories to the far past (assuming a straight trajectory with constant velocity).
A snapshot still can be done. It is known from the beginning of the run. So a snapshot is just a trace with a single time bucket. It will be filled during the tracking and can be read when the tracking time has reached the time of the snapshot.
solved by merge of the "on-the-fly" branch
If all field computationss (observer) and output could be handled "on the fly", there would be no need to store any trajectories.
The beam object which is ultimately doing the stepping could keep a list of observers and pass the latest step field data to those observer->StepUpdate() This must be passed through down to the particle, so also the interpolation is properly handled.