Re: [petsc-users] Issue updating MUMPS ictnl after failed solve

2016-09-19 Thread Hong
David : I did following: PC pc; Mat F; ierr = KSPGetPC(ksp,);CHKERRQ(ierr); ierr = PCReset(pc);CHKERRQ(ierr); ierr = KSPSetOperators(ksp,A,A);CHKERRQ(ierr); ierr = PCSetType(pc,PCCHOLESKY);CHKERRQ(ierr); ierr =

Re: [petsc-users] Issue updating MUMPS ictnl after failed solve

2016-09-19 Thread David Knezevic
On Mon, Sep 19, 2016 at 9:45 PM, Fande Kong wrote: > Placing PCReset(PC pc) before the second kspsolve might works. > > Fande Kong, > > On Mon, Sep 19, 2016 at 7:38 PM, murat keçeli wrote: > >> Another guess: maybe you also need KSPSetUp(ksp); before the

Re: [petsc-users] Issue updating MUMPS ictnl after failed solve

2016-09-19 Thread Fande Kong
Placing PCReset(PC pc) before the second kspsolve might works. Fande Kong, On Mon, Sep 19, 2016 at 7:38 PM, murat keçeli wrote: > Another guess: maybe you also need KSPSetUp(ksp); before the second > KSPSolve(ksp,b,x);. > > Murat Keceli > ​ > > On Mon, Sep 19, 2016 at 8:33

Re: [petsc-users] Issue updating MUMPS ictnl after failed solve

2016-09-19 Thread murat keçeli
Another guess: maybe you also need KSPSetUp(ksp); before the second KSPSolve(ksp,b,x);. Murat Keceli ​ On Mon, Sep 19, 2016 at 8:33 PM, David Knezevic wrote: > On Mon, Sep 19, 2016 at 7:26 PM, Dave May wrote: > >> >> >> On 19 September 2016

Re: [petsc-users] Issue updating MUMPS ictnl after failed solve

2016-09-19 Thread David Knezevic
On Mon, Sep 19, 2016 at 7:26 PM, Dave May wrote: > > > On 19 September 2016 at 21:05, David Knezevic > wrote: > >> When I use MUMPS via PETSc, one issue is that it can sometimes fail with >> MUMPS error -9, which means that MUMPS didn't

Re: [petsc-users] Issue updating MUMPS ictnl after failed solve

2016-09-19 Thread Dave May
On 19 September 2016 at 21:05, David Knezevic wrote: > When I use MUMPS via PETSc, one issue is that it can sometimes fail with > MUMPS error -9, which means that MUMPS didn't allocate a big enough > workspace. This can typically be fixed by increasing MUMPS icntl 14,

Re: [petsc-users] Issue updating MUMPS ictnl after failed solve

2016-09-19 Thread Hong
David : I'll check it ... Hong When I use MUMPS via PETSc, one issue is that it can sometimes fail with > MUMPS error -9, which means that MUMPS didn't allocate a big enough > workspace. This can typically be fixed by increasing MUMPS icntl 14, e.g. > via the command line option

Re: [petsc-users] Example for MatInvertBlockDiagonal

2016-09-19 Thread Barry Smith
> On Sep 19, 2016, at 2:21 PM, Cyrill Vonplanta > wrote: > > >> block size > 1 really only makes sense if the block size is really greater >> than one. So if A has blocks of size 3 you should create A as BAIJ and thus >> never need to call the convert routine. >

Re: [petsc-users] Example for MatInvertBlockDiagonal

2016-09-19 Thread Cyrill Vonplanta
> block size > 1 really only makes sense if the block size is really greater > than one. So if A has blocks of size 3 you should create A as BAIJ and thus > never need to call the convert routine. Unfortunately A is not created by my part of the program and comes with blocksize 1. > >

Re: [petsc-users] Question about PETScSF usage in DMNetwork/DMPlex

