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

Mesh Refinement with Explicit Solver #835

Merged

Conversation

AlexanderSinn
Copy link
Member

@AlexanderSinn AlexanderSinn commented Dec 2, 2022

A few things had to be adjusted for MR to work with the explicit solver:

  • One MG solver per level.
  • Set the boundary condition for Bx and By on level 1. This is similar compared to PC but the MG solvers (hpmg and amrex) expect the boundary at the cell face instead of center, so a few values had to be adjusted.
  • Properly shift slices for level 1.
  • Shift the domain box in hpmg so that lo is at 0,0,0. Contrary to level 0, level 1 doesn’t already have this property.
  • Assert that MR is not used with SALAME.

This fixes the last open issue in #667

image

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

@AlexanderSinn AlexanderSinn changed the title [WIP] Mesh Refinement with Explicit Solver Mesh Refinement with Explicit Solver Dec 5, 2022
@AlexanderSinn AlexanderSinn added component: fields About 3D fields and slices, field solvers etc. mesh refinement anything related to mesh refinement labels Dec 5, 2022
Copy link
Member

@MaxThevenet MaxThevenet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thanks! See minor comments & questions below.
@WeiqunZhang this PR changes a few things in hpmg, could you have a quick look? Thanks!

src/Hipace.cpp Outdated Show resolved Hide resolved
src/Hipace.cpp Outdated Show resolved Hide resolved
src/fields/Fields.cpp Outdated Show resolved Hide resolved
src/fields/Fields.cpp Show resolved Hide resolved
@WeiqunZhang
Copy link
Member

LGTM

@MaxThevenet MaxThevenet merged commit 6ab6676 into Hi-PACE:development Dec 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: fields About 3D fields and slices, field solvers etc. mesh refinement anything related to mesh refinement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants