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

Exchange guard cells with the electrostatic solver #4713

Merged
merged 14 commits into from
Feb 27, 2024

Conversation

RemiLehe
Copy link
Member

@RemiLehe RemiLehe commented Feb 21, 2024

It seems that we forgot to exchange guard cells after the Poisson solver, in the case of the electrostatic solver.

This was detected by looking at energy conservation in a periodic box with a thermal plasma:
input_2d.txt
Screenshot 2024-02-21 at 9 36 43 AM

I added a smaller version of the above test as an automated test. The test checks that the energy is within the dashed back line:

Screenshot 2024-02-22 at 2 48 02 PM

Many thanks to @oshapoval and @jlvay for helping in debugging this.

@RemiLehe RemiLehe changed the title [WIP] Exchange guard cells for electrostatic solver [WIP] Exchange guard cells with the electrostatic solver Feb 21, 2024
@RemiLehe RemiLehe changed the title [WIP] Exchange guard cells with the electrostatic solver Exchange guard cells with the electrostatic solver Feb 22, 2024
Copy link
Member

@lucafedeli88 lucafedeli88 left a comment

Choose a reason for hiding this comment

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

Thanks for this PR! I left few minor comments

Comment on lines 43 to 47
#################################
############ NUMERICS ###########
#################################
warpx.serialize_initial_conditions = 1
warpx.verbose = 1
Copy link
Member

Choose a reason for hiding this comment

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

I think that these parameters could be considered "general parameters" rather then "numerics" (they are not technical parameters of the solvers used in WarpX)

Comment on lines +9 to +12
warpx.do_electrostatic = labframe
algo.field_gathering = energy-conserving
algo.particle_shape = 2
warpx.use_filter = 0
Copy link
Member

Choose a reason for hiding this comment

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

I think that these parameters should be under "numerics"

Comment on lines +29 to +31
geometry.dims = 2
geometry.prob_lo = 0.0 0.0
geometry.prob_hi = 10.*de0 10.*de0
Copy link
Member

Choose a reason for hiding this comment

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

These parameters could be placed in the "general parameters" section above.

@ax3l ax3l added bug Something isn't working component: electrostatic electrostatic solver bug: affects latest release Bug also exists in latest release version component: parallelization Guard cell exchanges and particle redistribution labels Feb 27, 2024
@ax3l ax3l requested a review from oshapoval February 27, 2024 02:35
Copy link
Member

@dpgrote dpgrote left a comment

Choose a reason for hiding this comment

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

Thanks! This looks good.

Co-authored-by: Luca Fedeli <luca.fedeli.88@gmail.com>
@RemiLehe RemiLehe enabled auto-merge (squash) February 27, 2024 17:11
@RemiLehe RemiLehe disabled auto-merge February 27, 2024 18:13
@RemiLehe RemiLehe merged commit 5e66d0e into BLAST-WarpX:development Feb 27, 2024
40 of 41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug: affects latest release Bug also exists in latest release version bug Something isn't working component: electrostatic electrostatic solver component: parallelization Guard cell exchanges and particle redistribution
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants