[petsc-dev] how to print with PescPrintf a PetscScalar value?

Luigia Ambrosio ambrosio.luigia at gmail.com
Wed Jul 4 02:53:17 CDT 2012


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 at gmail.com> wrote:
> Is there a function already avilable to get the real part of a petscscalar value?
> 
> 
> PetscRealPart() and PetscImaginaryPart() 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20120704/f32e233f/attachment.html>


More information about the petsc-dev mailing list