[petsc-dev] how to print with PescPrintf a PetscScalar value?
Luigia Ambrosio
ambrosio.luigia at gmail.com
Wed Jul 4 02:26:57 CDT 2012
Is there a function already avilable to get the real part of a petscscalar value?
thans again
Luigia Ambrosio
Se la gente ferisce è perchè tu sei migliore e lo capisce bene! - Tiziano Ferro
Il giorno 04/lug/2012, alle ore 09:23, Jed Brown ha scritto:
> On Tue, Jul 3, 2012 at 11:21 PM, Luigia Ambrosio <ambrosio.luigia at gmail.com> wrote:
> Hi all,
> I need to print with PetscPrintf the value of a variabile of type PetscScalar. Does anybody know how to do it?
>
> It's not possible to do directly with a printf-type function because std::complex is a non-POD type, thus it cannot be passed to a variadic function.
>
> You can print the real and imaginary parts separately.
>
> thanks
>
> Luigia Ambrosio
>
> Se la gente ferisce è perchè tu sei migliore e lo capisce bene! - Tiziano Ferro
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20120704/430652b3/attachment.html>
More information about the petsc-dev
mailing list