<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Mar 15, 2012, at 11:24 AM, Jed Brown wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div class="gmail_quote">On Wed, Mar 14, 2012 at 11:27, Mark F. Adams <span dir="ltr"><<a href="mailto:mark.adams@columbia.edu">mark.adams@columbia.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im"><blockquote type="cite">The matrix is asymmetric. Does this require the setting of an option?<br></blockquote><div><br></div></div><div>Yes: -pc_gamg_sym_graph</div><div></div></blockquote></div><br><div>
Mark, I don't like this name. First, it's imperative in the sense that it's describing a procedure for fixing something rather than declarative (stating some property of the problem). Second, there is already a way to state symmetry, MatSetOption():</div>
<div><br></div></blockquote><div><br></div><div>Good point, I've added:</div><div><br></div><div><div><br></div><div> ierr = MatIsSymmetricKnown(Amat, &set, &flg); CHKERRQ(ierr);</div><div> symm = pc_gamg_agg->sym_graph || !(set && flg);</div><div><br></div><div> </div></div><br><blockquote type="cite"><div><div> Options Describing Matrix Structure:</div><div>+ MAT_SPD - symmetric positive definite</div><div>- MAT_SYMMETRIC - symmetric in terms of both structure and value</div><div>. MAT_HERMITIAN - transpose is the complex conjugation</div>
<div>. MAT_STRUCTURALLY_SYMMETRIC - symmetric nonzero structure</div><div>- MAT_SYMMETRY_ETERNAL - if you would like the symmetry/Hermitian flag</div><div> you set to be kept with all future use of the matrix</div>
<div> including after MatAssemblyBegin/End() which could</div><div> potentially change the symmetry structure, i.e. you </div><div> KNOW the matrix will ALWAYS have the property you set.</div>
</div><div><br></div><div><br></div><div>Is there a reason you can't just use this information? If you have multiple methods for handling nonsymmetric structure, then I would suggest using PetscOptionsList() or PetscOptionsEnum() to select which to use.</div>
</blockquote></div><br></body></html>