This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

System of equations with complex coefficients in UFL file

0 votes

Hi everyone,

I have to write the UFL form of an homogeneous system of four eqautions conatining complex coeffcients, in particular one term of each equation has the imaginary unit in it. So far I have written one bilinear form which is the sum of the four equations with four scalar trial functions and four test functions.

How can I deal with this problem? Should I split the form in two parts, real and imanginary, defining another four trial functions for the imaginary part?

Thanks for any answer

asked Nov 16, 2015 by ededonati FEniCS Novice (200 points)

1 Answer

+1 vote

UFL has no support for complex numbers, so you can do it, as you say, by writing separate equations for the real and imaginary parts. It is also possible to use a VectorFunctionSpace by carefully writing the equations for each component.

In the future, complex numbers may be supported, but it requires a significant change to the entire codebase.

answered Nov 16, 2015 by chris_richardson FEniCS Expert (31,740 points)
...