[petsc-users] Complex conjugate of PetscScalar

Barry Smith bsmith at mcs.anl.gov
Tue Apr 5 18:07:38 CDT 2016


PetscConjComplex()



> On Apr 5, 2016, at 6:04 PM, Phanisri Pradeep Pratapa <ppratapa at gatech.edu> wrote:
> 
> 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



More information about the petsc-users mailing list