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

New Linear Solver: Curl of Curl #3682

Merged
merged 7 commits into from
Feb 6, 2024

Conversation

WeiqunZhang
Copy link
Member

@WeiqunZhang WeiqunZhang commented Dec 22, 2023

Add a new linear solver for curl (alpha curl E) + beta E = rhs in 2D & 3D,
where E is an array of 3 MultiFabs on edges, and alpha and beta are
scalars. It supports periodic, homogeneous Dirichlet, and symmetry
boundaries. At the symmetry boundary, the normal component changes the sign,
whereas the transverse components do not.

@WeiqunZhang WeiqunZhang force-pushed the curl_curl branch 4 times, most recently from 77ec6db to a0da8cc Compare December 22, 2023 04:06
@eebasso
Copy link
Contributor

eebasso commented Dec 25, 2023

I’m happy to see this PR. Can we please swap the labeling of alpha and beta to match the existing conventions with the ABec solvers? 🙏

i.e., make it

alpha E + curl (beta curl E) = rhs

The beta coefficient has always been for the derivative term and alpha for the non-derivative term.

@WeiqunZhang
Copy link
Member Author

Will discuss this with Justin who gave me the equation.

@WeiqunZhang WeiqunZhang force-pushed the curl_curl branch 3 times, most recently from 7bbcd34 to 71cb2b1 Compare January 17, 2024 19:39
@WeiqunZhang WeiqunZhang force-pushed the curl_curl branch 2 times, most recently from adbb796 to 83ddb78 Compare January 19, 2024 23:42
@WeiqunZhang WeiqunZhang marked this pull request as ready for review January 20, 2024 01:00
@WeiqunZhang
Copy link
Member Author

This is ready for review. We still need to try different restriction and smoothing strategies. But that could be left to the future. More specifically, in stead of simple injection, I want to try weighted averaging like what we do for the nodal solver. That makes the restriction operator more consistent with prolongation.

Add a new linear solver for curl (alpha curl E) + beta E = rhs in 2D & 3D,
where E is an array of 3 MultiFabs on edges, and alpha and beta are
scalars. It supports periodic, homogeneous Dirichlet, and symmetry
boundaries. At the symmetry boundary, the normal component changes the sign,
whereas the transverse components do not.
@ax3l
Copy link
Member

ax3l commented Feb 2, 2024

I'll take a look.

Attn for review if you like: @dpgrote @JustinRayAngus @debog @RemiLehe :)

Copy link
Member

@ax3l ax3l left a comment

Choose a reason for hiding this comment

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

This looks great and very clean. I added a few inline comments on:

  • doc strings
  • include orders
  • using literals for compactness

Src/LinearSolvers/MLMG/AMReX_MLCurlCurl.H Show resolved Hide resolved
Src/LinearSolvers/MLMG/AMReX_MLCurlCurl.H Outdated Show resolved Hide resolved
Src/LinearSolvers/MLMG/AMReX_MLCurlCurl.cpp Show resolved Hide resolved
Src/LinearSolvers/MLMG/AMReX_MLCurlCurl_K.H Show resolved Hide resolved
Tests/LinearSolvers/CurlCurl/MyTest.cpp Show resolved Hide resolved
Tests/LinearSolvers/CurlCurl/initProb.cpp Outdated Show resolved Hide resolved
Tests/LinearSolvers/CurlCurl/initProb_K.H Show resolved Hide resolved
Tests/LinearSolvers/CurlCurl/main.cpp Outdated Show resolved Hide resolved
@WeiqunZhang WeiqunZhang enabled auto-merge (squash) February 6, 2024 00:40
@WeiqunZhang WeiqunZhang merged commit fb2f925 into AMReX-Codes:development Feb 6, 2024
69 checks passed
@WeiqunZhang WeiqunZhang deleted the curl_curl branch February 6, 2024 01:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants