slaclab / lume-genesis

Genesis 1.3 tools for use in LUME
https://slaclab.github.io/lume-genesis/
Apache License 2.0
4 stars 7 forks source link

ENH: an example of load_profile_multi #18

Closed ken-lauer closed 6 months ago

ken-lauer commented 6 months ago

What do you think, @ChristopherMayes ?

The output is as follows:

``` $ genesis4 cu_hxr_multi.in --------------------------------------------- GENESIS - Version 4.6.4 has started... Compile info: Compiled by runner at 2023-12-16 00:59:36 [UTC] from Git Commit ID: Starting Time: Wed Jan 17 11:58:53 2024 MPI-Comm Size: 1 node Parsing lattice file... Setting up time window of 15.0027 microns with 544 sample points... Generating input radiation field for HARM = 1 ... Adding profile with label: beam.current Adding profile with label: beam.gamma Generating input particle distribution... Running Core Simulation... Time-dependent run with 544 slices for a time window of 15.0027 microns Initial analysis of electron beam and radiation field... Calculation: 0% done Calculation: 10% done Calculation: 20% done Calculation: 30% done Calculation: 40% done Calculation: 50% done Calculation: 60% done Calculation: 70% done Calculation: 80% done Calculation: 90% done Calculation: 100% done Calculation terminated due to requested stop. Writing output file... Core Simulation done. Diagnostic::~Diagnostic() End of Track Program is terminating... Ending Time: Wed Jan 17 12:01:00 2024 Total Wall Clock Time: 125.721 seconds ------------------------------------- ```
ChristopherMayes commented 6 months ago

@ken-lauer do you mean to just automatically make this on the LUME-Genesis side when writing the input? That looks nice to me if it indeed works in Genesis4.

ken-lauer commented 6 months ago

Yes, we would avoid symlinks and other hacks necessary to run genesis with profile file outside of the current working directory.

I would go so far as to say one should not use profile_file when this sensible alternative exists, assuming there's nothing I'm missing.

ChristopherMayes commented 6 months ago

We can't keep users from using profile_file in the input. But LUME-Genesis should always just ingest that and handle in this better way.

ken-lauer commented 6 months ago

Does this example have any place in the repo, or should I close this?

ChristopherMayes commented 6 months ago

Unless it's used for a test/example, not now.