2016-09-19 Thread Adrian Maldonado
Ok, got it! Thanks On Mon, Sep 19, 2016 at 6:25 AM, Matthew Knepley wrote: > On Fri, Sep 16, 2016 at 11:36 AM, Adrian Maldonado > wrote: > >> Hi, >> >> I am trying to understand some of the data structures DMPlex/DMNetwork >> creates and the

[petsc-users] Issue updating MUMPS ictnl after failed solve

2016-09-19 Thread David Knezevic
When I use MUMPS via PETSc, one issue is that it can sometimes fail with MUMPS error -9, which means that MUMPS didn't allocate a big enough workspace. This can typically be fixed by increasing MUMPS icntl 14, e.g. via the command line option -mat_mumps_icntl_14. However, instead of having to run

Re: [petsc-users] Example for MatInvertBlockDiagonal

2016-09-19 Thread Barry Smith
> On Sep 19, 2016, at 10:43 AM, Cyrill Vonplanta > wrote: > > Barry, > > Thanks a lot. I’d like to use this for a nonlinear variant of a > block-gauss-seidel smoother. I would like to use MatInvertBlockDiagonal for > speeding up my variant. > > I think I can work

Re: [petsc-users] Example for MatInvertBlockDiagonal

2016-09-19 Thread Cyrill Vonplanta
Barry, Thanks a lot. I’d like to use this for a nonlinear variant of a block-gauss-seidel smoother. I would like to use MatInvertBlockDiagonal for speeding up my variant. I think I can work with this, however I also have the problem to turn my initial matrix into one with a blocksize of

Re: [petsc-users] Example for MatInvertBlockDiagonal

2016-09-19 Thread Barry Smith
Cyrill, This is very specialized for implementing point block Jacobi; I don't think it is something you would want to use directly. If you do want to use it, it simply returns the inverses of the block diagonals in column major form. You can then call MatSetValues() with with each

Re: [petsc-users] Does Petsc support matrix diagonalization

2016-09-19 Thread Hong
丁老师: > Dear friends: > I want to diagonalize matrix D: > D=PAP^(-1). > where A is the diagonal matrix , P is the transformation matrix. > Does Petsc has this routine to perform this task. > This is an eigenvalu/singular value decomposition of D. For dense D, you

Re: [petsc-users] Does Petsc support matrix diagonalization

2016-09-19 Thread Matthew Knepley
On Mon, Sep 19, 2016 at 7:15 AM, 丁老师 wrote: > Dear friends: > I want to diagonalize matrix D: > D=PAP^(-1). > where A is the diagonal matrix , P is the transformation matrix. > Does Petsc has this routine to perform this task. > No, you should

[petsc-users] Does Petsc support matrix diagonalization

2016-09-19 Thread 丁老师
Dear friends: I want to diagonalize matrix D: D=PAP^(-1). where A is the diagonal matrix , P is the transformation matrix. Does Petsc has this routine to perform this task. Regards

Re: [petsc-users] Question about PETScSF usage in DMNetwork/DMPlex

2016-09-19 Thread Matthew Knepley
On Fri, Sep 16, 2016 at 11:36 AM, Adrian Maldonado wrote: > Hi, > > I am trying to understand some of the data structures DMPlex/DMNetwork > creates and the relationship among them. > > As an example, I have an small test circuit (/src/ksp/ksp/examples/ >

Re: [petsc-users] Question about PETScSF usage in DMNetwork/DMPlex

2016-09-19 Thread Matthew Knepley
On Fri, Sep 16, 2016 at 12:54 PM, Adrian Maldonado wrote: > Just one addition about one thing I've noticed. > > The section: > > PetscSection Object: 2 MPI processes > type not yet set > Process 0: > ( 0) dim 1 offset 0 > ( 1) dim 1 offset 1 > ( 2) dim

[petsc-users] Example for MatInvertBlockDiagonal

2016-09-19 Thread Cyrill Vonplanta
Dear PETSc-Users, I would like to use the inverted block diagonals of a a matrix. I have seen the function MatInvertBlockDiagonal() but I don’t know how to create a matrix out of them or an array of block matrizes. Does anyone have an example on how to use **values to create a PETSc matrix?