On Sun, Mar 18, 2012 at 9:43 AM, Xavier Garnaud <span dir="ltr"><<a href="mailto:xavier.garnaud@ladhyx.polytechnique.fr">xavier.garnaud@ladhyx.polytechnique.fr</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Dear PETSc team,<br><br>I am performing nonlinear and linearized computations. Nonlinear computations are performed using real numbers (it would be approximately twice slower to use complex numbers instead). For linearized computations however, it is much more convenient to use complex numbers. These two types of computations are performed separately: first a run a nonlinear simulation, I save the result on the disk, and then I load it in a different code to perform linear operations. <br>
I would therefore like to be able to use VecView using a version of PETSc compiled with real numbers and VecLoad using a version compiled for complex numbers. I would like to do this using binary or HDF5 format. I tried to create a real vector with twice the size of my non-linear result and fill every other element with a 0, but it does not work. Is there a way to do this using existing functions?<br>
Thank you very much,<br></blockquote><div><br></div><div>I think the easiest thing to do here is write a custom viewer (start with binary) to writes complex numbers.</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Sincerely,<br><br>Xavier<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
-- Norbert Wiener<br>