-
Notifications
You must be signed in to change notification settings - Fork 47
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
H(curl) basis and CEED_EVAL_CURL
#1156
H(curl) basis and CEED_EVAL_CURL
#1156
Conversation
Thanks! It looks like maybe your editor formatting configuration is different. Can you have your editor use |
I used |
Our pipeline currently uses 14. I haven't had the chance to update yet |
Done. |
c11aec6
to
5a9d33d
Compare
063bea1
to
1064989
Compare
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.
Re some of your points at the top
-
I'm fine adding GPU support in a follow-up PR. That way this PR won't get too big. Adding initial
[hip,cuda]/ref
support won't be too bad, but[hip,cuda]/[shared,gen]
is related to the other issue you pointed out -
Similarly, I think its good to add Diagonal assembly support in a follow-up PR. The multigrid infrastructure should be largely unaffected, though I'm not sure if our process for automatically building a coarse to fine interpolation works for H(div) and H(curl) elements?
-
Python, Rust, and Julia bindings would be nice. Our Fortran interface is not a high priority but I wouldn't object to adding this there as well. Let me know if you get stuck trying to add any of those and I can help.
OK, sounds good. I am very unfamiliar with what will be required here, but I don't think it will be overly complex because H(div)/H(curl) interpolation contractions should look the same (or nearly) to H1 gradient.
For multigrid, the issue I see is that
I see for Julia that there is an automated generator method in |
The raw bindings are automatic but the user facing bindings need to be hand-coded in all languages |
2a6c126
to
571548e
Compare
Hi @jedbrown @jeremylt, I just pushed a few commits with a bit of a reworking of this idea. I realized that a general implementation for non-tensor H^1, H(div) and H(curl) basis operations should be possible with the benefit of simplifying backend code a lot. The general idea is that In this way, the non-tensor |
Not always. When the problem is scalar in H^1, yes |
Yep that's correct. My point was simply that with |
Yeah, I got your point, I just wanted to mentioned that is true for scalar case and not using it otherwise. |
05e01e3
to
8afe0d2
Compare
5a8f3e4
to
a213af6
Compare
63b1361
to
0c64355
Compare
89780b1
to
4a222ce
Compare
PR to update main to non-RELEASE merged into main |
This refactors basis application to use common code between CEED_EVAL_GRAD for H^1 and CEED_EVAL_INTERP for H(curl)/H(div). It should ideally expose an easy way to get non-tensor backends to work for H(div) and H(curl).
For multigrid, H(curl) and H(div) projection bases don't have a CEED_EVAL_CURL or CEED_EVAL_DIV operation currently. I'm not sure if a similar formulation to CEED#1023 applies but for now it is probably OK without it.
833e5c2
to
0b742f5
Compare
Add Rust sibling functions and tests, add Python tests, fix Julia versioning for CI.
0b742f5
to
97c1c57
Compare
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.
I think the only thing that we need before merging is create_hdiv_basis
and create_hcurl_basis
tests for julia/LibCEED.jl/test/rundevtests.jl
. Currently there are no dev tests, but there are some examples for create_h1_basis
in ``julia/LibCEED.jl/test/runtests.jl`.
Everything else seems to be all set.
91eae2f
to
089e8c8
Compare
089e8c8
to
b2e3f8e
Compare
Done! See b2e3f8e. |
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.
LGTM
Preliminary support for H(curl). Changes are very similar to #878.
This handles
CeedBasis
updates for H(curl) and also extends some of the missing H(div) functionality inceed-preconditioning.c
, for example. Any changes to element restriction for high-order Nedelec elements are left to a future PR, as is backend support (first non-tensorcuda/hip-ref
, OCCA, and MAGMA, then later oncuda/hip-shared/gen
).Note: I opened this PR from a fork since I didn't have write access to CEED/libCEED, but if it's preferred to create the branch there then I can close and reopen a new PR once I have access.
TODO
Backend support: So far have only touchedref-basis
,ref-operator
, andblocked-operator
. What do I need to do for CUDA/HIP/MAGMA/OCCA support for non-tensor H(div) and H(curl)? Maybe this is a bigger ask (Non-Tensor Basis Support #350).CeedOperatorGetBasisPointer
? What about for p-multigrid?CeedOperatorContextGetDoubleRead
,CeedOperatorContextRestoreDoubleRead
, etc.). I think this might be just because the generator hadn't been run for a past PR, but let me know if I'm doing something incorrectly.