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

Yingjie Wu yjwu16 at gmail.com
Tue May 5 22:04:27 CDT 2020


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20200506/f288ea17/attachment.html>


More information about the petsc-users mailing list