Are there other alternative methods that might be easier to implement? Miguel
On Mon, Jul 8, 2024 at 1:43 PM Matthew Knepley <knep...@gmail.com> wrote: > On Mon, Jul 8, 2024 at 6:14 AM Miguel Angel Salazar de Troya < > miguel.sala...@corintis.com> wrote: > >> Thanks Adam and Matt, >> >> Matt, can I get away with just using PCFIELDSPLIT? Or do I need the >> SNESFIELDSPLIT? Though it looks like the block Gauss-Seidel is only >> implemented in serial ( >> https://urldefense.us/v3/__https://petsc.org/main/manual/ksp/*block-jacobi-and-overlapping-additive-schwarz-preconditioners__;Iw!!G_uCfscf7eWS!bSoUE_2lViJzEHKf5CEFph-9dqm5ZtOB6QjWVEk4zIyGBukbkcoEGiVzHu84pF637kvsxFyFQoUPYjIUFM5eZZ51NH3TTKGi$ >> >> ) >> > > You can do what you want for the linear problem, but that will probably > not help. The best thing I know of for this kind of nonlinear coupling is > now called primal-dual Newton, a name which I am not wild about. It is > discussed here > (https://urldefense.us/v3/__https://core.ac.uk/download/pdf/211337815.pdf__;!!G_uCfscf7eWS!bSoUE_2lViJzEHKf5CEFph-9dqm5ZtOB6QjWVEk4zIyGBukbkcoEGiVzHu84pF637kvsxFyFQoUPYjIUFM5eZZ51NFSFi9w1$ > ) and > originated in reference [33] from that thesis. My aim was to allow these > kinds of solvers with that branch. > > >> On a more theoretical note, I have the impression that the convergence >> failures of the Newton-Raphson method for this kind of problem is >> ultimately due to a lack of a diagonally dominant Jacobian. I have not >> found any reference so I might be wrong. >> > > I would say that the dominant direction for momentum hides the direction > for improvement of the coefficient. > > Thanks, > > Matt > > >> Best, >> Miguel >> >> On Sat, Jul 6, 2024 at 3:33 PM Matthew Knepley <knep...@gmail.com> wrote: >> >>> On Fri, Jul 5, 2024 at 3:29 AM Miguel Angel Salazar de Troya < >>> miguel.sala...@corintis.com> wrote: >>> >>>> Hello, I have the Navier-Stokes equation coupled with a >>>> convection-diffusion equation for the temperature. It is a two-way coupling >>>> because the viscosity depends on the temperature. One way to solve this is >>>> with some kind of fixed point iteration >>>> ZjQcmQRYFpfptBannerStart >>>> This Message Is From an External Sender >>>> This message came from outside your organization. >>>> >>>> ZjQcmQRYFpfptBannerEnd >>>> Hello, >>>> >>>> I have the Navier-Stokes equation coupled with a convection-diffusion >>>> equation for the temperature. It is a two-way coupling because the >>>> viscosity depends on the temperature. One way to solve this is with some >>>> kind of fixed point iteration scheme, where I solve each equation >>>> separately in a loop until I see convergence. I am aware this is not >>>> possible directly at the SNES level. Is there something that one can do >>>> using PCFIELDSPLIT? I would like to assemble my fully coupled system and >>>> play with the solver options to get some kind of fixed-point iteration >>>> scheme. I would like to avoid having to build two separate SNES solvers, >>>> one per equation. Any reference on techniques to solve this type of coupled >>>> system is welcome. >>>> >>> >>> Hi Miguel, >>> >>> I have a branch >>> >>> >>> https://urldefense.us/v3/__https://gitlab.com/petsc/petsc/-/tree/knepley/feature-snes-fieldsplit?ref_type=heads__;!!G_uCfscf7eWS!bSoUE_2lViJzEHKf5CEFph-9dqm5ZtOB6QjWVEk4zIyGBukbkcoEGiVzHu84pF637kvsxFyFQoUPYjIUFM5eZZ51NA5DeA9R$ >>> >>> >>> that will allow you to do exactly what you want to do. However, there >>> are caveats. In order to have SNES do this, it needs a way to selectively >>> reassemble subproblems. I assume you are using Firedrake, so this will >>> not work. I would definitely be willing to work with those guys to get >>> this going, introducing callbacks, just as we did on the FieldSplit case. >>> >>> Thanks, >>> >>> Matt >>> >>> >>>> Best, >>>> Miguel >>>> >>> >>> >>> -- >>> 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://urldefense.us/v3/__https://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!bSoUE_2lViJzEHKf5CEFph-9dqm5ZtOB6QjWVEk4zIyGBukbkcoEGiVzHu84pF637kvsxFyFQoUPYjIUFM5eZZ51NBJa7cKb$ >>> >>> <https://urldefense.us/v3/__http://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!bSoUE_2lViJzEHKf5CEFph-9dqm5ZtOB6QjWVEk4zIyGBukbkcoEGiVzHu84pF637kvsxFyFQoUPYjIUFM5eZZ51NMU5f6M8$ >>> > >>> >> > > -- > 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://urldefense.us/v3/__https://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!bSoUE_2lViJzEHKf5CEFph-9dqm5ZtOB6QjWVEk4zIyGBukbkcoEGiVzHu84pF637kvsxFyFQoUPYjIUFM5eZZ51NBJa7cKb$ > > <https://urldefense.us/v3/__http://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!bSoUE_2lViJzEHKf5CEFph-9dqm5ZtOB6QjWVEk4zIyGBukbkcoEGiVzHu84pF637kvsxFyFQoUPYjIUFM5eZZ51NMU5f6M8$ > > >