[petsc-users] Treatment of piecewise residual function in SNES

Matthew Knepley knepley at gmail.com
Wed May 6 05:38:35 CDT 2020


Do you mean a piecewise smooth function, with a discontinuous derivative,
or a piecewise function which is itself discontinuous?

  Thanks,

     Matt

On Tue, May 5, 2020 at 11:05 PM Yingjie Wu <yjwu16 at gmail.com> wrote:

> Dear PETSc developers
> Hi,
>
> I have been using SNES to solve a nonlinear problem recently, but this
> nonlinear problem is different from the ordinary problem, in which its
> residual function is a piecewise function. I have the following questions
> during calculation:
>
>
>    1. As I am not very familiar with the jacobian matrix construction of
>    this piecewise function, I used the - snes_fd. However, the result is not
>    converged in process of calculation. I don't know if it's the piecewise
>    function problem or other errors.
>    2. For this piecewise function problem, it is actually determination
>    of the residual function according to the current solution vector. Should I
>    determine the piecewise function before each Newton step begins, or add
>    judgment directly to the evaluation function to form the piecewise
>    function? Now I'm adding judgment directly to the evaluation function to
>    form a piecewise function.
>    3. Are there some special treatment for piecewise residual functions
>    in the SNES?
>
> I'm dealing with a water two-phase flow problem, which is difficult to
> describe in detail because the model is relatively complex. For the first
> time I have encountered this problem and hope to get some advice or
> information.
>
>
> Thanks,
>
> Yingjie
>


-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener

https://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20200506/f2f4924f/attachment.html>


More information about the petsc-users mailing list