-
Notifications
You must be signed in to change notification settings - Fork 21
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
User-Defined Linear Map #743
base: development
Are you sure you want to change the base?
User-Defined Linear Map #743
Conversation
General structure. Co-authored-by: Chad Mitchell <[email protected]>
Update initialization of LinearMap element.
for more information, see https://pre-commit.ci
Finish implementation of LinearMap element push.
for more information, see https://pre-commit.ci
Initialize covariance matrix from distribution parameters.
for more information, see https://pre-commit.ci
…ance-and-transport-maps
Remove unnecessary ,.
Correct naming in elements.cpp binding for LinearMap.
Correct argument declaration for Python bindings of LinearMap in elements.cpp.
Document "Name" parameter in LinearMap.
Modify zero-initialization of CovarianceMatrix cv.
@cemitch99 please fetch branch again before continuing, I pushed a few updates for Python, docs and examples (they pass already :) ). |
Use parser for inputs. Needs upstream AMReX fix.
## Summary `ParmParse::queryAddWithParser` might manipulate the internal state and should not be a const method. These parser functions might need a unit test in AMReX? ## Additional background First seen in ECP-WarpX/impactx#743 ## Checklist The proposed changes: - [x] fix a bug or incorrect behavior in AMReX - [ ] add new capabilities to AMReX - [ ] changes answers in the test suite to more than roundoff level - [ ] are likely to significantly affect the results of downstream AMReX users - [ ] include documentation in the code and/or rst files, if appropriate
…ance-and-transport-maps-chad
This implements the same FODO cell as the :ref:`stable FODO cell example <examples-fodo>`. | ||
However, in the example here we define *additional user-defined, custom linear elements* by providing a custom matrix. |
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.
TODO: In the analysis script of the FODO example, we should compare also values of the reference particle, in particular s
and energy.
And reference particle pushing (drifting), if thick.
0be1a9b
to
317e6bf
Compare
for more information, see https://pre-commit.ci
Add twiss
Correct name of Rmat/R.
Fix naming of R again.
Fix number of periods.
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.
That's a very cool example, thank you!
The matrix elements are 1-indexed. | ||
The transport matrix :math:`R` is defaulted to the identity matrix, so only matrix entries that are differing from that need to be specified. | ||
|
||
TODO: describe units to put in the R entries. |
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.
TODO: Doc
A custom, linear transport matrix. | ||
|
||
TODO: describe units to put in the R entries. |
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.
TODO: Doc
@@ -82,7 +82,7 @@ function(add_impactx_test name input is_mpi analysis_script plot_script) | |||
amrex.throw_exception = 1 | |||
amrex.signal_handling = 0 | |||
impactx.always_warn_immediately=1 | |||
impactx.abort_on_warning_threshold=low | |||
impactx.abort_on_warning_threshold=medium |
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.
Gotta check if we can keep it on low and only overwrite for the example.
Co-authored-by: Chad Mitchell <[email protected]>
See the :ref:` example <examples-fodo-userdef>` for Python and inputs file syntax to specify a custom linear element. | ||
|
||
The entries of the transport matrix are ordered for multiplication with the beam vector :math:`x,px,y,py,t,pt`. | ||
The units of the transport matrix :math:`R` elements are... TODO |
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.
TODO: Doc
This is a duplicate of the draft PR #714 owned by cemitch99. Close #538
amrex::SmallMatrix
ImpactX::evolve
->ImpactX::track_particles
Introducesim.track_particles()
#741Follow-up PR will add
ImpactX::track_envelope