Re: [petsc-users] how to reuse Mumps factorization

2022-10-19 Thread 袁煕
Got it. Thanks for your detailed explanation. YUAN 2022年10月19日(水) 23:58 Barry Smith : > >Every time a matrix entry gets changes PETSc tracks these changes so > for the next KSP by default solve it repeats the numerical factorization if > the matrix has changed. Otherwise it reuses the

Re: [petsc-users] Trouble with ISEmbed

2022-10-19 Thread Pierre Jolivet
Sorry, I’m not very proficient in petsc4py, and there are a bunch of interfaces missing, e.g., ISShift(), so it may not be optimal, but I hope you’ll understand.First, you’ll need to regenerate the .bin by uncommenting the proper part of the code.That is because you were initially generating a

Re: [petsc-users] Some questions about KSP type and PC type selection

2022-10-19 Thread Matthew Knepley
On Wed, Oct 19, 2022 at 1:04 PM Jackie Chan wrote: > Dear All, > > I hope you're having a nice day. > In finite element problems, the stiffness matrix and load vector are > constructed to calculate the displacement vector using DMCreateMatrix and > DMCreateGlobalVector, respectively.

[petsc-users] Some questions about KSP type and PC type selection

2022-10-19 Thread Jackie Chan
Dear All, I hope you're having a nice day. In finite element problems, the stiffness matrix and load vector are constructed to calculate the displacement vector using DMCreateMatrix and DMCreateGlobalVector, respectively. For some reason, I need to make sure that the displacements

Re: [petsc-users] Trouble with ISEmbed

2022-10-19 Thread Pierre Jolivet
> On 19 Oct 2022, at 4:32 PM, TARDIEU Nicolas wrote: > > Dear Pierre, > > Thank you very much for your answer. I have the same explanation as you for > the code I sent. > But what I would like to do is the following : I have the full matrix A with > fields u, p and t (which are interlaced

Re: [petsc-users] how to reuse Mumps factorization

2022-10-19 Thread Barry Smith
Every time a matrix entry gets changes PETSc tracks these changes so for the next KSP by default solve it repeats the numerical factorization if the matrix has changed. Otherwise it reuses the still current factorization. If you are calling KSP directly, you can call

Re: [petsc-users] Trouble with ISEmbed

2022-10-19 Thread TARDIEU Nicolas via petsc-users
Dear Pierre, Thank you very much for your answer. I have the same explanation as you for the code I sent. But what I would like to do is the following : I have the full matrix A with fields u, p and t (which are interlaced in the real application). I want to extract B=A(u+p, u+p). *Then* I

Re: [petsc-users] Question about Sequential & Parallel part

2022-10-19 Thread Matthew Knepley
On Wed, Oct 19, 2022 at 9:26 AM 김성익 wrote: > Dear PETSc users, > > > I have a question about structure of programming. > > My blueprint of Finite Element programming with PETSc solver is below. > [image: image.png] > The blue box is whole loop for my FE program. > There is a loop B that performs

[petsc-users] Question about Sequential & Parallel part

2022-10-19 Thread 김성익
Dear PETSc users, I have a question about structure of programming. My blueprint of Finite Element programming with PETSc solver is below. [image: image.png] The blue box is whole loop for my FE program. There is a loop B that performs a convergence iteration (KU=F) inside the loop A in which

Re: [petsc-users] how to reuse Mumps factorization

2022-10-19 Thread Matthew Knepley
On Wed, Oct 19, 2022 at 9:13 AM 袁煕 wrote: > Hello, > > I am using Mumps to solve a problem with multiple time steps. The matrix > structure does not change but its value may or may not change during > those steps. That means I should reuse the symbolic factorization but > recall numeric

[petsc-users] how to reuse Mumps factorization

2022-10-19 Thread 袁煕
Hello, I am using Mumps to solve a problem with multiple time steps. The matrix structure does not change but its value may or may not change during those steps. That means I should reuse the symbolic factorization but recall numeric factorization when needed. I have found the following anwser

Re: [petsc-users] Trouble with ISEmbed

2022-10-19 Thread Pierre Jolivet
On two processes, you have a different distribution for u and u+p. IS Object: 2 MPI processes type: general [0] Number of indices in set 5 [0] 0 0 [0] 1 1 [0] 2 2 [0] 3 3 [0] 4 4 [1] Number of indices in set 5 [1] 0 5 [1] 1 6 [1] 2 7 [1] 3 8 [1] 4 9 IS Object: 2 MPI processes type: general [0]

[petsc-users] Trouble with ISEmbed

2022-10-19 Thread TARDIEU Nicolas via petsc-users
Dear PETSc Team, I am trying to use IS embeding in parallel. In order to (try to) understand how it works, I have built a simple example, attached to this email. I consider a 20X20 matrix. The dof (u, p, t) in global numbering are the following : u: 0..9 p: 10..14 t: 15..19 I have

[petsc-users] An issue of Interior-Point Methods in TAO

2022-10-19 Thread 赵刚
Dear PETSc/TAO team, I am using an interior-point method in TAO to solve a quadratic programming problem with bound constraints. I noticed that TAO includes three interior-point methods, they are Mehrotra Predictor-Corrector Method (bqpip), Primal-Dual Interior-Point Method (pdipm) and "ipm",