<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Isn't this redundant?<div><br></div><div><span class="Apple-style-span" style="font-family: Times; "><pre width="80"><a name="line104">104: </a>  <a href="http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscBagRegisterReal.html#PetscBagRegisterReal">PetscBagRegisterReal</a>(bag, &amp;user-&gt;alpha, 1.0, <font color="#666666">"alpha"</font>, <font color="#666666">"Linear coefficient"</font>);
<a name="line105">105: </a>  <a href="http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscBagRegisterReal.html#PetscBagRegisterReal">PetscBagRegisterReal</a>(bag, &amp;user-&gt;lambda, 6.0, <font color="#666666">"lambda"</font>, <font color="#666666">"Nonlinear coefficient"</font>);
<a name="line106">106: </a>  <a href="http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscBagSetFromOptions.html#PetscBagSetFromOptions">PetscBagSetFromOptions</a>(bag);
<a name="line107">107: </a>  <a href="http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscOptionsGetReal.html#PetscOptionsGetReal">PetscOptionsGetReal</a>(<a href="http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PETSC_NULL.html#PETSC_NULL">PETSC_NULL</a>,<font color="#666666">"-alpha"</font>,&amp;user-&gt;alpha,<a href="http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PETSC_NULL.html#PETSC_NULL">PETSC_NULL</a>);
<a name="line108">108: </a>  <a href="http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscOptionsGetReal.html#PetscOptionsGetReal">PetscOptionsGetReal</a>(<a href="http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PETSC_NULL.html#PETSC_NULL">PETSC_NULL</a>,<font color="#666666">"-lambda"</font>,&amp;user-&gt;lambda,<a href="http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PETSC_NULL.html#PETSC_NULL">PETSC_NULL</a>);</pre></span></div><div>(from&nbsp;<a href="http://www.mcs.anl.gov/petsc/petsc-current/src/snes/examples/tutorials/ex8.c.html">http://www.mcs.anl.gov/petsc/petsc-current/src/snes/examples/tutorials/ex8.c.html</a> )</div><div><br></div><div>Doesn't the PetscBagSetFromOptions allow you to load values into the structure using "-name", which means that the capabilities in lines 107 and 108 are implicit in the "PetscBagSetFromOptions" call.</div><div><br></div><div>Or do I not understand what PetscBagSetFromOptions does?</div><div><br></div><div>-Andrew</div></body></html>