Skip to content

Operator construction, application rewrite - #418

Open
a-alveyblanc wants to merge 10 commits into
inducer:mainfrom
a-alveyblanc:tensor-product-sum-factorization
Open

a-alveyblanc wants to merge 10 commits into
inducer:mainfrom
a-alveyblanc:tensor-product-sum-factorization

Conversation

@a-alveyblanc

Copy link
Copy Markdown
Contributor

Refactors op.py so that operator application is more unified and adds an explicit file for constructing operators. Adds support for sum factorization with tensor-product discretizations. reference_mass_matrix, reference_face_mass_matrix, and reference_inverse_mass_matrix are marked as deprecated since they are public methods (nothing in grudge uses them anymore, but I thought this was the safest option for compatibility).

  • Moves operator construction to new file bilinear_forms.py and forms all operators using quadrature
  • Introduces support for tensor-product sum factorization with appropriate escape hatch
  • Refactors op.py around a general operator application routine
    • Applies dense operators as a matvec or tensor-product factors using tensor contractions over appropriate axes
    • Metric/area terms are applied before/after the the general application routine acts on input DOFs depending on the operator
  • weak_local_grad and weak_local_div use weak_local_d_dx to compute their respective results

@inducer

inducer commented Sep 24, 2026

Copy link
Copy Markdown
Owner

I like the direction. Could you investigate the failures?

@a-alveyblanc

a-alveyblanc commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor Author

Patched example/test failures. Remaining basedpyright failure is due to warnings. I'll address those sometime this week.

@a-alveyblanc

Copy link
Copy Markdown
Contributor Author

@inducer Ready for a look. basedpyright failure is due to warnings that come from weird typing interactions between libraries as we discussed.

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.

2 participants