Re: [petsc-dev] coarse grid in gamg (for the OPTE paper)

2013-09-17 Thread Barry Smith
Forwarding this to people who might have a clue. On Sep 17, 2013, at 5:09 PM, Jungho Lee wrote: > I'm looking into the 6*6 grid case, with dof=3, so the system matrix size is > 108*108. > > 1) It turns out that using > > -pc_type gamg -pc_gamg_type agg > > results in two levels with the

Re: [petsc-dev] coarse grid in gamg (for the OPTE paper)

2013-09-18 Thread Jed Brown
Barry Smith writes: > Forwarding this to people who might have a clue. > > On Sep 17, 2013, at 5:09 PM, Jungho Lee wrote: > >> I'm looking into the 6*6 grid case, with dof=3, so the system matrix size is >> 108*108. >> >> 1) It turns out that using >> >> -pc_type gamg -pc_gamg_type agg >>

Re: [petsc-dev] coarse grid in gamg (for the OPTE paper)

2013-09-18 Thread Mark F. Adams
>>> >>> results in two levels with the coarse problem being 13*13. Wouldn't >>> it be natural for the coarse problem to be of size that's an integer >>> multiple of 3, though? Yes, something is wrong here. And as Jed said if you have different Mats for the operator and preconditioner the you ha

Re: [petsc-dev] coarse grid in gamg (for the OPTE paper)

2013-09-19 Thread Jungho Lee
To fill others in on the situation here; this was regarding a variational inequality example, that uses reduced space method for which routines are defined in src/snes/impls/vi/rs/virs.c. When MatGetSubMatrix was called to extract rows and columns of the original matrix corresponding to the "inact

Re: [petsc-dev] coarse grid in gamg (for the OPTE paper)

2013-09-19 Thread Dmitry Karpeyev
On Thu, Sep 19, 2013 at 1:28 PM, Jungho Lee wrote: > To fill others in on the situation here; this was regarding a variational > inequality example, that uses reduced space method for which routines are > defined in src/snes/impls/vi/rs/virs.c. When MatGetSubMatrix was called to > extract rows a

Re: [petsc-dev] coarse grid in gamg (for the OPTE paper)

2013-09-19 Thread Barry Smith
On Sep 19, 2013, at 3:17 PM, Dmitry Karpeyev wrote: > > > > On Thu, Sep 19, 2013 at 1:28 PM, Jungho Lee wrote: > To fill others in on the situation here; this was regarding a variational > inequality example, that uses reduced space method for which routines are > defined in src/snes/impls

Re: [petsc-dev] coarse grid in gamg (for the OPTE paper)

2013-09-19 Thread Jed Brown
Barry Smith writes: >That is what it is doing and apparently it doesn't result in a good >preconditioner; I don't know why off hand. One thing is it no >longer knows about the block structure. How is the near null space being specified? pgpnJypvyI__v.pgp Description: PGP signature

Re: [petsc-dev] coarse grid in gamg (for the OPTE paper)

2013-09-19 Thread Mark F. Adams
On Sep 19, 2013, at 3:53 PM, Barry Smith wrote: > > It is essentially 3 Laplacians If you mean literally 3 scalar laplacians packed in one matrix for some reason then the one constant vector is fine. Is this a block diagonal matrix with 3 big blocks, if you order it correctly of course?

Re: [petsc-dev] coarse grid in gamg (for the OPTE paper)

2013-09-19 Thread Barry Smith
It is essentially 3 Laplacians so I think the default null space of 3 constant vectors is fine. The problem is without the block information presumably GAMG is using only a single constant vector over all variables? So maybe we need to construct a 3 vector null space which just marks in the

Re: [petsc-dev] coarse grid in gamg (for the OPTE paper)

2013-09-19 Thread Jed Brown
Barry Smith writes: >It is essentially 3 Laplacians so I think the default null space of >3 constant vectors is fine. The problem is without the block >information presumably GAMG is using only a single constant vector >over all variables? So maybe we need to construct a 3 vector

Re: [petsc-dev] coarse grid in gamg (for the OPTE paper)

2013-09-19 Thread Dmitry Karpeyev
On Thu, Sep 19, 2013 at 2:53 PM, Barry Smith wrote: > >It is essentially 3 Laplacians so I think the default null space of 3 > constant vectors is fine. The problem is without the block information > presumably GAMG is using only a single constant vector over all variables? > So maybe we nee

Re: [petsc-dev] coarse grid in gamg (for the OPTE paper)

2013-09-19 Thread Barry Smith
On Sep 19, 2013, at 4:28 PM, "Mark F. Adams" wrote: > > On Sep 19, 2013, at 3:53 PM, Barry Smith wrote: > >> >> It is essentially 3 Laplacians > > If you mean literally 3 scalar laplacians packed in one matrix for some > reason then the one constant vector is fine. Really, but (for p

Re: [petsc-dev] coarse grid in gamg (for the OPTE paper)

2013-09-19 Thread Jed Brown
Barry Smith writes: >> If you mean literally 3 scalar laplacians packed in one matrix for >> some reason then the one constant vector is fine. > > Really, but (for periodic or N. bc) the null space has three > vectors, you don't need all of them in your near null space? If the three scalar La

Re: [petsc-dev] coarse grid in gamg (for the OPTE paper)

2013-09-19 Thread Mark F. Adams
On Sep 19, 2013, at 7:05 PM, Barry Smith wrote: > > On Sep 19, 2013, at 4:28 PM, "Mark F. Adams" wrote: > >> >> On Sep 19, 2013, at 3:53 PM, Barry Smith wrote: >> >>> >>> It is essentially 3 Laplacians >> >> If you mean literally 3 scalar laplacians packed in one matrix for some >> reas

Re: [petsc-dev] coarse grid in gamg (for the OPTE paper)

2013-09-20 Thread Barry Smith
After talking to Mark I think this will not work. Without a block size GAMG will not do a good job aggregating the graph. Mark suggested leaving those rows and columns in the matrix zeroing its rows and columns (except the diagonal) instead then call GAMG with the block size of 3. B