On Wed, Jul 18, 2012 at 10:22 AM, Jose E. Roman <jroman@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