<span id="mailbox-conversation"><div>I submitted a pull request for this: https://bitbucket.org/petsc/petsc/pull-request/291/creates-a-matcreatehermitiantranspose/diff</div>
<div><br></div>
<div>However, I forgot to pull master before submitting it, and someone added ex180 in the meantime.  Should I redo the pull request, or just let the merger fix it?</div>
<div><br></div>
<div>-Andrew</div></span><div class="mailbox_signature"><br></div>
<br><br><div class="gmail_quote"><p>On Wed, Mar 18, 2015 at 3:10 PM, Barry Smith <span dir="ltr"><<a href="mailto:bsmith@mcs.anl.gov" target="_blank">bsmith@mcs.anl.gov</a>></span> wrote:<br></p><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><br>> On Mar 18, 2015, at 3:41 PM, Andrew Spott <ansp6066@colorado.edu> wrote:
<br>> 
<br>> So, I’ve got a MatCreateHermitianTranspose function that has close to the same functionality as the MatCreatTranspose version.  So I’m getting ready to send a pull request.
<br>> 
<br>  Great
<br><br>> A few questions:
<br>> 
<br>> What branch should I add my changes to?
<br><br>master
<br><br>> 
<br>> Should I create tests for this?
<br><br>most definitely
<br><br>>  Where should I put them?
<br><br>src/mat/examples/tests
<br><br>> 
<br>> On Monday, Feb 23, 2015 at 9:02 PM, Barry Smith <bsmith@mcs.anl.gov>, wrote:
<br>> 
<br>> We've had a small amount of debate over the years on how to handle the Hermitian transpose and non-Hermitian transpose that never got fully resolved. 
<br>> 
<br>> Approach 1) Each (complex) matrix has a full set of transpose and Hermitian transpose operations (MatTranspose(), MatHermitianTranspose(), MatMultTranspose()), MatMultHermitianTranspose(), MatSolveTranspose(), MatSolveHermitianTranspose(), MatMatMultTranspose(), MatMatMultHermitianTranspose(), MatTranposeMatMult(), MatHermitianTransposeMatMult().......) plus there are two vector "inner" products; VecDot() and VecTDot(). 
<br>> 
<br>> Approach 2) Consider a (complex) vector (and hence the associated matrix operators on it) to live in the usual Hermitian inner product space or the non-Hermitian "inner product space". Then one only needs a single VecDot() and MatTranspose(), MatMultTranspose() ... that just "does the right thing" based on what space the user has declared the vectors/matrices to be in. 
<br>> 
<br>> Approach 2) seems nicer since it only requires 1/2 the functions :-) and so long as the two vector "spaces" never interact directly (for example what would be the meaning of the "inner" product of a vector in the usual Hermitian inner product space with a vector from the non-Hermitian "inner product space"?) certain seems simpler. Approach 1) might be simpler for some people who like to always see exactly what they are doing. 
<br>> 
<br>> I personally wish I had started with Approach 2 (but I did not), but there could be some flaw with it I am not seeing. 
<br>> 
<br>> Barry 
<br>> 
<br>> 
<br>> 
<br>> 
<br>> 
<br>> 
<br>> 
<br>> > On Feb 23, 2015, at 6:50 PM, Andrew Spott <ansp6066@colorado.edu> wrote: 
<br>> > 
<br>> > I’m definitely willing to submit it as a pull request. 
<br>> > 
<br>> > Also, while I’m at it, I’m going to write a “duplicate” function for transpose and hermitian_transpose. Just because this seems 1) easy ( MatHermitianTranspose can return a new copy, as well as MatTranspose), and 2) necessary to use these for EPS. 
<br>> > 
<br>> > Also, is “transpose” a good enough MatType? Or does a new one need to be written? 
<br>> > 
<br>> > -Andrew 
<br>> > 
<br>> > 
<br>> > 
<br>> > On Mon, Feb 23, 2015 at 3:12 PM, Jed Brown <jed@jedbrown.org> wrote: 
<br>> > 
<br>> > <signature.asc> 
<br>> > 
<br>> 
<br><br></blockquote></div><br>