lehnertu / TEUFEL

THz Emission from Undulators and Free-Electron Lasers
GNU General Public License v3.0
6 stars 2 forks source link

don't store trajectories #10

Closed lehnertu closed 6 years ago

lehnertu commented 6 years ago

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.

lehnertu commented 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.

lehnertu commented 6 years ago

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).

lehnertu commented 6 years ago

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.

lehnertu commented 6 years ago

solved by merge of the "on-the-fly" branch