[petsc-users] ARKIMEX produces incorrect values

Ed Bueler elbueler at alaska.edu
Mon Aug 31 01:15:57 CDT 2020


>>> 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.

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?

Ed


On Sun, Aug 30, 2020 at 3:24 PM Barry Smith <bsmith at petsc.dev> wrote:

>
>
> > 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.
>
>

-- 
Ed Bueler
Dept of Mathematics and Statistics
University of Alaska Fairbanks
Fairbanks, AK 99775-6660
306C Chapman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20200830/e58473b6/attachment.html>


More information about the petsc-users mailing list