You could add a https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/TS/TSMonitorSet... method, compute the time derived and decide how to declare converged. Then set converged ( https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/TS/TSSetConverg...) with TS_CONVERGED_USER That should cause TS to wrap up the solve and exit cleanly. Mark On Thu, Apr 29, 2021 at 3:27 PM Salazar De Troya, Miguel via petsc-users < [email protected]> wrote:
I am solving the signed distance equation
\frac{\partial \phi}{\partial t} + sign (\phi_{0})(|\nabla \phi| - 1) = 0
using a Local Discontinuous Galerkin (LDG) method as described in https://www.sciencedirect.com/science/article/pii/S0021999110005255
I am interested in solving it close to steady state. I was hoping I could measure how close to steady state the solution is by using the TSSetEventHandler infrastructure, but the handler does not have information on the time derivative. I looked at TSPSEUDO, but it forces me to use an implicit method, which I cannot provide because how the LDG method works (it calculates the fluxes solving additional equations). This makes me wonder if the LDG method is the best choice, so I am open to suggestions.
Given my current progress with the LDG approach, I am wondering if there is a way to solve to steady state using explicit algorithms such as Runge-Kutta.
Thanks
Miguel
Miguel A. Salazar de Troya
Postdoctoral Researcher, Lawrence Livermore National Laboratory
B141
Rm: 1085-5
Ph: 1(925) 422-6411