[petsc-users] real and complex numbers

Xavier Garnaud xavier.garnaud at ladhyx.polytechnique.fr
Sun Mar 18 09:43:45 CDT 2012


Dear PETSc team,

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.
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?
Thank you very much,

Sincerely,

Xavier
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120318/f6448058/attachment.htm>


More information about the petsc-users mailing list