<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Jan 15, 2016 at 6:15 PM, Bhalla, Amneet Pal S <span dir="ltr"><<a href="mailto:amneetb@live.unc.edu" target="_blank">amneetb@live.unc.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



<div style="word-wrap:break-word"><span class="">
<br>
<br>
<div>
<blockquote type="cite">
<div>On Jan 15, 2016, at 3:53 PM, Jed Brown <<a href="mailto:jed@jedbrown.org" target="_blank">jed@jedbrown.org</a>> wrote:</div>
<br>
<div><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">Do
 you need to create new objects versus merely resetting them?  I</span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">
<span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">suspect
 that calling KSPReset() between timesteps instead of creating a</span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">
<span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">new
 object and calling KSPSetFromOptions() will fix your performance</span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">
<span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">woes.</span></div>
</blockquote>
</div>
<br>
</span><div>We definitely need to destroy Mat associated with KSP everytime. This is a dynamic fluid-structure </div>
<div>interaction problem on AMR grid, where the Cartesian grid and the structure moves at every timestep. </div>
<div>Is it possible to reset a KSP with a different Mat? Are you suggesting to call KSPCreate() and </div>
<div>KSPSetFromOptions() only once at the beginning of simulation, KSPReset() after every timestep,</div>
<div>and KSPDestroy() at the end of the simulation? </div>
</div>

</blockquote></div><br>That is how KSPReset() is supposed to work, but no one is really exercising it now. I am inclined to try</div><div class="gmail_extra">Barry's experiment first, since this may have bugs that we have not yet discovered. However, Jed is</div><div class="gmail_extra">correct that this is probably the best design.</div><div class="gmail_extra"><br></div><div class="gmail_extra">  Matt<br clear="all"><div><br></div>-- <br><div class="gmail_signature">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>
</div></div>