[petsc-dev] MatMultHermitianTranspose

Jose E. Roman jroman at dsic.upv.es
Wed Jul 18 11:05:26 CDT 2012


El 18/07/2012, a las 17:45, Jed Brown escribió:

> 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?

Yes, I think this belongs to PETSc.

> 
> 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.

I see. Thanks.

> 
> 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
> 




More information about the petsc-dev mailing list