CEED / libCEED

CEED Library: Code for Efficient Extensible Discretizations
https://libceed.org
BSD 2-Clause "Simplified" License
197 stars 46 forks source link

Diagonal Assembly for Uncoupled Components #1219

Open jeremylt opened 1 year ago

jeremylt commented 1 year ago

Summary

Our diagonal assembly does more work and memory than it needs when we are working with uncoupled fields. We should have a way to indicate uncoupled fields to improve performance (especially memory) for diagonal assembly.

Context

Jed:

I think the memory issue is related to assembling the diagonal for the projection, which I believe forms a dense qfunction "core" at each quadratrue. We could instead assemble the diagonal for a scalar projection and use a Kronecker product on the diagonal so that we never need to deal with that big intermediate data structure.

Jeremy:

Yeah, I also want to pursue that fix over in libCEED, but I think subsetting the list of values would also be a nice feature to have if we can add it without too much complexity. I'd put #79 as higher priority though.

This might be easier to add as a Ratel only fix in the short term. However, it feels like something that is generally useful. Though, I'm not sure how I'd want to indicate in libCEED that this sort of diagonal assembly should happen

Jed:

CeedQFunctionSetDiagonal(CeedQFunction, bool) or more generally CeedQFunctionSetCoupling(CeedQFunction, const CeedInt group[])?

jeremylt commented 4 days ago

@zatkins-dev I think this would help with some of the memory usage from the diagonal assembly for the diagnostic value projection on the GPU