[petsc-dev] MatMultHermitianTranspose
Jose E. Roman
jroman at dsic.upv.es
Wed Jul 18 13:42:15 CDT 2012
El 18/07/2012, a las 20:07, Jed Brown escribió:
> On Wed, Jul 18, 2012 at 11:09 AM, Jose E. Roman <jroman at dsic.upv.es> wrote:
> Er... well, now that I see better: it is not always safe, it will error out if mat->ops->conjugate is not available, for instance in BAIJ.
>
> There is MatMultHermitianTranspose_SeqBAIJ so that would only an issue for parallel BAIJ, but you were just going to use VecConjugate, right? In Matlab notation, A'*x = (x'*A)', so you only need VecConjugate.
No, the problem with mat->ops->conjugate is in the "explicit" transpose case. For instance this code:
ierr = MatTranspose(svd->OP,MAT_INITIAL_MATRIX,&svd->A);CHKERRQ(ierr);
#if defined(PETSC_USE_COMPLEX)
ierr = MatConjugate(svd->A);CHKERRQ(ierr);
#endif
You were suggesting to remove the #ifdef, right? What I was saying is that in real scalars the MatConjugate operation would fail in some matrix types (parallel BAIJ), but this operation is only necessary in complex scalars. So I will not remove the #ifdef
Jose
More information about the petsc-dev
mailing list