<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Nov 3, 2015 at 9:01 PM, Jared Crean <span dir="ltr"><<a href="mailto:jcrean01@gmail.com" target="_blank">jcrean01@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    <div>  Hell Hong,<br>
              Is there a way to directly query the options database to
      get the value of Petsc options?  This is related to the discussion
      here:
      <a href="http://lists.mcs.anl.gov/pipermail/petsc-dev/2015-July/017944.html" target="_blank">http://lists.mcs.anl.gov/pipermail/petsc-dev/2015-July/017944.html</a>
      .  I though PetscOptionsGetString and PetscOptionsSetValue would
      provide this capability, but now it seems like petsc options
      cannot be accessed.<br></div></div></blockquote><div><br></div><div>I am not sure what you mean. This</div><div><br></div><div>  <a href="http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscOptionsGetString.html">http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscOptionsGetString.html</a><br></div><div><br></div><div>will get the raw input string for any option. The other functions return processed versions. What else do you want?</div><div><br></div><div>   Matt</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div bgcolor="#FFFFFF" text="#000000"><div>
          Jared Crean<br>
      <br>
      On 11/01/2015 10:19 AM, Hong wrote:<br>
    </div>
    <blockquote type="cite">
      <div dir="ltr">
        <div class="gmail_extra">
          <div class="gmail_quote">Jared :</div>
          <div class="gmail_quote">Either call KSPSetPCSide() or change </div>
          <div class="gmail_quote">const char name[] = "-ksp_pc_side"</div>
          <div class="gmail_quote">to a non-petsc option name, e.g.,
            "-my_ksp_pc_side".</div>
          <div class="gmail_quote"><br>
          </div>
          <div class="gmail_quote">Hong</div>
          <div class="gmail_quote"><br>
            <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hello,<br>
                  I am trying to use PetscOptionsGetString to retrieve
              the value of an option in the options database, but the
              value returned in the last argument indicates the option
              was not found.   In the attached code (a modified version
              of ksp example 2), the string "-ksp_pc_side" is passed in
              as the argument name. If I run the code as<br>
              <br>
                  ./jc2 -pc_type ilu -ksp_pc_side right<br>
              <br>
                  I get the output:<br>
              <br>
                  option -ksp_pc_side was found<br>
              <br>
                  from line 71 of the file.  Petsc does not complain of
              unused options when the program finishes.  Am I using this
              function incorrectly?<span><font color="#888888"><br>
                  <br>
                      Jared Crean<br>
                </font></span></blockquote>
          </div>
          <br>
        </div>
      </div>
    </blockquote>
    <br>
  </div>

</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">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</div>
</div></div>