-
Notifications
You must be signed in to change notification settings - Fork 201
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
Fixing the computation of ECT Rho Field #2711
Conversation
for more information, see https://pre-commit.ci
Source/FieldSolver/FiniteDifferenceSolver/FiniteDifferenceSolver.H
Outdated
Show resolved
Hide resolved
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.
Looks good to me. Thanks a lot for this PR!
I have a quick question (see inline comment)
} | ||
|
||
#ifndef WARPX_DIM_RZ | ||
void FiniteDifferenceSolver::EvolveRhoCartesianECT ( |
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.
The fact that this function was copied to a different file makes it difficult to see whether were any changes.
@lgiacome Could you confirm that there was no change in this function?
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.
Correct, there were no changes. It was just a copy-paste :)
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.
Thank you for this PR, Lorenzo! I left a few questions and comments.
Source/FieldSolver/FiniteDifferenceSolver/FiniteDifferenceSolver.H
Outdated
Show resolved
Hide resolved
Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com>
Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com>
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.
Thank you for making the changes! Looks good to me.
Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
This PR introduces a few fixes to the ECT solver.


Initially the 3D test in Examples/Tests/PEC failed when using the ECT solver instead of Yee.
This is the 1D plot of the field we would obtain with ECT:
While this is what we would have with Yee:
There were two issues:
In both cases the problem is that the ECTRho field was not recomputed correctly after the electric field was modified. In the second case the E field is modified by the initialisation and in the second case the E field is modified by the boundary conditions.
With this PR we add the missing calls to
EvolveRhoCartesianECT
and we introduce the new functionEvolveECTRho
for consistency with the update of the other fields and in view of possible extensions of the ECT algorithm (e.g. RZ).With these changes the test passes also with the ECT algorithm and we retrieve the same results as with the Yee solver.