<div dir="ltr"><div>Hi Justin,</div><div><br></div>The C interface allows null to be passed as one of the vectors, this looks like an issue with the petsc4py interface specifically.<div><br></div><div>You can create the unneeded bound vector and set it to infinity or negative infinity, and pass it to this function instead of using none (TAO will do this anyway if you pass in NULL).</div><div><br></div><div>Jason</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Sep 17, 2015 at 4:00 PM, Justin Chang <span dir="ltr"><<a href="mailto:jychang48@gmail.com" target="_blank">jychang48@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div dir="ltr">Matt,
<div><br>
</div>
<div>This is the error I get if I use None:</div>
<div><br>
</div>
Traceback (most recent call last):<br>
File "2D_plume_ADR_ex1.py", line 146, in <module><br>
tao_D.setVariableBounds(lb_vec,None)<br>
File "PETSc/TAO.pyx", line 198, in petsc4py.PETSc.TAO.setVariableBounds (src/petsc4py.PETSc.c:189484)<br>
TypeError: Cannot convert NoneType to petsc4py.PETSc.Vec
<div><br>
</div>
<div>Thanks,</div>
<div>Justin</div>
</div><div><div class="h5">
<div class="gmail_extra"><br>
<div class="gmail_quote">On Thu, Sep 17, 2015 at 2:59 PM, Matthew Knepley <span dir="ltr">
<<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote"><span>On Thu, Sep 17, 2015 at 3:55 PM, Justin Chang
<span dir="ltr"><<a href="mailto:jychang48@gmail.com" target="_blank">jychang48@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Hi all,
<div><br>
</div>
<div>I am attempting to use TaoSetVariableBounds via petsc4py. Is there a way to set only lower bounds or upper bounds and not both? In PETSc I could replace one of the Vecs with NULL, but how would I do that with tao.setVariableBounds(...)? </div>
<div><br>
</div>
<div>It seems right now I can only do tao.setVariableBounds(lb_vec,ub_vec), and from inspection of the python source code, it seems I have to specify both?</div>
</div>
</blockquote>
<div><br>
</div>
</span>
<div>Can you jsut give None?</div>
<div><br>
</div>
<div> Matt</div>
<div> </div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div>Thanks,</div>
<div>Justin</div>
</div>
<span><font color="#888888"></font></span></blockquote>
</div>
<span><font color="#888888"><br>
<br clear="all">
<div><br>
</div>
-- <br>
<div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
-- Norbert Wiener</div>
</font></span></div>
</div>
</blockquote>
</div>
<br>
</div>
</div></div></div>
</blockquote></div><br></div>