Skip to content

basis - add collocated gradient to CeedBasis and cache its computation - #2045

Merged
zatkins-dev merged 2 commits into
mainfrom
zach/basis-collo-grad-interface
Sep 21, 2026
Merged

zatkins-dev merged 2 commits into
mainfrom
zach/basis-collo-grad-interface

Conversation

@zatkins-dev

Copy link
Copy Markdown
Collaborator

Purpose:

Additional CeedBasis interface cleanup and unified caching of objects used by multiple backends. Specifically:

  • Rename CeedBasisGetCollocatedGrad to CeedBasisGetCollocatedGrad1D and change signature to take const CeedScalar ** like other getters; the output array is now set to the internally cached collocated gradient matrix.
  • Add CeedBasisHasCollocatedGrad to check whether collocated gradient is suppported for a CeedBasis
  • Update backends which either (a) computed the collo grad, or (b) precomputed and stored the collo grad, to use the caching CeedBasisGetCollocatedGrad1D function

Note: Currently failing pedantic check due to empty struct, though it will no longer be empty after #2010. Not sure the best way to deal with that.

Describe the purpose of the PR here.

LLM/GenAI Disclosure:

None

@jeremylt jeremylt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is there a way to mark that struct as nolint?

Comment thread include/ceed/ceed.h Outdated
Comment thread interface/ceed-basis.c
Comment thread interface/ceed-fortran.c
Comment thread interface/ceed-basis.c
- Rename `CeedBasisGetCollocatedGrad` to `CeedBasisGetCollocatedGrad1D` and change signature to take `const CeedScalar **` like other getters
- Add `CeedBasisHasCollocatedGrad` to check whether collocated gradient is suppported for a `CeedBasis`
- Update backends which either (a) computed the collo grad, or (b) precomputed and stored the collo grad, to use the caching `CeedBasisGetCollocatedGrad1D` function
@zatkins-dev
zatkins-dev force-pushed the zach/basis-collo-grad-interface branch from 3f00c44 to a1d4d20 Compare September 21, 2026 15:29
@zatkins-dev
zatkins-dev merged commit 58fb7cf into main Sep 21, 2026
35 checks passed
@zatkins-dev
zatkins-dev deleted the zach/basis-collo-grad-interface branch September 21, 2026 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants