[petsc-users] ILU preconditioner

Jed Brown jed at 59A2.org
Fri Jun 3 09:27:55 CDT 2011


On Fri, Jun 3, 2011 at 16:20, Danesh Daroui <danesh.daroui at ltu.se> wrote:

> Yes that's exactly what I want to do. I can also use PETSc to calculate
> the preconditioner, but can I use it to calculate real part's ILU while
> I am using complex solver?
>

No, the scalar type is chosen at configuration time. You can't mix real and
complex Mat and Vec types in the same program (without weird non-portable
shared library tricks, and I'm not sure that would even work).

I would just use complex everywhere to check that the algorithm works. You
can even create a preconditioning matrix that is just the real part (still
using complex arithmetic) to check that the algorithm you propose really
works. Then you can do the PCShell implementation, but still put the result
in a PETSc Mat which uses complex scalars. Once that works, you can swap out
the PETSc Mat for some external library that does ILU in real arithmetic.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20110603/4cf9bc2c/attachment.htm>


More information about the petsc-users mailing list