Add custom laser profile injection to epoch2d/3d - #917
Open
ZheyuanChen wants to merge 5 commits into
Open
ZheyuanChen wants to merge 5 commits into
ZheyuanChen wants to merge 5 commits into
Conversation
Copied from the developer's branch. Sanitised the comments and formatting, and reset the Makefile to the upstream default.
Example decks and generator scripts are in epoch2d/example_decks and epoch3d/example_decks. Documentation is in DOCUMENTATION_LASER_INJECTION.pdf.
Rebuilds the title, author affiliation, and two-channel polarisation section after review feedback.
local_slab_window fell back to the full plane on every rank for the whole run whenever use_balance was set, since the windowed slab relied on the domain settling once and staying put. Continuous dynamic load balancing never settles, so a laser needing both a large injected file and real load balancing had no way to keep the per-rank windowing. Add reslab_custom_laser_files, called from balance_workload right after redistribute_domain, which re-derives each spatiotemporal laser's window and reloads its file against the new domain. Defer the first load under use_balance the same way already done for use_pre_balance, since the reload now keeps the saving current rather than needing it to be final.
Track the LaTeX source behind DOCUMENTATION_LASER_INJECTION.pdf, which was previously committed as a compiled artefact only. Update the memory-cost section to describe the use_balance re-slabbing added in the previous commit, and regenerate the PDF.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This continues the discussion from #910 : it adds support for loading a laser's amplitude and (optionally) phase profile from an external raw binary data file, instead of specifying it as an analytic deck expression. Implemented in epoch2d and epoch3d; epoch1d is unmodified. Also, this contains some uptates (continuously re-slabbing for 3D simulations) since my last PR a few weeks ago (deleted because of out-of-date).
Two modes, selected per laser block:
use_spatiotemporal_profile = T): the full amplitudeA(transverse, t)is interpolated from file at every time step.use_spatiotemporal_profile = F): a time-independent spatial profile is interpolated onto the boundary once at start-up; the temporal envelope is set as usual viat_profile.The file format is raw binary with no embedded header (
access='stream'), matching EPOCH's own documented convention for external data files (particles_from_fileand others) rather than introducing a new one. Grid shape and bounds are declared in the deck, not the file. Each laser block owns its own grid declaration and data, so two custom-file laser blocks on the same boundary (e.g. one per transverse polarisation channel viapol = 0/pol = 90) load independent files.Full details, the deck element reference, the file format spec, the phase sign convention, and current limitations are in the attached
DOCUMENTATION_LASER_INJECTION.pdf.Example
Runnable 2D and 3D examples, each with a script to generate the amplitude/phase files, are in
example_decks/in both epoch2d and epoch3d. For more examples see hereBackward compatibility
use_custom_profiledefaults toF; every new deck element introduced here is inert unless a laser block opts in, so existing decks and analytic laser profiles are unaffected.Testing and Validation
See here.
Best regards,
Zheyuan