[petsc-dev] MatMultHermitianTranspose

Jed Brown jedbrown at mcs.anl.gov
Wed Jul 18 10:45:21 CDT 2012


On Wed, Jul 18, 2012 at 10:22 AM, Jose E. Roman <jroman at dsic.upv.es> wrote:

> El 18/07/2012, a las 15:05, Jed Brown escribió:
>
> > MatMultHermitianTranspose could have a default implementation in terms
> of the others. Then it would work in all cases, right?
> >
>
> Do you mean VecConjugate(x) plus MatMultTranspose(A,x,y) plus
> VecConjugate(y) ??
> I guess this would work.
>

In the PETSc implementation, right?

Also, I notice this in your current code. It is always safe to call
MatConjugate(), the function will just do nothing if not using complex.

src/svd/interface/svdsetup.c-        ierr =
MatTranspose(svd->OP,MAT_INITIAL_MATRIX,&svd->AT);CHKERRQ(ierr);
src/svd/interface/svdsetup.c-#if defined(PETSC_USE_COMPLEX)
src/svd/interface/svdsetup.c:        ierr =
MatConjugate(svd->AT);CHKERRQ(ierr);
src/svd/interface/svdsetup.c-#endif
src/svd/interface/svdsetup.c-      } else {
src/svd/interface/svdsetup.c-        ierr =
MatTranspose(svd->OP,MAT_INITIAL_MATRIX,&svd->A);CHKERRQ(ierr);
src/svd/interface/svdsetup.c-#if defined(PETSC_USE_COMPLEX)
src/svd/interface/svdsetup.c:        ierr =
MatConjugate(svd->A);CHKERRQ(ierr);
src/svd/interface/svdsetup.c-#endif
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20120718/8edc3570/attachment.html>


More information about the petsc-dev mailing list