[petsc-users] Complex conjugate of PetscScalar

Phanisri Pradeep Pratapa ppratapa at gatech.edu
Tue Apr 5 18:04:20 CDT 2016


Hi,

I am trying to find the complex conjugate of a petsc scalar (petsc
configured for complex numbers). Currently I do it by finding real and
imaginary parts (using PetscRealPart, PetscImaginaryPart) and then
subtracting them by multiplying the imaginary part with PETSC_i. Please let
me know if there is a better way to do it for a single PetscScalar variable.

Thank you,

Regards,

Pradeep
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20160405/a5db491c/attachment.html>


More information about the petsc-users mailing list