On Wed, Nov 9, 2011 at 10:06 PM, Barry Smith <span dir="ltr"><<a href="mailto:bsmith@mcs.anl.gov">bsmith@mcs.anl.gov</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
  PetscErrorCode  DMSetFromOptions(DM dm)<br>
{<br>
  PetscBool      flg1 = PETSC_FALSE,flg;<br>
  PetscErrorCode ierr;<br>
  char           mtype[256] = MATAIJ;<br>
<br>
  PetscFunctionBegin;<br>
  if (dm->ops->setfromoptions) {<br>
    ierr = (*dm->ops->setfromoptions)(dm);CHKERRQ(ierr);<br>
  }<br>
  ierr = PetscObjectOptionsBegin((PetscObject)dm);CHKERRQ(ierr);<br>
    ierr = PetscOptionsBool("-dm_view", "Information on DM", "DMView", flg1, &flg1, PETSC_NULL);CHKERRQ(ierr);<br>
    ierr = PetscOptionsBool("-dm_preallocate_only","only preallocate matrix, but do not set column indices","DMSetMatrixPreallocateOnly",dm->prealloc_only,&dm->prealloc_only,PETSC_NULL);CHKERRQ(ierr);<br>

    ierr = PetscOptionsList("-dm_mat_type","Matrix type","MatSetType",MatList,mtype,mtype,sizeof mtype,&flg);CHKERRQ(ierr);<br>
    if (flg) {<br>
      ierr = PetscFree(dm->mattype);CHKERRQ(ierr);<br>
      ierr = PetscStrallocpy(mtype,&dm->mattype);CHKERRQ(ierr);<br>
    }<br>
  ierr = PetscOptionsEnd();CHKERRQ(ierr);<br>
  if (flg1) {<br>
    ierr = DMView(dm, PETSC_VIEWER_STDOUT_WORLD);CHKERRQ(ierr);<br>
  }<br>
  PetscFunctionReturn(0);<br>
}<br>
<br>
<br>
 While all others are<br>
<br>
   ierr = PetscObjectOptionsBegin((PetscObject)object);CHKERRQ(ierr);<br>
       common options<br>
       call options specific to object function<br>
   OptionsEnd()<br>
<br>
is there a reason for this paradigm shift? If not I will fix it to be like all the others.<br></blockquote><div><br></div><div>I have no problem with the change.</div><div><br></div><div>   Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

   Barry<br>
<br>
Note: there is no possibility of setting the type here but that is ok, that doesn't mean the process has to be turned on its head does it?<br>
<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
-- Norbert Wiener<br>