<br><br><div class="gmail_quote">2012/3/27 Gong Ding <span dir="ltr"><<a href="mailto:gdiso@ustc.edu">gdiso@ustc.edu</a>></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, "superlu");<br>
ierr = PetscOptionsSetValue("-mat_superlu_rowperm","LargeDiag");<br>
ierr = PetscOptionsSetValue("-mat_superlu_ilu_droptol","1e-4");<br>
ierr = PetscOptionsSetValue("-mat_superlu_ilu_filltol","1e-2");<br>
ierr = PetscOptionsSetValue("-mat_superlu_ilu_fillfactor","20");<br>
<br>
Suppose I use prefix as "KSP1_", should I change mat option name to, i.e.<br>
-KSP1_mat_superlu_rowperm?<br></blockquote><div>No, you still use '-mat_superlu_rowperm'.</div><div>You can add </div><div>ierr = MatSetOptionsPrefix(mat,"KSP1_");CHKERRQ(ierr);</div><div>to use '-KSP1_mat_superlu_rowperm'.</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>