Skip to content

Mesh refinement: enable longitudinal refinement#565

Closed
SeverinDiederichs wants to merge 14 commits into
Hi-PACE:developmentfrom
SeverinDiederichs:mr_long_refinement
Closed

Mesh refinement: enable longitudinal refinement#565
SeverinDiederichs wants to merge 14 commits into
Hi-PACE:developmentfrom
SeverinDiederichs:mr_long_refinement

Conversation

@SeverinDiederichs
Copy link
Copy Markdown
Member

@SeverinDiederichs SeverinDiederichs commented Jul 15, 2021

This PR enables longitudinal refinement for the refined level.
This is done in the following way:

The beam is binned per level. In the loop over the slices of the coarse grid, a sub-loop over the refined grid is done. For a refinement ratio of 4, 4 slices are calculated.

Additionally, in the InterpolateBoundaries, the correct longitudinal index is used in the coarse grid. This enables parallel runs.

This PR is tested in a parallel run in vacuum.

Additionally, I tested it with in a combined version with #561 and 564 in the blowout/ion motion case. However, the longitudinal refinement produces small step like ripples.
Screenshot from 2021-07-15 20-18-38

This was resolved by using a linear interpolation longitudinally. The fields Psi, Ez, Bz are also shifted to the Previous1 slice. Bx, By were already available. Then, a linear interpolation between the previous and the current slice is used. The ripples disappear:

image

  • Small enough (< few 100s of lines), otherwise it should probably be split into smaller PRs
  • Tested (describe the tests in the PR description)
  • Runs on GPU (basic: the code compiles and run well with the new module)
  • Contains an automated test (checksum and/or comparison with theory)
  • Documented: all elements (classes and their members, functions, namespaces, etc.) are documented
  • Constified (All that can be const is const)
  • Code is clean (no unwanted comments, )
  • Style and code conventions are respected at the bottom of https://github.com/Hi-PACE/hipace
  • Proper label and GitHub project, if applicable

@SeverinDiederichs SeverinDiederichs changed the title Mesh refinement: enable long refinement and parallel runs Mesh refinement: enable longitudinal refinement and parallel runs Jul 15, 2021
@SeverinDiederichs SeverinDiederichs changed the title Mesh refinement: enable longitudinal refinement and parallel runs [WIP] Mesh refinement: enable longitudinal refinement and parallel runs Jul 15, 2021
@SeverinDiederichs SeverinDiederichs changed the title [WIP] Mesh refinement: enable longitudinal refinement and parallel runs Mesh refinement: enable longitudinal refinement and parallel runs Jul 19, 2021
@SeverinDiederichs SeverinDiederichs changed the title Mesh refinement: enable longitudinal refinement and parallel runs Mesh refinement: enable longitudinal refinement Jul 21, 2021
@SeverinDiederichs SeverinDiederichs added the mesh refinement anything related to mesh refinement label Jul 22, 2021
@SeverinDiederichs
Copy link
Copy Markdown
Member Author

outdated by #574

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mesh refinement anything related to mesh refinement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant