svenreiche / Genesis-1.3-Version4

Time-dependent, 3D Code to simulate the amplification process of a Free-electron Laser.
GNU General Public License v3.0
53 stars 26 forks source link

importfield: Possibility to replace already existing fields #145

Closed ZeugAusHH closed 7 months ago

ZeugAusHH commented 7 months ago

This patch adds the new, experimental feature to replace already existing fields with a field imported from a file.

The new parameter replace was added to importfield and the default behavior remains unchanged.

If the user provides replace=true to &importfield, then an already existing field at this harmonic will be replaced by the data loaded from the field file.

ZeugAusHH commented 7 months ago

Dear Ken,

it is correct that the 'replace' parameter is not documented at the moment. If documented it should be marked clearly as "experimental" (or "under development").

Best Christoph

On 16.01.2024 18:38, Ken Lauer wrote:

@ken-lauer commented on this pull request.

@@ -18,42 +12,42 @@ void ImportField::usage(){ cout << " string file = " << endl; cout << " int harmonic = 1" << endl; cout << " bool time = true" << endl;

  • cout << " bool replace = false" << endl;

This new importfield parameter wasn't added to the manual. I'll make a PR to add it shortly.

ken-lauer commented 7 months ago

Hi Christoph,

I only realized after my comment that this was merged to the dev branch - I deleted it shortly after. My apologies! If/when this feature gets merged to master, I'll try to help ensure it gets in the manual.

Thanks - Ken