<div class="gmail_quote">On Tue, Jul 3, 2012 at 11:21 PM, Luigia Ambrosio <span dir="ltr"><<a href="mailto:ambrosio.luigia@gmail.com" target="_blank">ambrosio.luigia@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word">Hi all,<div>I need to print with PetscPrintf the value of a variabile of type PetscScalar. Does anybody know how to do it?</div></div></blockquote><div><br></div><div>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.</div>
<div><br></div><div>You can print the real and imaginary parts separately.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">
<div>thanks</div><div><br><div>
<span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><div style="word-wrap:break-word">
<div>Luigia Ambrosio</div><div><br></div><div>Se la gente ferisce è perchè tu sei migliore e lo capisce bene! - Tiziano Ferro</div><div><br></div></div></span><br></span><br>
</div>
<br></div></div></blockquote></div><br>