cast PetscScalar to double

Fredrik Bengzon fredrik.bengzon at
Wed Aug 19 04:53:07 CDT 2009

I'm using a Petsc 3 installation compiled with support for complex 
numbers. However, in the code I have made frequent use of the stl 
library and the standard type double. This now gives a compilation error 
since PetscScalar can not be casted into double. Do you know of a quick 
workaround or do I have to replace every instance of double with 
Fredrik Bengzon

More information about the petsc-users mailing list