Using dolfinx-external-operator to in combination with mixed_element

Can the dolfinx-external-operator package (GitHub - a-latyshev/dolfinx-external-operator: Extension of DOLFINx implementing the concept of external operator) be used in combination with mixed_element in a variational formulation – to solve for a coupled system of equations? If so, would it be possible to share a simple example?

1 Like

Bumping this! Having the same issue right now :slight_smile:

1 Like

See Using Python functions in FEniCS variational formulation - #24 by Thomas_Petersen for my attempted implementation of dolfinx-external-operator within a mixed_element construction.

What I can confirm is we (Expressing general constitutive models in FEniCSx using external operators and algorithmic automatic differentiation - Archive ouverte HAL) haven’t yet tried mixed forms with the DOLFINx implementation; the underlying UFL external operator has unit tests covering the mixed case, so there we are already OK.

In terms of providing a didactic example of using external operators and mixed forms, there is a simple example here, currently in primal form that (I think) could be duplicated into a new notebook in mixed form:

https://a-latyshev.github.io/dolfinx-external-operator/demo/demo_nonlinear_heat_equation_part2.html

Users could then use this example as a basis for their own work when using a mixed form.

Please let me know if you’d be interested in doing this and I would be happy to assist you in getting a pull request defined, reviewed, and merged into the main branch.