<div dir="ltr">Hi Blaise,<div><br></div><div>I need to update this so that it TaoGetKSP mimics the behavior of SNESGetKSP (ie, creates a KSP object if it doesn't exist already, even if it will never get used). </div><div>
<br></div><div>Jason</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jul 30, 2014 at 6:19 PM, Blaise A Bourdin <span dir="ltr"><<a href="mailto:bourdin@lsu.edu" target="_blank">bourdin@lsu.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Responding to myself to clarify my question:<br>
<br>
This is with petsc-maint (3.5) up to date<br>
<br>
bourdin@galerkin:tutorials (maint)$ git show<br>
commit 587bed1b5ce23d03610a5e586bde2d77cb223937<br>
Merge: ac2cab2 4856ba2<br>
Author: Satish Balay <<a href="mailto:balay@mcs.anl.gov">balay@mcs.anl.gov</a>><br>
Date: Wed Jul 30 09:53:57 2014 -0500<br>
<br>
Merge branch 'barry/check-mpi-include' into maint<br>
<br>
I see in the release notes of 3.5.1 a reference to TAOSetUp()being needed, but calling TaoSetUp after TAOSetFromOptions but before TaoGetKSP does not make any difference.<br>
<br>
Breakpoint 1.1, main (argc=3, argv=0x7fff5fbfe9f8) at /opt/HPC/petsc-3.5/src/tao/unconstrained/examples/tutorials/eptorsion1.c:148<br>
148 ierr = TaoSetFromOptions(tao);CHKERRQ(ierr);<br>
(idb) n<br>
150 ierr = TaoSetUp(tao);<br>
(idb)<br>
151 ierr = TaoGetKSP(tao,&ksp);<br>
(idb)<br>
153 ierr = KSPView(ksp,PETSC_VIEWER_STDOUT_WORLD);<br>
(idb) print tao<br>
$1 = (struct _p_Tao *) 0x10885c860<br>
(idb) print ksp<br>
$2 = (struct _p_KSP *) 0x0<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
On Jul 30, 2014, at 6:09 PM, Blaise A Bourdin <<a href="mailto:bourdin@lsu.edu">bourdin@lsu.edu</a>> wrote:<br>
<br>
> Hi,<br>
><br>
> TAOGetKSP returns a null pointer when called before TAOSolve (swap the calls in eptorsion1.c for instance). Is this expected? I want to override the default KSP in my application.<br>
><br>
> Blaise<br>
> --<br>
> Department of Mathematics and Center for Computation & Technology<br>
> Louisiana State University, Baton Rouge, LA 70803, USA<br>
> Tel. <a href="tel:%2B1%20%28225%29%20578%201612" value="+12255781612">+1 (225) 578 1612</a>, Fax <a href="tel:%2B1%20%28225%29%20578%204276" value="+12255784276">+1 (225) 578 4276</a> <a href="http://www.math.lsu.edu/~bourdin" target="_blank">http://www.math.lsu.edu/~bourdin</a><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
<br>
--<br>
Department of Mathematics and Center for Computation & Technology<br>
Louisiana State University, Baton Rouge, LA 70803, USA<br>
Tel. <a href="tel:%2B1%20%28225%29%20578%201612" value="+12255781612">+1 (225) 578 1612</a>, Fax <a href="tel:%2B1%20%28225%29%20578%204276" value="+12255784276">+1 (225) 578 4276</a> <a href="http://www.math.lsu.edu/~bourdin" target="_blank">http://www.math.lsu.edu/~bourdin</a><br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
</div></div></blockquote></div><br></div>