<br><br><div class="gmail_quote">2012/3/27 Gong Ding <span dir="ltr">&lt;<a href="mailto:gdiso@ustc.edu">gdiso@ustc.edu</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi<br>
I now use KSPSetOptionsPrefix to avoid option conflict to several KSP objects.<br>
I know KSPSetOptionsPrefix will call PCSetOptionsPrefix, PC options can be safely added the same prefix.<br>
However, what about the matrix prefix? i.e. I would like to use following code<br>
<br>
ierr = PCSetType (pc, (char*) PCILU);<br>
ierr = PCFactorSetMatSolverPackage (pc, &quot;superlu&quot;);<br>
ierr = PetscOptionsSetValue(&quot;-mat_superlu_rowperm&quot;,&quot;LargeDiag&quot;);<br>
ierr = PetscOptionsSetValue(&quot;-mat_superlu_ilu_droptol&quot;,&quot;1e-4&quot;);<br>
ierr = PetscOptionsSetValue(&quot;-mat_superlu_ilu_filltol&quot;,&quot;1e-2&quot;);<br>
ierr = PetscOptionsSetValue(&quot;-mat_superlu_ilu_fillfactor&quot;,&quot;20&quot;);<br>
<br>
Suppose I use prefix as &quot;KSP1_&quot;, should I change mat option name to, i.e.<br>
-KSP1_mat_superlu_rowperm?<br></blockquote><div>No, you still use &#39;-mat_superlu_rowperm&#39;.</div><div>You can add </div><div>ierr = MatSetOptionsPrefix(mat,&quot;KSP1_&quot;);CHKERRQ(ierr);</div><div>to use &#39;-KSP1_mat_superlu_rowperm&#39;.</div>
<div><br></div><div>Hong</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class="HOEnZb"><font color="#888888"><br>
Gong Ding<br>
<br>
</font></span></blockquote></div><br>