Skip to content

Composable Weak Form - #1713

Open
gabsillis wants to merge 1 commit into
developfrom
gianni-composable-wf
Open

gabsillis wants to merge 1 commit into
developfrom
gianni-composable-wf

Conversation

@gabsillis

Copy link
Copy Markdown
Contributor

ComposableWeakForm is a WeakForm that has a set of independent auxiliary fields that can be eliminated.
Say we have something like $\mathcal{J}(u, v, p(u, v), q(u, v)) = 0$ subject to $C_p(u, v, p) = 0$ and $C_q(u, v, q) = 0$. Often the solves for $C_p$ and $C_q$ may be more trivial than the overall $\mathcal{J} = 0$ problem, this could make the monolithic problem much slower or impractical to solve than first doing the elimination and then solving $\mathcal{J}$.

I've been referring to $u$ and $v$ in this case as primary variables and $p$ and $q$ as auxiliary variables. I would like the user to be able to define a WeakForm $\mathcal{J}(u, v, p, q)$ and specify WeakForms for $C_p$ and $C_q$ along with EquationSolvers for each auxiliary variable and WeakForm. This class then internally does all the elimination (and Schur complement corrections when computing derivatives) so that an external solver can treat the weak form as $\mathcal{J}(u, v)$.

I would love some inputs on the design (and also naming as I'm not super attached to ComposableWeakForm). I plan to integrate the element solver work into the optimization where the constraint is block independent per element. The primary difference right now is the ability to directly access the decompositions for each block. I also chose EquationSolver as the type for the solvers for $C_p$ and $C_q$ so that we can retain the ability to do matrix free solves.

TODOs before this is ready for review:

  • jvp() and vjp() and an interface to do matrix free operations
  • simple usage example
  • tests
  • integrate with the element block solver

@gabsillis gabsillis added the WIP Work in progress label Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

WIP Work in progress

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant