On Mar 15, 2012, at 11:24 AM, Jed Brown wrote: > On Wed, Mar 14, 2012 at 11:27, Mark F. Adams <mark.adams at columbia.edu> > wrote: >> The matrix is asymmetric. Does this require the setting of an option? > > Yes: -pc_gamg_sym_graph > > 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(): >
Good point, I've added: ierr = MatIsSymmetricKnown(Amat, &set, &flg); CHKERRQ(ierr); symm = pc_gamg_agg->sym_graph || !(set && flg); > Options Describing Matrix Structure: > + MAT_SPD - symmetric positive definite > - MAT_SYMMETRIC - symmetric in terms of both structure and value > . MAT_HERMITIAN - transpose is the complex conjugation > . MAT_STRUCTURALLY_SYMMETRIC - symmetric nonzero structure > - MAT_SYMMETRY_ETERNAL - if you would like the symmetry/Hermitian flag > you set to be kept with all future use of the > matrix > including after MatAssemblyBegin/End() which could > potentially change the symmetry structure, i.e. > you > KNOW the matrix will ALWAYS have the property you > set. > > > 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. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120315/baa15c1d/attachment-0001.htm>
