It seems I don't have this function. I checked my configuring options, in particular
--with-scalar-type=complex 

so I'm sure that a PetscScalar variable is handled as a complex number. I tried to use the PetscRealPart but it says:
error: 'PetscRealPart' was not declared in this scope

I included also the header "petscmat.h" but there isn't defined this function. 
It seems that I don't include the right header, I googled it but I didn't find it. Which header shiuld I include?
thanks

Luigia Ambrosio

Se la gente ferisce è perchè tu sei migliore e lo capisce bene! - Tiziano Ferro




Il giorno 04/lug/2012, alle ore 09:28, Jed Brown ha scritto:

On Tue, Jul 3, 2012 at 11:26 PM, Luigia Ambrosio <ambrosio.luigia@gmail.com> wrote:
Is there a function already avilable to get the real part of a petscscalar value?


PetscRealPart() and PetscImaginaryPart()