On Wed, Nov 19, 2025 at 2:03 AM Blauth, Sebastian < [email protected]> wrote:
> Dear Matt, > > thanks for the clarification. Yes, that makes sense. Basically, I use two > approaches for defining the splits in my code, see > https://urldefense.us/v3/__https://github.com/sblauth/cashocs/blob/46c0d91467d03a4906b7bde29727b45d4bb0d6d2/cashocs/_utils/linalg.py*L245-L287__;Iw!!G_uCfscf7eWS!Z3vaW6mH3kTXdhSyLFZ2XcUc1E6hcY4dtjtLWLAzcg4Pj_S8issujZ0Khj24yL9Bb5KfynJ0mj5vygrOWHgH$ > > I think the first one, where the IS is defined, then does exactly what I > thought it would do. In the second approach, which I need for nested > fieldsplits, I use a DMShell with a Section defined analogously - so I > guess the same applies here. > Okay. > Well, yes I could just reorder the DoFs for the creation of the > submatrices - but I usually don't need these sub-functionspaces and would > not want to create them every time. I thought of using MatPermute ( > https://urldefense.us/v3/__https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html*petsc4py.PETSc.Mat.permute__;Iw!!G_uCfscf7eWS!Z3vaW6mH3kTXdhSyLFZ2XcUc1E6hcY4dtjtLWLAzcg4Pj_S8issujZ0Khj24yL9Bb5KfynJ0mj5vyiWtyehi$ > ) > with the permutation I get from FEniCS - or is there any reason not to do > so? > That is more memory movement. I am not understanding why you would not just permute the input defining the nested FS. > And thank you very much for the reference. Yes, I am aware of the paper > you sent. However I think the function spaces involved in the method make > it more or less infeasible for me - usually using Taylor-Hood elements is > already very expensive. I usually use a stabilized P1-P1 discretization or > try to get the linear Crouzeix–Raviart with elementwise constant pressure > working (for slow flows, this works okay, but as I go to higher Reynolds > numbers, things become more problematic). > Oh, yes those spaces are crazy, but not necessary. In https://urldefense.us/v3/__https://arxiv.org/pdf/2107.00820__;!!G_uCfscf7eWS!Z3vaW6mH3kTXdhSyLFZ2XcUc1E6hcY4dtjtLWLAzcg4Pj_S8issujZ0Khj24yL9Bb5KfynJ0mj5vysoKtJkS$ , on page 9, you can see that they are able to prove the kernel decomposition property for simple Taylor-Hood. > And regarding your question on which operators I am planning to assemble > on the pressure space: Basically the pressure mass matrix, pressure > convection-diffusion matrix and a pressure Laplacian. > > If you have any tips for solving the incompressible Navier Stokes > equations (steady state) at higher Reynolds numbers I certainly welcome > them. I can also go a bit more into detail of what kind of solution > approach I am using - if that is appropriate here. > I think that the Augmented Lagrangian strategy from the Stadler paper is currently the best option I know of. Thanks, Matt > Thanks a lot and best regards, > Sebastian > > > -- > Dr. Sebastian Blauth > Fraunhofer-Institut für > Techno- und Wirtschaftsmathematik ITWM > Abteilung Transportvorgänge > Fraunhofer-Platz 1, 67663 Kaiserslautern > Telefon: +49 631 31600-4968 > [email protected] > https://urldefense.us/v3/__https://www.itwm.fraunhofer.de__;!!G_uCfscf7eWS!Z3vaW6mH3kTXdhSyLFZ2XcUc1E6hcY4dtjtLWLAzcg4Pj_S8issujZ0Khj24yL9Bb5KfynJ0mj5vyu_13JIA$ > > > > -----Original Message----- > > From: Matthew Knepley <[email protected]> > > Sent: Tuesday, November 18, 2025 5:23 PM > > To: Blauth, Sebastian <[email protected]> > > Cc: PETSc users list <[email protected]> > > Subject: Re: [petsc-users] Ordering of DoFs in submatrices with > PCFieldsplit > > > > On Tue, Nov 18, 2025 at 11:12 AM Blauth, Sebastian > > <[email protected] > > <mailto:[email protected]> > wrote: > > > > Dear PETSc developers and users, > > > > > > > > I have a question regarding the Fieldsplit preconditioner in > PETSc. In > > particular, I want to know how the submatrices there are created from > the parent > > matrix. The “obvious” way would be to take the DoF indices of the > corresponding > > split and “renumber” them so that the DoFs in the submatrix have the > same order > > as the ones of the parent matrix. I did not find any documentation on > this and as > > it is at least possible that the DoFs are re-ordered, I wanted to ask > this question. > > Obviously, in case the DoFs are re-ordered, how can I get the mapping > between > > the DoFs of the parent and the submatrix? > > > > > > Hi Sebastian, > > > > Inside, we call MatCreateSubmatrix(), which takes an IS on each process, > and > > selects those global rows, in the order in which they appear in the IS, > into a new > > parallel matrix. PCFieldsplitSetIS() can be used to specify those IS, so > you can > > control the reordering. Does that make sense? > > > > > > The thing I am wanting to work on is implementing a pressure > convection > > diffusion preconditioner with FEniCS for the incompressible Navier-Stokes > > equations. > > > > The parent matrix is assembled via a mixed FEM and then I use > PETSc to > > solve the system. I want to assemble the corresponding operators on the > pressure > > space from a collapsed (i.e. sub-space of the mixed FEM) function space. > > However, FEniCS re-orders the DoFs there, but I can get a mapping > between the > > DoFs so this should not be problematic. However, I am not sure if PETSc > also does > > a re-ordering. > > > > > > You can just create an IS with that reordering. What operator are you > planning on > > assembling on the pressure space? Have you seen > > https://urldefense.us/v3/__https://arxiv.org/abs/1810.03315?__;!!G_uCfscf7eWS!Z3vaW6mH3kTXdhSyLFZ2XcUc1E6hcY4dtjtLWLAzcg4Pj_S8issujZ0Khj24yL9Bb5KfynJ0mj5vyv_7q3wU$ > > > > > > Thanks, > > > > Matt > > > > > > Thanks a lot in advance and best regards, > > > > Sebastian > > > > > > > > -- > > > > Dr. Sebastian Blauth > > > > Fraunhofer-Institut für > > > > Techno- und Wirtschaftsmathematik ITWM > > > > Abteilung Transportvorgänge > > > > Fraunhofer-Platz 1, 67663 Kaiserslautern > > > > Telefon: +49 631 31600-4968 > > > > [email protected] > > <mailto:[email protected]> > > > > > > https://urldefense.us/v3/__https://www.itwm.fraunhofer.de__;!!G_uCfscf7eWS!Z3vaW6mH3kTXdhSyLFZ2XcUc1E6hcY4dtjtLWLAzcg4Pj_S8issujZ0Khj24yL9Bb5KfynJ0mj5vyu_13JIA$ > > > > < > https://urldefense.us/v3/__https://www.itwm.fraunhofer.de/__;!!G_uCfscf7eW > > S!f_qaoCRxX3prMgl6ev5fvSFQegVfZo84xW9eJTz7uYmLjZiyJFIlm1tlqYrM3LqjOpkE > > oMrIJZo6J63-23-atPBnJn4et_4R-UvZoWlBpHM$> > > > > > > > > > > > > -- > > > > 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!Z3vaW6mH3kTXdhSyLFZ2XcUc1E6hcY4dtjtLWLAzcg4Pj_S8issujZ0Khj24yL9Bb5KfynJ0mj5vypAp6Vm8$ > > > > <https://urldefense.us/v3/__http://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!Z3vaW6mH3kTXdhSyLFZ2XcUc1E6hcY4dtjtLWLAzcg4Pj_S8issujZ0Khj24yL9Bb5KfynJ0mj5vymdmkq01$ > > > > > -- 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!Z3vaW6mH3kTXdhSyLFZ2XcUc1E6hcY4dtjtLWLAzcg4Pj_S8issujZ0Khj24yL9Bb5KfynJ0mj5vypAp6Vm8$ <https://urldefense.us/v3/__http://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!Z3vaW6mH3kTXdhSyLFZ2XcUc1E6hcY4dtjtLWLAzcg4Pj_S8issujZ0Khj24yL9Bb5KfynJ0mj5vymdmkq01$ >
