Yes<div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Nov 19, 2012 at 9:54 AM, Thomas Witkowski <span dir="ltr"><<a href="mailto:thomas.witkowski@tu-dresden.de" target="_blank">thomas.witkowski@tu-dresden.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<div>Jed: To you think that I can write a
work-around in just using PetscOptionsInsertString before KSPSetUp
with some settings that I don't will use later but which would
make KSPSetUp on the corresponding solver object cheap?<br>
<br>
Thomas<br>
<br>
Am 19.11.2012 09:48, schrieb Jed Brown:<br>
</div><div><div class="h5">
<blockquote type="cite">Unfortunately, options are currently the only way to
avoid the initial setup. We could add a special setup routine to
the PCFieldSplit interface that you could call, but there are lots
of other PCs that you sometimes want to reconfigure after "partial
setup". I've been unhappy with this for years, but have not found
a general and maintainable way to support, and configuration via
options is a better approach most of the time.
<div class="gmail_extra">
<br>
<br>
<div class="gmail_quote">On Mon, Nov 19, 2012 at 2:29 AM, Thomas
Witkowski <span dir="ltr"><<a href="mailto:thomas.witkowski@tu-dresden.de" target="_blank">thomas.witkowski@tu-dresden.de</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">In the
implementation of my Navier-Stokes solver, I initialize the
PCFieldSplit preconditioner in my source code (thus not on
the command line) in the following way:<br>
<br>
PCSetType(pc, PCFIELDSPLIT);<br>
PCFieldSplitSetType(pc, PC_COMPOSITE_SCHUR);<br>
PCFieldSplitSetSchurFactType(pc,
PC_FIELDSPLIT_SCHUR_FACT_FULL);<br>
...<br>
KSPSetUp(ksp);<br>
KSP *subKsp;<br>
PetscInt nSubKsp;<br>
PCFieldSplitGetSubKSP(pc, &nSubKsp, &subKsp);<br>
KSP kspVelocity = subKsp[0];<br>
KSP kspSchur = subKsp[1];<br>
...<br>
<br>
And then kspVelocity and kspSchur are filled with
appropriate options. The point is now, that to get the sub
solver objects, I have to run KSPSetUp before. In this case,
the sub solver objects are also initialized with some
predefined options (block jacobi ILU), which I don't need
and what takes some time and memory. Is there any other way
to get the sub solver objects before and to initialize than
the outer solver correctly with the inner solver I have
specified?<span><font color="#888888"><br>
<br>
<br>
Thomas<br>
</font></span></blockquote>
</div>
<br>
</div>
</blockquote>
<br>
</div></div></div>
</blockquote></div><br></div>