-
Notifications
You must be signed in to change notification settings - Fork 29
Symplectic integration in a user-defined magnetostatic vector potential #964
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
Open
cemitch99
wants to merge
64
commits into
BLAST-ImpactX:development
Choose a base branch
from
cemitch99:add_user_nonlinear_element
base: development
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 57 commits
Commits
Show all changes
64 commits
Select commit
Hold shift + click to select a range
77509bc
Add initial element and integrator routines in draft form.
cemitch99 d169e14
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] c812000
Add literals.
cemitch99 a1ab4b3
Resolve conflicts, and add comments.
cemitch99 d5cf7da
Merge branch 'development' into add_user_nonlinear_element
cemitch99 1048cd3
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 5a0c003
Update Integrators.H
cemitch99 d46ed68
Fix parameter documentation in new integrator step.
cemitch99 2a27e8a
Add both particle copies as arguments to internal push map.
cemitch99 9cded9e
Clean-up and addition of map for a general Hamiltonian.
cemitch99 a0ec35d
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 91b5f53
Add preliminary initialization of VectorPotential element.
cemitch99 3916603
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 1e41d52
Eliminate calls to Print to avoid errors.
cemitch99 4969aa4
Add maybe_unused to avoid unused variable warnings.
cemitch99 c5db4f9
Attempt to eliminate host-device error.
cemitch99 2e8beca
Remove debug print statement.
cemitch99 606fd2f
Update map using Hamiltonian derivatives.
cemitch99 a260f86
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] d4dcaf5
Delete unnecessary comments.
cemitch99 436a2e1
Comment unused az.
cemitch99 4c2c6cc
Add normalization of field strength.
cemitch99 f45a5e6
User-Provided Functions
ax3l f719d99
Fix Doxygen
ax3l 69e4101
Start Python Binding
ax3l 0352e3b
Clean-up and add quad example.
cemitch99 4ae8893
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] a18d89b
Add maybe_unused to avoid unused variable errors.
cemitch99 be59b79
Simplify user syntax and add examples to CMake.
cemitch99 7586bda
Merge branch 'development' into add_user_nonlinear_element
cemitch99 15880bc
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 30d65ee
Update CMakeLists.txt
cemitch99 cfb68ef
Update CMakeLists.txt
cemitch99 6548dad
Fix treatment of s-dependence.
cemitch99 9e36876
Add soft-edge solenoid example.
cemitch99 514d9fa
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 5920daf
Correct Doxygen in VectorPotential.H
cemitch99 67ed24d
Rename VectorPotential to MagnetostaticVectorPotential.
cemitch99 cd697cb
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 5b3352a
Remove unused t-variable from Parser.
cemitch99 c7545f6
Add draft of element documentation.
cemitch99 368c822
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 821ad9e
Add support for 4th-order and 6th-order integration.
cemitch99 45b451e
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] f5fd763
Merge remote-tracking branch 'mainline/development' into add_user_non…
ax3l 6f370ed
CUDA CI: More Disk Space
ax3l 2cd129d
Small Cleanup
ax3l 59abec1
CUDA CI: -j 3
ax3l 2fb715d
CUDA CI: -j 2
ax3l 90d1ffe
Relax tolerance analysis_exact_quad_vector_potential.py
cemitch99 91b8eb0
Relax tolerance analysis_solenoid_vector_potential.py
cemitch99 4d2f67d
CUDA CI: -j 1
ax3l ed67c24
Merge branch 'development' into add_user_nonlinear_element
cemitch99 66555cb
CMake: Unify Test Names
ax3l 7ff35f6
Relax Tolerances
ax3l 2aa0e1c
Relax Tolerances
ax3l 3be5620
Merge remote-tracking branch 'mainline/development' into add_user_non…
ax3l ae1ac85
Fix (Some): Py FODO Vector Example
ax3l 0bdf431
Fix (Some): Py Solenoid Vector Example
ax3l 801f5a2
Fix (Some): Py Quad Vector Example
ax3l ee56530
Make input_exact_quad_vector_potential.in exactly coincide with run_e…
cemitch99 faf0546
Delete irrelevant comments in input_solenoid_vector_potential.in
cemitch99 4888129
Merge branch 'development' into add_user_nonlinear_element
cemitch99 10101e4
Update examples/vector_potential/analysis_fodo_vector_potential.py
cemitch99 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 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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,128 @@ | ||
| .. _examples-fodo-vector-potential: | ||
|
|
||
| Symplectic Integration in a FODO Cell Based on User-Provided Vector Potential | ||
| ============================================================================= | ||
|
|
||
| This benchmark tests the implementation of the element MagnetostaticVectorPotential, which uses symplectic integration based on the exact nonlinear Hamiltonian for a user-provided vector | ||
| potential. The physical example is identical to examples-fodo, except that the vector potential in the quadrupoles is provided in formulae by the user. | ||
|
|
||
| The analysis script is identical to the analysis script used for ``examples-fodo``. | ||
|
|
||
| Run | ||
| --- | ||
|
|
||
| This example can be run **either** as: | ||
|
|
||
| * **Python** script: ``python3 run_fodo_vector_potential.py`` or | ||
| * ImpactX **executable** using an input file: ``impactx input_fodo_vector_potential.in`` | ||
|
|
||
| For `MPI-parallel <https://www.mpi-forum.org>`__ runs, prefix these lines with ``mpiexec -n 4 ...`` or ``srun -n 4 ...``, depending on the system. | ||
|
|
||
| .. tab-set:: | ||
|
|
||
| .. tab-item:: Python: Script | ||
|
|
||
| .. literalinclude:: run_fodo_vector_potential.py | ||
| :language: python3 | ||
| :caption: You can copy this file from ``examples/vector_potential/run_fodo_vector_potential.py``. | ||
|
|
||
| .. tab-item:: Executable: Input File | ||
|
|
||
| .. literalinclude:: input_fodo_vector_potential.in | ||
| :language: ini | ||
| :caption: You can copy this file from ``examples/vector_potential/input_fodo_vector_potential.in``. | ||
|
|
||
|
|
||
| Analyze | ||
| ------- | ||
|
|
||
| We run the following script to analyze correctness: | ||
|
|
||
| .. dropdown:: Script ``analysis_fodo_vector_potential.py`` | ||
|
|
||
| .. literalinclude:: analysis_fodo_vector_potential.py | ||
| :language: python3 | ||
| :caption: You can copy this file from ``examples/vector_potential/analysis_vector_potential.py``. | ||
|
|
||
|
|
||
| .. _examples-exact-quad-vector-potential: | ||
|
|
||
| Symplectic Integration in Exact Quads Based on User-Provided Vector Potential | ||
| ============================================================================= | ||
|
|
||
| This benchmark tests the implementation of the element MagnetostaticVectorPotential, which uses symplectic integration based on the exact nonlinear Hamiltonian for a user-provided vector | ||
| potential. The physical example is identical to examples-exact-quad, except that the vector potential in the quadrupoles is provided in formulae by the user. | ||
|
|
||
| The analysis script is identical to the analysis script used for ``examples-exact-quad``. | ||
|
|
||
| Run | ||
| --- | ||
|
|
||
| This example can be run **either** as: | ||
|
|
||
| * **Python** script: ``python3 run_exact_quad_vector_potential.py`` or | ||
| * ImpactX **executable** using an input file: ``impactx input_exact_quad_vector_potential.in`` | ||
|
|
||
| For `MPI-parallel <https://www.mpi-forum.org>`__ runs, prefix these lines with ``mpiexec -n 4 ...`` or ``srun -n 4 ...``, depending on the system. | ||
|
|
||
| .. tab-set:: | ||
|
|
||
| .. tab-item:: Python: Script | ||
|
|
||
| .. literalinclude:: run_exact_quad_vector_potential.py | ||
| :language: python3 | ||
| :caption: You can copy this file from ``examples/vector_potential/run_exact_quad_vector_potential.py``. | ||
|
|
||
| .. tab-item:: Executable: Input File | ||
|
|
||
| .. literalinclude:: input_exact_quad_vector_potential.in | ||
| :language: ini | ||
| :caption: You can copy this file from ``examples/vector_potential/input_exact_quad_vector_potential.in``. | ||
|
|
||
|
|
||
| Analyze | ||
| ------- | ||
|
|
||
| We run the following script to analyze correctness: | ||
|
|
||
| .. dropdown:: Script ``analysis_exact_quad_vector_potential.py`` | ||
|
|
||
| .. literalinclude:: analysis_exact_quad_vector_potential.py | ||
| :language: python3 | ||
| :caption: You can copy this file from ``examples/vector_potential/analysis_exact_quad_vector_potential.py``. | ||
|
|
||
|
|
||
|
|
||
| .. _examples-solenoid-vector-potential: | ||
|
|
||
| Symplectic Integration Through a Soft-Edge Solenoid Based on User-Provided Vector Potential | ||
| ============================================================================================ | ||
|
|
||
| This benchmark tests the implementation of the element MagnetostaticVectorPotential, which uses symplectic integration based on the exact nonlinear Hamiltonian for a user-provided vector | ||
| potential. The physical example is identical to examples-solenoid-softedge, except that the vector potential of the solenoid is provided in formulae by the user. | ||
|
|
||
| The analysis script is identical to the analysis script used for ``examples-solenoid-softedge``. | ||
|
|
||
| Run | ||
| --- | ||
|
|
||
| This example can be run **either** as: | ||
|
|
||
| * **Python** script: ``python3 run_solenoid_vector_potential.py`` or | ||
| * ImpactX **executable** using an input file: ``impactx input_solenoid_vector_potential.in`` | ||
|
|
||
| For `MPI-parallel <https://www.mpi-forum.org>`__ runs, prefix these lines with ``mpiexec -n 4 ...`` or ``srun -n 4 ...``, depending on the system. | ||
|
|
||
| .. tab-set:: | ||
|
|
||
| .. tab-item:: Python: Script | ||
|
|
||
| .. literalinclude:: run_solenoid_vector_potential.py | ||
| :language: python3 | ||
| :caption: You can copy this file from ``examples/vector_potential/run_solenoid_vector_potential.py``. | ||
|
|
||
| .. tab-item:: Executable: Input File | ||
|
|
||
| .. literalinclude:: input_solenoid_vector_potential.in | ||
| :language: ini | ||
| :caption: You can copy this file from ``examples/vector_potential/input_solenoid_vector_potential.in``. |
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.
Uh oh!
There was an error while loading. Please reload this page.
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.
This is called
unitwhile the inputs file (app API) calls itunits