[petsc-dev] various dot products messed up for complex numbers?
Jed Brown
jedbrown at mcs.anl.gov
Sun Apr 15 13:09:50 CDT 2012
On Sun, Apr 15, 2012 at 12:55, Barry Smith <bsmith at mcs.anl.gov> wrote:
> Real mathematicians conjugate the second one :-)
>
I never unrderstood that choice. I like vectors to be column vectors, one
forms to be row vectors, and operations to have standard fixity. How some
mathematicians ended up with infix operators and postfix inner products is
beyond me.
>
> The code to check is PETSc's conjugate gradient, there the conjugate
> does mater :-).
>
Looks right to me.
ierr = KSP_MatMult(ksp,Amat,P,W);CHKERRQ(ierr); /* w <-
Ap */
ierr = VecXDot(P,W,&dpi);CHKERRQ(ierr); /* dpi
<- p'w */
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20120415/22825315/attachment.html>
More information about the petsc-dev
mailing list