[petsc-dev] MatHermitianTransposeGetMat

Pierre Jolivet pierre.jolivet at enseeiht.fr
Sat Oct 20 00:17:09 CDT 2018


Hi Dave,

> On 19 Oct 2018, at 11:10 PM, Dave May <dave.mayhem23 at gmail.com> wrote:
> 
> Hi Pierre,
> 
> On Fri, 19 Oct 2018 at 21:28, Pierre Jolivet <pierre.jolivet at enseeiht.fr <mailto:pierre.jolivet at enseeiht.fr>> wrote:
> Hello,
> I’m trying to call MatTransposeGetMat on a Mat created with MatCreateHermitianTranspose, but this fails.
> Why is there no MatHermitianTransposeGetMat?
> 
> Looks like an oversight to me.

That is what I was afraid of. I’ve proposed a pull request as you suggested.

Thanks,
Pierre

> Is there a work around?
> 
> Doesn't seem to be a hack workaround possible as the object holding the reference to the original matrix is declared directly in the C file. See typedef struct Mat_HT
> 
> https://www.mcs.anl.gov/petsc/petsc-current/src/mat/impls/transpose/htransm.c.html <https://www.mcs.anl.gov/petsc/petsc-current/src/mat/impls/transpose/htransm.c.html>
> 
> Support for XXXGetMat() needs to go into master. Essentially one needs to just copy the code from 
> 
> https://www.mcs.anl.gov/pets/petsc-current/src/mat/impls/transpose/transm.c.html <https://www.mcs.anl.gov/pets/petsc-current/src/mat/impls/transpose/transm.c.html>
> associated with MatTransposeGetMat and change the type from Mat_Transpose to Mat_HT.
> 
> Want to make a PR?
> 
> Cheers,
>   Dave
> 
> 
> 
> 
> 
> 
> 
> Thanks,
> Pierre

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20181020/268e1535/attachment-0001.html>


More information about the petsc-dev mailing list