Skip to content

Support for complex numbers #27

Open

Description

@benvial

Thanks for working on this, that's a great addition to the fenics ecosystem to have autodiff with dolfinx.

I was wondering if dxa supports or plans to support complex valued PDEs (but real valued control functions) as there is optional complex number support in dolfinx?
That would be very useful for e.g wave problems.

Activity

  1. jorgensd commented on Oct 30, 2025

    @jorgensd
    Member

    It is a bit complicated with complex valued PDEs.
    I did play around with this a while back, and the adjointing of the forward problem is ok, while the challenge is in the differentiation of the functional (Should be real valued to make sense) and with respect to the control.

    At the moment DOLFINx doesn't support mixing datatypes (functions with real and complex values) in the same for, which makes it tricky to make nice for now without a lot of hacking.

    This might improve in the future, ref: FEniCS/dolfinx#3880

  2. benvial commented on Nov 2, 2025

    @benvial
    Author

    Thanks for the quick answer and for pointing to this dolfinx relevant issue, will keep an eye on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions