[petsc-users] Linear system solvers for unsymmetrical matrix

2017-12-24 Thread
Hello, I want to use PETSC to solve an unsymmetrical matrix. I find many linear system solvers in PETSC. But I don't know which one is suitable for the unsymmetrical matrix. I want to choose the best solver for my problem. Would you mind give me some alternative solvers for the unsymmetrical mat

[petsc-users] Choosing the best solvers for ISPH

2018-03-17 Thread
Hi, I use PETSC to solve the unsymmetrical matrix which is formed by the incompressible SPH method. Due to the scale of the problem is huge, I want to choose the best and the most efficient solver. I have checked the time-cost of the pre-conditioner PCGAMG together with the solvers like KSPCGS,

[petsc-users] How to turn off preconditioner in PETSC?

2018-03-21 Thread
Hi, I want to compare the time cost between preconditioner and unpreconditioner in PETSc. But I didn't know how to turn off the preconditioner in Petsc. If I choose the PCNONE, but the solution even can not converge. If I do not declare PC at the beginning of my program, will PETSc choose a defa

Re: [petsc-users] How to turn off preconditioner in PETSC?

2018-03-21 Thread
after preconditioned (e.g. PAx=Pb, and I want to get PA), is there a function in PETSc? Thanks again! Daye At 2018-03-21 18:45:18, "Matthew Knepley" wrote: On Wed, Mar 21, 2018 at 3:35 AM, 我 wrote: Hi, I want to compare the time cost between preconditioner and unpreconditioner in

Re: [petsc-users] How to turn off preconditioner in PETSC?

2018-03-21 Thread
Thank you very much for your consistent help! At 2018-03-21 20:12:58, "Matthew Knepley" wrote: On Wed, Mar 21, 2018 at 9:07 AM, 我 wrote: Thanks for your reply! You mean the preconditioner must be the necessary choice for the linear iterative method in PETSc? No. As you sa

[petsc-users] Obtain the precondioned matrix

2018-03-22 Thread
Hi all, I want to analyze the preconditioned matrix. But the KSPComputeExplicitOperator costs too much time to obtain the matrix. My origin matrix is about 3000*3000 sparse one. I noticed this function is applicable for the relative small system. What's the matrix-size limitation for this functi

Re: [petsc-users] Obtain the preconditioned matrix

2018-03-24 Thread
ou very much! Daye At 2018-03-23 07:41:26, "Matthew Knepley" wrote: On Thu, Mar 22, 2018 at 8:29 PM, 我 wrote: Hi all, I want to analyze the preconditioned matrix. But the KSPComputeExplicitOperator costs too much time to obtain the matrix. My origin matrix is about 3000*3000 spar

Re: [petsc-users] Obtain the preconditioned matrix

2018-03-24 Thread
26:34, "Matthew Knepley" wrote: On Sat, Mar 24, 2018 at 8:15 AM, 我 wrote: Hi Matt, Sorry to distribute you again. I still have trouble with KSPComputeExplicitOperator. I reduced the matrix size to around 1000*1000. The time-cost of this function is acceptable, but when I output the pr

Re: [petsc-users] Obtain the preconditioned matrix

2018-03-24 Thread
you very much! daye At 2018-03-24 19:58:57, "Matthew Knepley" wrote: On Sat, Mar 24, 2018 at 8:56 AM, 我 wrote: Hi Matt, I have tested my code with a really small matrix(10*10) just now and the preconditioned matrix is obtained. But for my case, the output is still equal

[petsc-users] Change the matrix row order

2018-04-10 Thread
Hello, I want to change the row order of a sparse matrix. Are there any build-in functions and suggestions? Thank you very much! Daye

Re: [petsc-users] Change the matrix row order

2018-04-13 Thread
need to do anything. > > The ordering of matrix rows corresponds to the ordering of the vectors; > almost always one partitions and orders the vectors based on the mesh that > underlies the problem and there is no reason to reorder once the layout is > initially determined. > >

[petsc-users] Petsc error: cannot chang local size of Amat after use old sizes 10 10 new sizes 11 11

2018-05-11 Thread
Hello all, I use the function MatCreateMPIAIJWithArrays to construct my matrix. But the number of local rows m and local columns n may change during the timestep advancing. When the local size changes, the error like "Petsc error: cannot chang local size of Amat after use old sizes 10 10 new si

Re: [petsc-users] Petsc error: cannot chang local size of Amat after use old sizes 10 10 new sizes 11 11

2018-05-12 Thread
"Matthew Knepley" wrote: On Fri, May 11, 2018 at 4:23 AM, 我 wrote: Hello all, I use the function MatCreateMPIAIJWithArrays to construct my matrix. But the number of local rows m and local columns n may change during the timestep advancing. When the local size changes, the error

[petsc-users] PETSC ERROR: Petsc has generated inconsistent data with PCGAMG and KSPGRMES

2019-07-09 Thread via petsc-users
Hello all, I set PCGAMG and KSPGRMES to solve the matrix which is formed by a particle method such as SPH. But when there is always a PETSC ERROR: [2]PETSC ERROR: - Error Message -- [2]PETSC ERROR: Petsc has generate

Re: [petsc-users] PETSC ERROR: Petsc has generated inconsistent data with PCGAMG and KSPGRMES

2019-07-11 Thread via petsc-users
an try to make it symmetric. > > >> [2]PETSC ERROR: Have un-symmetric graph (apparently). Use >> '-(null)pc_gamg_sym_graph true' to symetrize the graph or >> '-(null)pc_gamg_threshold -1' if the matrix is structurally symmetric. > > > >> On Jul 9,