[petsc-users] ARKIMEX produces incorrect values
Barry Smith
bsmith at petsc.dev
Sun Aug 30 18:24:37 CDT 2020
> On Aug 30, 2020, at 6:04 PM, Jed Brown <jed at jedbrown.org> wrote:
>
> Ed Bueler <elbueler at alaska.edu> writes:
>
>> Darn, sorry.
>>
>> I realize the ARKIMEX page does say "Methods with an explicit stage can
>> only be used with ODE in which the stiff part G(t,X,Xdot) has the form Xdot
>> + Ghat(t,X)." So my example does not do that. Is there a way for
>> ARKIMEX to detect that dG/d(Xdot) = I?
>
> Other than sampling its action on vectors? Not really; it's user code.
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?
You could do this at the beginning of each TSSolve() for these picky methods in debug mode.
>
> 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.
More information about the petsc-users
mailing list