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

Matthew Knepley knepley at gmail.com
Wed May 6 09:54:10 CDT 2020


On Wed, May 6, 2020 at 10:25 AM Yingjie Wu <yjwu16 at gmail.com> wrote:

> Hi,
>
> I think my residual functions are piecewise but discontinuous functions.
>
> Although the residual function is discontinuous, there is little
> difference between the residuals in different segments at the piecewise
> point. This is the first time I have encountered such a problem, as I
> described before, I solve the two-phase problem of water, which involves
> the disappearance and generation of phases, so the conservation equation is
> piecewised. I looked at some of the papers about the piecewise residual
> function in Newton method, which refers to the peiecewise smooth function,
> I do not really understand the different treatment in Newton method between
> the two kinds of functions.
>
>
> Thank you very much for your reply, I know little about this field and
> hope to get some suggestions.
>

I have no idea what to do for discontinuous functions. The value near the
discontinuity is not even computable, since within error you cannot tell
which side of the jump you might be on.

  Thanks,

    Matt


> Thanks,
>
> Yingjie
>
> Matthew Knepley <knepley at gmail.com> 于2020年5月6日周三 下午6:38写道:
>
>> 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/>
>>
>

-- 
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/cedb728b/attachment-0001.html>


More information about the petsc-users mailing list