Pierre,

     Go ahead and make a pull request. 

     Please add a PetscInfo() line when it does the transposes that says 
something like "Explicitly transposing MATTRANSPOSEMAT matrix to perform 
MatAXPY()"

   Barry 

   I don't like aesthetically the trick of calling  
PetscObjectQueryFunction((PetscObject)X,"MatTransposeGetMat_C",&f); to 
determine if it should do a transpose or Hermitian transpose but I don't have a 
better way so I guess with live with it.


> On Apr 9, 2019, at 1:45 PM, Pierre Jolivet via petsc-dev 
> <[email protected]> wrote:
> 
> We are trying to solve a generalized eigenvalue problem with -st_type sinvert 
> using a MATNEST as a RHS and a nonzero shift.
> Some Mats in the MATNEST are either created with MatCreateHermitianTranspose 
> or MatCreateTranspose.
> 
> MatAXPY (needed by -st_type sinvert) is failing us because there is obviously 
> no MatGetRow for MATTRANSPOSE.
> What I would like to do is get the associated matrix and explicitly 
> (Hermitian) transpose it, then call MatAXPY.
> 
> Would such an ugly code (that fixes our solver) be mergeable to master 
> https://bitbucket.org/petsc/petsc/branch/jolivet/axpy-transpose#diff?
> If not, do you have some suggestions?
> 
> Thanks,
> Pierre

Reply via email to