-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make from_file and other laser init compatible #1157
Merged
MaxThevenet
merged 22 commits into
Hi-PACE:development
from
huixingjian:Read_from_file_commitfix
Oct 10, 2024
Merged
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
0e2b6ea
update the documentation
huixingjian a9addda
delete .DS file
huixingjian 7dbab1b
add arguments in Laser object
huixingjian 6559263
add the read_from_file funcions to laser object
huixingjian 91c1fe2
add read file funcation to laser object
huixingjian 648ed7a
add read from file in slice_init
huixingjian c504a84
missing laser creation
huixingjian 0a4ea31
Intialise the laser objects
huixingjian a531197
Update src/laser/Laser.cpp
huixingjian ff11124
Update src/laser/Laser.H
huixingjian 6a28742
Update src/laser/MultiLaser.cpp
huixingjian d48b1da
Update src/laser/MultiLaser.cpp
huixingjian d074632
Update src/laser/Laser.cpp
huixingjian 086c4bb
add documentation for varaibles
huixingjian b19863c
add comments
huixingjian e5d9619
change the document
huixingjian f0fa8dd
admend the doc
huixingjian a0f03b2
delete useless files
huixingjian 70a34ed
add /n when print laser loaded
huixingjian 4997379
Merge branch 'origin_devel' into huixingjian/Read_from_file_commitfix
huixingjian e576848
Update src/laser/MultiLaser.cpp
huixingjian 0f7b978
typo in doc
huixingjian File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -871,70 +871,60 @@ Parameters starting with ``lasers.`` apply to all laser pulses, parameters start | |||||
Whether to use the most stable discretization for the envelope solver. | ||||||
|
||||||
* ``<laser name>.init_type`` (list of `string`) optional (default `gaussian`) | ||||||
The initializing method of laser. Possible options are: | ||||||
The initialisation method of laser. Possible options are: | ||||||
|
||||||
* ``gaussian``(default) the laser is iniliatized with an ideal gaussian pulse. | ||||||
Option: ``gaussian`` (default) the laser is initialised with an ideal gaussian pulse. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
* ``from_file``, the laser is loaded from an openPMD file. | ||||||
* ``<laser name>.a0`` (`float`) optional (default `0`) | ||||||
Peak normalized vector potential of the laser pulse. | ||||||
|
||||||
* ``parser``, the laser is initialized with the expression of the complex envelope function. | ||||||
* ``lasers.lambda0`` (`float`) | ||||||
Wavelength of the laser pulses. Currently, all pulses must have the same wavelength. | ||||||
|
||||||
Option: ``gaussian`` | ||||||
* ``<laser name>.position_mean`` (3 `float`) optional (default `0 0 0`) | ||||||
The mean position of the laser in `x, y, z`. | ||||||
|
||||||
* ``<laser name>.a0`` (`float`) optional (default `0`) | ||||||
Peak normalized vector potential of the laser pulse. | ||||||
* ``<laser name>.w0`` (2 `float`) optional (default `0 0`) | ||||||
The laser waist in `x, y`. | ||||||
|
||||||
* ``lasers.lambda0`` (`float`) | ||||||
Wavelength of the laser pulses. Currently, all pulses must have the same wavelength. | ||||||
* ``<laser name>.L0`` (`float`) optional (default `0`) | ||||||
The laser pulse length in `z`. Use either the pulse length or the pulse duration ``<laser name>.tau``. | ||||||
|
||||||
* ``<laser name>.position_mean`` (3 `float`) optional (default `0 0 0`) | ||||||
The mean position of the laser in `x, y, z`. | ||||||
* ``<laser name>.tau`` (`float`) optional (default `0`) | ||||||
The laser pulse duration. The pulse length is set to `laser.tau`:math:`*c_0`. | ||||||
Use either the pulse length or the pulse duration. | ||||||
|
||||||
* ``<laser name>.w0`` (2 `float`) optional (default `0 0`) | ||||||
The laser waist in `x, y`. | ||||||
* ``<laser name>.focal_distance`` (`float`) | ||||||
Distance at which the laser pulse is focused (in the z direction, counted from laser initial position). | ||||||
|
||||||
* ``<laser name>.L0`` (`float`) optional (default `0`) | ||||||
The laser pulse length in `z`. Use either the pulse length or the pulse duration ``<laser name>.tau``. | ||||||
* ``<laser name>.propagation_angle_yz`` (`float`) optional (default `0`) | ||||||
Propagation angle of the pulse in the yz plane (0 is along the z axis) | ||||||
|
||||||
* ``<laser name>.tau`` (`float`) optional (default `0`) | ||||||
The laser pulse duration. The pulse length is set to `laser.tau`:math:`*c_0`. | ||||||
Use either the pulse length or the pulse duration. | ||||||
Option: ``from_file`` the laser is loaded from an openPMD file. | ||||||
|
||||||
* ``<laser name>.focal_distance`` (`float`) | ||||||
Distance at which the laser pulse if focused (in the z direction, counted from laser initial position). | ||||||
* ``<laser name>.input_file`` (`string`) optional (default `""`) | ||||||
Path to an openPMD file containing a laser envelope. | ||||||
The file should comply with the `LaserEnvelope extension of the openPMD-standard <https://github.com/openPMD/openPMD-standard/blob/upcoming-2.0.0/EXT_LaserEnvelope.md>`__, as generated by `LASY <https://github.com/LASY-org/LASY>`__. | ||||||
Currently supported geometries: 3D or cylindrical profiles with azimuthal decomposition. | ||||||
The laser pulse is injected in the HiPACE++ simulation so that the beginning of the temporal profile from the file corresponds to the head of the simulation box, and time (in the file) is converted to space (HiPACE++ longitudinal coordinate) with ``z = -c*t + const``. | ||||||
If this parameter is set, then the file is used to initialize all lasers instead of using a gaussian profile. | ||||||
|
||||||
* ``<laser name>.propagation_angle_yz`` (`float`) optinal (default `0`) | ||||||
Propagation angle of the pulse in the yz plane (0 is the along the z axis) | ||||||
* ``<laser name>.openPMD_laser_name`` (`string`) optional (default `laserEnvelope`) | ||||||
Name of the laser envelope field inside the openPMD file to be read in. | ||||||
|
||||||
* ``<laser name>.PFT_yz`` (`float`) optinal (default `pi/2`) | ||||||
Pulse front tilt angle on yz plane - the angle between the pulse front (maximum intensity contour)and the propagation | ||||||
direction defined by [Selcuk Akturk Opt. Express 12 (2004)](pi/2 is no PFT) | ||||||
* ``<laser name>.iteration`` (`int`) optional (default `0`) | ||||||
Iteration of the openPMD file to be read in. | ||||||
|
||||||
Option: ``from_file`` | ||||||
|
||||||
* ``lasers.input_file`` (`string`) optional (default `""`) | ||||||
Path to an openPMD file containing a laser envelope. | ||||||
The file should comply with the `LaserEnvelope extension of the openPMD-standard <https://github.com/openPMD/openPMD-standard/blob/upcoming-2.0.0/EXT_LaserEnvelope.md>`__, as generated by `LASY <https://github.com/LASY-org/LASY>`__. | ||||||
Currently supported geometries: 3D or cylindrical profiles with azimuthal decomposition. | ||||||
The laser pulse is injected in the HiPACE++ simulation so that the beginning of the temporal profile from the file corresponds to the head of the simulation box, and time (in the file) is converted to space (HiPACE++ longitudinal coordinate) with ``z = -c*t + const``. | ||||||
If this parameter is set, then the file is used to initialize all lasers instead of using a gaussian profile. | ||||||
|
||||||
* ``lasers.openPMD_laser_name`` (`string`) optional (default `laserEnvelope`) | ||||||
Name of the laser envelope field inside the openPMD file to be read in. | ||||||
|
||||||
* ``lasers.iteration`` (`int`) optional (default `0`) | ||||||
Iteration of the openPMD file to be read in. | ||||||
|
||||||
Option: ``parser`` | ||||||
Option: ``parser``, the laser is initialized with the expression of the complex envelope function. | ||||||
|
||||||
* ``<laser name>.laser_real(x,y,z)`` (`string`) | ||||||
Expression for the real part of the laser evelope in `x, y, z`. | ||||||
* ``<laser name>.laser_real(x,y,z)`` optional (`string`) (default `""`) | ||||||
Expression for the real part of the laser envelope in `x, y, z`. | ||||||
|
||||||
* ``<laser name>.laser_imag(x,y,z)`` (`string`) | ||||||
Expression for the imaginary part of the laser evelope `x, y, z`. | ||||||
* ``<laser name>.laser_imag(x,y,z)`` optional (`string`) (default `""`) | ||||||
Expression for the imaginary part of the laser envelope `x, y, z`. | ||||||
|
||||||
* ``lasers.lambda0`` (`float`) | ||||||
Wavelength of the laser pulses. Currently, all pulses must have the same wavelength. | ||||||
* ``lasers.lambda0`` (`float`) | ||||||
Wavelength of the laser pulses. Currently, all pulses must have the same wavelength. | ||||||
|
||||||
Diagnostic parameters | ||||||
--------------------- | ||||||
|
This file contains 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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consistency. We use US English.