<div dir="ltr"><span class="gmail-im" style="color:rgb(80,0,80)">>>> I realize the ARKIMEX page does say "Methods with an explicit stage can<br>>>> only be used with ODE in which the stiff part G(t,X,Xdot) has the form Xdot<br>>>> + Ghat(t,X)." So my example does not do that. Is there a way for<br>>>> ARKIMEX to detect that dG/d(Xdot) = I?<br>><br>>> Other than sampling its action on vectors? Not really; it's user code.<br>><br></span> > Call TSComputeIFunction(TS ts,PetscReal t,Vec U,Vec Udot,Vec Y,PetscBool imex) with Udot all 1 and rhsfunction turned off. Call again with Udot is zero, take the difference. If it does not return all 1 then you know the user has provided an unacceptable function?<br>><br> > You could do this at the beginning of each TSSolve() for these picky methods in debug mode.<div><br></div><div>How about calling the IJacobian first with a=0 and then with a=1 and subtracting matrices, to see if the result is the identity?</div><div><br></div><div>Ed<br><div class="gmail-yj6qo gmail-ajU" style="outline:none;padding:10px 0px;width:22px;margin:2px 0px 0px"><br class="gmail-Apple-interchange-newline"></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Aug 30, 2020 at 3:24 PM Barry Smith <<a href="mailto:bsmith@petsc.dev">bsmith@petsc.dev</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
<br>
> On Aug 30, 2020, at 6:04 PM, Jed Brown <<a href="mailto:jed@jedbrown.org" target="_blank">jed@jedbrown.org</a>> wrote:<br>
> <br>
> Ed Bueler <<a href="mailto:elbueler@alaska.edu" target="_blank">elbueler@alaska.edu</a>> writes:<br>
> <br>
>> Darn, sorry.<br>
>> <br>
>> I realize the ARKIMEX page does say "Methods with an explicit stage can<br>
>> only be used with ODE in which the stiff part G(t,X,Xdot) has the form Xdot<br>
>> + Ghat(t,X)." So my example does not do that. Is there a way for<br>
>> ARKIMEX to detect that dG/d(Xdot) = I?<br>
> <br>
> Other than sampling its action on vectors? Not really; it's user code.<br>
<br>
Call TSComputeIFunction(TS ts,PetscReal t,Vec U,Vec Udot,Vec Y,PetscBool imex) with Udot all 1 and rhsfunction turned off. Call again with Udot is zero, take the difference. If it does not return all 1 then you know the user has provided an unacceptable function?<br>
<br>
You could do this at the beginning of each TSSolve() for these picky methods in debug mode.<br>
<br>
<br>
> <br>
> Emil, per our thread the other day, here is an example of "misuse" by a very experienced user. We need a better way to detect or provide feedback to users.<br>
<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>Ed Bueler<br>Dept of Mathematics and Statistics<br>University of Alaska Fairbanks<br>Fairbanks, AK 99775-6660<br>306C Chapman<br></div></div></div></div></div></div></div>