Skip to content
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

[WIP] Implement new gridless model #157

Open
wants to merge 142 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
142 commits
Select commit Hold shift + click to select a range
8053806
Implement new QS model with ions
AngelFP Mar 28, 2023
6a3092e
Speed up calculation of psi and dr_psi
AngelFP Mar 28, 2023
1e6a87b
Speed up calculation of dxi_psi
AngelFP Mar 29, 2023
b5e2090
Don't push plasma particles after last iteration
AngelFP Mar 29, 2023
dc08b8e
Precalculate logarithms
AngelFP Mar 30, 2023
7139976
Ensure that leftmost neighboring point is not 0
AngelFP Mar 30, 2023
be6a777
Improve efficiency of plasma particle deposition
AngelFP Mar 30, 2023
aa6404d
Split calculation of a_i, b_i in several methods
AngelFP Jun 16, 2023
6f84136
Remove unnecessary `if`
AngelFP Jun 16, 2023
dd99625
Do not use lists in plasma pusher
AngelFP Jun 16, 2023
7b48cb6
Use jitted `PlasmaParticles` class
AngelFP Jun 16, 2023
1a0793f
Reduce number of arrays
AngelFP Jun 16, 2023
844c7d3
Make arrays contiguous
AngelFP Jun 16, 2023
cbd0808
Reorder spec and remove unnecessary code
AngelFP Jun 18, 2023
ba850c6
Move methods into `PlasmaParticles` class
AngelFP Jun 18, 2023
f0a45c1
Formatting
AngelFP Jun 18, 2023
ff1fd8d
Make use of `max_gamma`
AngelFP Jun 18, 2023
5a0efa9
Rename method
AngelFP Jul 4, 2023
ee66f6a
Fix bug in array indexing and ion push
AngelFP Jul 6, 2023
0b9392b
Initialize rho_e and rho_i arrays in base class
AngelFP Jul 6, 2023
39708d0
Make use of `rho_e` and `rho_i` in new solver
AngelFP Jul 6, 2023
4d8800d
Pass ion (instead of electron) array to method
AngelFP Jul 6, 2023
755c297
Reset plasma electrons also when `ion_motion=True`
AngelFP Jul 6, 2023
f75e23a
Implement smarter boundary condition for `psi`
AngelFP Jul 6, 2023
e290312
Fix bug with indexing of right neighbor
AngelFP Jul 6, 2023
7164e98
Always deposit electron and ion density
AngelFP Jul 6, 2023
19c67b5
Define `species_rho_diags` in base `RZWakefield`
AngelFP Jul 6, 2023
178cc4d
Expose mass and charge of plasma particles to user
AngelFP Jul 6, 2023
94aeb68
Add option to store history of plasma particles
AngelFP Jul 10, 2023
e42f33a
Allow fields to save species (also in rz)
AngelFP Jul 14, 2023
5ae5899
Pass bunch name when gathering fields
AngelFP Jul 14, 2023
859a2f0
Add geometry attribute to bunch diags
AngelFP Jul 14, 2023
886d9c1
Improvements to plasma particles:
AngelFP Jul 14, 2023
b23c294
Implement `AdaptiveGrid` class
AngelFP Jul 17, 2023
2e64182
Move `calculate_bunch_source` to dedicated module
AngelFP Jul 17, 2023
a399d32
Split gathering of laser and bunch sources
AngelFP Jul 17, 2023
800249b
Update source gathering in `PlasmaParticles`
AngelFP Jul 17, 2023
290538d
Update solver and wakefield
AngelFP Jul 17, 2023
f666134
Implement radially-dependent `ppc`
AngelFP Jul 18, 2023
5c69f3c
Speed-up plasma pusher
AngelFP Jul 19, 2023
8efe965
Upgrade to openpmd-API 0.15
AngelFP Jul 19, 2023
522d7ee
Merge branch 'dev' into ion_motion
AngelFP Jul 19, 2023
cee1527
Allow choosing which diagnostics to save
AngelFP Jul 19, 2023
f89594f
Gather laser field and deposit chi only if needed
AngelFP Jul 19, 2023
367a87b
Fix crash when when no bunches are tracked
AngelFP Jul 19, 2023
ffaab72
Create bunch sources only when there are bunches
AngelFP Jul 19, 2023
728e9c2
Store no particle diagnostics by default
AngelFP Jul 19, 2023
78ece2d
Calculate psi and derivatives in single method
AngelFP Jul 21, 2023
a01640d
Remove unused code + formatting
AngelFP Jul 21, 2023
74d829d
Implement single method to calculate b_theta
AngelFP Jul 22, 2023
4b2d3f5
Divide by radial volume in deposition methods
AngelFP Jul 22, 2023
add7715
Use numpy error model
AngelFP Jul 22, 2023
7325c58
Implement `utils.py`
AngelFP Jul 22, 2023
fdb45cf
Implement non-jitted `PlasmaParticles`
AngelFP Jul 22, 2023
40ddc94
Switch to AB2 pusher
AngelFP Jul 22, 2023
16101d5
Rename file
AngelFP Jul 22, 2023
2a98a88
Fix bug in diagnostics
AngelFP Jul 23, 2023
7019a1a
Implement faster gradient
AngelFP Jul 24, 2023
efa8ed5
Add test
AngelFP Jul 24, 2023
89fd954
Allow `deposit_3d_distribution` to be jitted
AngelFP Jul 24, 2023
0fefd6e
Improve efficiency of b_theta and psi calculation
AngelFP Jul 24, 2023
970d1bd
Implement faster bunch source calculation
AngelFP Jul 24, 2023
5b9ce89
Reduce overhead of wakefield calculation
AngelFP Jul 24, 2023
d8ecae0
Improve efficiency of particle history
AngelFP Jul 25, 2023
8f1ea6b
Improve docstrings
AngelFP Jul 25, 2023
8053f19
Implement arbitrary radial density profile
AngelFP Aug 4, 2023
027666a
Merge branch 'dev' into ion_motion
AngelFP Aug 11, 2023
9baac2d
Improve numba compatibility
AngelFP Aug 11, 2023
2bd0480
Fix bug in plasma pusher
AngelFP Aug 25, 2023
1f65052
Merge branch 'ion_motion' of https://github.com/AngelFP/Wake-T into i…
AngelFP Aug 25, 2023
b467f40
Merge branch 'dev' into ion_motion
AngelFP Aug 25, 2023
ae77272
Include `'a'` as default field diag
AngelFP Aug 28, 2023
0373ab3
Improve radial gradient on axis
AngelFP Aug 31, 2023
4fb91f1
Improve docstring
AngelFP Aug 31, 2023
e7c85d8
Merge branch 'dev' into ion_motion
AngelFP Aug 31, 2023
7a82ade
Rename plasma species diagnostics
AngelFP Sep 1, 2023
76837af
Calculate adaptive grid fields on wakefield update
AngelFP Sep 1, 2023
fad7f5b
Calculate adaptive grid fields only if needed
AngelFP Sep 1, 2023
3d5b64c
Allow some bunches to not use an adaptive grid
AngelFP Sep 6, 2023
e5eafd4
Merge branch 'dev' into ion_motion
AngelFP Sep 12, 2023
c82c7fe
Add guard cells to adaptive grids
AngelFP Sep 14, 2023
fcb91d3
Add guard cells to `nr`
AngelFP Sep 14, 2023
1d5da73
Fix wrong symbol
AngelFP Sep 14, 2023
2d4fc68
Implement fixed radial extent of adaptive grids
AngelFP Sep 15, 2023
0706c62
Use new gradient functions in adaptive grid
AngelFP Sep 15, 2023
c8ab201
Merge branch 'dev' into ion_motion
AngelFP Oct 17, 2023
75d0f9b
Fix bug causing the grid to continuously update
AngelFP Oct 25, 2023
a804dde
Merge branch 'ion_motion' of https://github.com/AngelFP/Wake-T into i…
AngelFP Oct 25, 2023
3df638d
Small fixes
AngelFP Oct 25, 2023
4e9f974
Do not recalculate dxi and dr on `_gather`
AngelFP Nov 1, 2023
b4f14f4
Improve 3d deposition methods for adaptive grids
AngelFP Nov 2, 2023
5ed2151
Improve bunch source gathering for adaptive grids
AngelFP Nov 2, 2023
3d80509
Calculate bunch source also on guard cells
AngelFP Nov 2, 2023
ada0c86
Improved plasma field gathering for adaptive grids
AngelFP Nov 2, 2023
2e62bbf
Radial limit for AGs and gather/deposit multigrid
AngelFP Nov 2, 2023
4be2a13
Remove unused attribute
AngelFP Nov 2, 2023
20a34b6
Add tests for adaptive grids
AngelFP Nov 2, 2023
e321aef
Merge branch 'dev' into ion_motion
AngelFP Nov 2, 2023
184c364
Merge branch 'dev' into ion_motion
AngelFP Mar 14, 2024
45f1401
Implement conversion from `r` to `x` in plasma particle diagnostics
AngelFP Mar 14, 2024
d4c404e
Add bunch charge density to total density array
AngelFP Mar 25, 2024
160256e
Implement new solver without neighbors, using q_center
AngelFP Mar 28, 2024
f39bf2d
Fix bug
AngelFP Apr 19, 2024
317ba54
Fix bug
AngelFP Apr 19, 2024
2bca1c4
Update test
AngelFP Apr 20, 2024
fd29124
Update test data
AngelFP Apr 20, 2024
28919f6
Update test
AngelFP Apr 20, 2024
2c72da9
Update docstring
AngelFP Apr 20, 2024
6323b22
Merge branch 'dev' into ion_motion_new
AngelFP Apr 30, 2024
99c7ab1
Merge branch 'dev' into ion_motion_new
AngelFP Apr 30, 2024
d73fa67
Add backwards compatibility with parabolic coefficient
AngelFP Apr 30, 2024
02a133e
Merge branch 'dev' into ion_motion_new_pc
AngelFP Apr 30, 2024
03ef370
Fix bug
AngelFP Apr 30, 2024
0d5329a
Improve backwards compatibility of plasma pusher
AngelFP Apr 30, 2024
d90a227
Prevent psi from going above 1
AngelFP Apr 30, 2024
c3e2d54
Merge branch 'dev' into ion_motion_new
AngelFP May 2, 2024
3c50816
Fix typo
AngelFP May 2, 2024
8b26472
Add deprecation warnings
AngelFP May 2, 2024
db5b5b6
Move backward compatibility checks to the top
AngelFP May 2, 2024
d9d8013
Add final spot size check
AngelFP May 3, 2024
b1cc83d
Merge branch 'dev' into ion_motion_new
AngelFP May 3, 2024
1f2307b
Shorten docstrings
AngelFP May 3, 2024
0425a8c
Separate q into q and w, make q_species a float
AngelFP May 10, 2024
a991999
Remove unused code
AngelFP May 15, 2024
8f1d43f
Merge branch 'dev' into feature/new_gridless_model
AngelFP May 15, 2024
5e38c2c
added id as a dictionary element in the output of get_openpmd_diagno…
rob-shalloo Jun 3, 2024
1e8db0e
added the particle tags to the copy routine
rob-shalloo Jun 3, 2024
ab4ac14
added if statement to prevent tags getting added if they dont exist
rob-shalloo Jun 3, 2024
2849461
added the tags to the id output for the open pmd diagnostics
rob-shalloo Jun 3, 2024
9e2d5e6
Formatting
AngelFP Jun 18, 2024
fc86a92
Merge methods
AngelFP Jun 18, 2024
d8a9f74
Formatting
AngelFP Jun 18, 2024
09f4719
Formatting
AngelFP Jun 18, 2024
bf6b4e6
Enable the use of `auto_dt_bunch` in `FieldElement` and `PlasmaStage`.
delaossa Jul 5, 2024
8eea77a
Change the syntax a bit.
delaossa Jul 5, 2024
d93cdc2
Increase a bit the tolerance to let the test pass.
delaossa Jul 8, 2024
84e77b6
Increase a bit the tolerance to let the tess pass (2).
delaossa Jul 8, 2024
6a27650
Merge pull request #158 from rob-shalloo/origin/trackingParticles
AngelFP Oct 1, 2024
ef65f9a
Merge pull request #159 from delaossa/feature/auto_dt_bunch
AngelFP Oct 1, 2024
8dab1d0
Merge pull request #160 from delaossa/feature/new_gridless_model
AngelFP Oct 1, 2024
c9b1597
Rename tag to id
AngelFP Oct 1, 2024
9473baf
Fix test
AngelFP Oct 1, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
106 changes: 106 additions & 0 deletions tests/resources/r_max_hist_driver_ag.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
9.811402322593408779e-06
9.842798563565720595e-06
9.897754616313643629e-06
1.052877373683855109e-05
1.115647226859821577e-05
1.178003733570898298e-05
1.239969648998911883e-05
1.301567368905231986e-05
1.362816487949257210e-05
1.423735479680359305e-05
1.484340625913371007e-05
1.544644471900879828e-05
1.604660964385994275e-05
1.664402477236038698e-05
1.723880848017405370e-05
1.783106872608835708e-05
1.842090559768065278e-05
1.900841291259988930e-05
1.959367439147137815e-05
2.017677059880620253e-05
2.075777507454576844e-05
2.133672348456608340e-05
2.193504455412441018e-05
2.274973750126816347e-05
2.356418724973088468e-05
2.437828955967359781e-05
2.519195497623030625e-05
2.600510581915868854e-05
2.681767411332924543e-05
2.762960050929007635e-05
2.844083336330359576e-05
2.925133790977689266e-05
3.006108994810100912e-05
3.074652052094919210e-05
3.143122557062161384e-05
3.223878408131862895e-05
3.304547718007913451e-05
3.385128213612709496e-05
3.465617871987345603e-05
3.546014870908050702e-05
3.626317539325143785e-05
3.706526748271546612e-05
3.786643966374644957e-05
3.866668048288903690e-05
3.946597943793861272e-05
4.026432640003794463e-05
4.106171166505072085e-05
4.185812636628303613e-05
4.265356252095687763e-05
4.344801297579392981e-05
4.424147132317358342e-05
4.503396371591314310e-05
4.582552024036505171e-05
4.661613609981584067e-05
4.740580694219471611e-05
4.819452870168322925e-05
4.898229780889877050e-05
4.976911126462634134e-05
5.055496637012477497e-05
5.133986072111517410e-05
5.212379220236145188e-05
5.290675868559559426e-05
5.368879352291419844e-05
5.446993320859866363e-05
5.525017646472726521e-05
5.602952176717987864e-05
5.680796743527659635e-05
5.758551180847840248e-05
5.808348406296849370e-05
5.858087124617627627e-05
5.935635302594574863e-05
6.013092916048974813e-05
6.090459928514431438e-05
6.167739373764685588e-05
6.244934455426462059e-05
6.322045098589514794e-05
6.399071288055465214e-05
6.476013050247657896e-05
6.552870409440556844e-05
6.629643381464019286e-05
6.706331929231673921e-05
6.782935970716824387e-05
6.859455748933642025e-05
6.935892043765828398e-05
7.012249377155749957e-05
7.088530004191589680e-05
7.164733860591400558e-05
7.240860885029208453e-05
7.316911023207593940e-05
7.392884229059080471e-05
7.468780493832446186e-05
7.544599865262872505e-05
7.620342413739460065e-05
7.696008209400781550e-05
7.771599810283116232e-05
7.847119727737890947e-05
7.922567963493977190e-05
7.997944575099025146e-05
8.073249649716774583e-05
8.148483273288245426e-05
8.223645496679766510e-05
8.298736321728327327e-05
8.373755737112156176e-05
8.448703735323756102e-05
8.514487266997208901e-05
8.542814683755637858e-05
107 changes: 107 additions & 0 deletions tests/resources/r_max_hist_driver_agl.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
9.811402322593408779e-06
9.842798563565720595e-06
9.897754616313643629e-06
1.052877373683855109e-05
1.115647226859821577e-05
1.178003733570898298e-05
1.239969648998911883e-05
1.301567368905231986e-05
1.362816487949257210e-05
1.423735479680359305e-05
1.484340625913371007e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
1.500000000000000038e-05
Loading
Loading