Thanks Wolfgang for your answer. But I'm surprised to see that some work 
should be done regarding the iterative solvers. I would expect that deal.ii 
relies on PETSc to use iterative solvers. And since PETSc can handle 
complex numbers, I would not have expected this to be a problem.

Best,

Lucas

Le jeudi 9 janvier 2025 à 23:24:08 UTC+1, Wolfgang Bangerth a écrit :

> On 1/6/25 08:20, Lucas P wrote:
> > 
> > I'm considering starting to use deal.ii with a strong emphasis on 
> complex 
> > numbers equations. I read in the FAQ 
> > <
> https://github.com/dealii/dealii/wiki/Frequently-Asked-Questions#can-i-solve-problems-over-complex-numbers>
>  
> that it is recommended to split the problem into real and imaginary parts. 
> I am not fully convinced by the argument given on the scalar product (which 
> can be easily redefined, I think), for instance in FENICSx I directly use 
> complex numbers.
> > I saw in the tutorial 58 
> > <https://dealii.org/current/doxygen/deal.II/step_58.html> that it's 
> still possible not to split. On the Github issue tracker <
> https://github.com/dealii/dealii/issues/16364>, an user bumped into 
> errors when trying to use the monolithic way. But since then I observe that 
> additional work was done to ensure the compatibility with 
> `std::complex<double>` (see for instance this <
> https://github.com/dealii/dealii/pull/16717>and that <
> https://github.com/dealii/dealii/pull/16754>).
> > So my question is: how mature is now deal.ii with `std::complex`? Are 
> there 
> > other arguments that the one on scalar product to justify the splitting 
> (or 
> > maybe I missed why this argument is so important)?
>
> Lucas:
> I suspect that "almost everything" works, or could be made to work with 
> relatively few changes, with the exception of iterative solvers. I don't 
> think 
> that any of the iterative solvers we have take into account complex 
> numbers 
> and how one needs to/must not take the complex conjugate in any of the 
> operations involved. That's why step-58 works: It just bypasses the issue 
> by 
> using a direct solver.
>
> If you wanted to give it a try to work in a monolithic formulation (i.e., 
> using complex numbers rather than real/imaginary parts separately), I 
> would 
> say go ahead and see where you get stuck, then report back. Most things 
> should 
> be relatively easy to fix, but prepared for the fact that you might have 
> to 
> spend significant time in the iterative solvers figuring what a given 
> solver 
> *should* be doing in the complex case, and then *auditing* what it 
> actually 
> does. Making the necessary fixes is likely going to be quick; it's knowing 
> where something needs to be fixed.
>
> Best
> W.
>
>
> -- 
> ------------------------------------------------------------------------
> Wolfgang Bangerth email: bang...@colostate.edu
> www: http://www.math.colostate.edu/~bangerth/
>
>
>

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/dealii/1be75527-8265-43dd-9b89-e62ab629676dn%40googlegroups.com.

Reply via email to