These calls compute default values for normtype and pcside based on partial KSP options,<div>which can cause an unwarranted error to be thrown.</div><div>For example, in code there may be</div><div><br></div><div>KSPSetPCSide(ksp, PC_RIGHT); /* hardwired default, e.g., in Moose. */</div>
<div><br></div><div>Now, when I'm using command-line arguments</div><div>-ksp_type preonly </div><div>an error is thrown, since KSPPREONLY doesn't work with PC_RIGHT.</div><div>Fine, I try</div><div>-ksp_type preonly -ksp_pc_side left</div>
<div>but still get the same error, since KSPSetUpNorms_Private() is called after KSP type has been set to KSPPREONLY,</div><div>but BEFORE there was a chance to set the PC side!</div><div><br></div><div>Is there any reason to keep these calls to KSPSetUpNorms_Private() in KSPSetFromOptions()?</div>
<div>KSPSetUpNorms_Private() will be just about the first thing called in KSPSetUp() and will compute the appropriate normtype and pcside,</div><div>but now based on complete KSP options.</div><div><br></div><div>Not to mention that calling XXXSetUp_YYY() XXXSetFromOptions() seems generally contrary to PETSc's design</div>
<div>philosophy. </div><div><br></div><div>Dmitry.</div><div><br></div><div><div><br></div>
</div>