[petsc-users] support for complex number computations

Matthew Knepley knepley at gmail.com
Thu Oct 27 08:40:51 CDT 2011


On Thu, Oct 27, 2011 at 7:53 AM, Dominik Szczerba <dominik at itis.ethz.ch>wrote:

> I have several codes using the KSP linear solvers with real numbers.
> As I understood from the documentation, in order to use complex
> numbers I have to configure petsc in a different way. The information
> I failed to find is what does it take to port my current real-based
> codes to work with a complex-based Petsc version. Is a choice
> real/complex a transparent one or requires explicit adaptations in the
> code?
>

If you consistently use PetscScalar, and use PetscReal when you rely on
the ordering property of the reals, everything should work.

   Matt


> Thanks for any clarifications,
> Regards,
> Dominik

-- 
What most experimenters take for granted before they begin their experiments
is infinitely more interesting than any results to which their experiments
lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20111027/309118b9/attachment.htm>


More information about the petsc-users mailing list