[petsc-users] About the interpolation and restriction matrix for cell-centered multigrid.

2020-03-23 Thread Xiaodong Liu
Hi, all, I want to confirm one thing about the interpolation and restrict matrix for the cell-centered multigrid. I am running ex32.c. The following is my understanding. For cell-centered multigrid, only DMDA_Q0 can be set as the interpolation type. For interpolation from the coarse mesh, the

Re: [petsc-users] Construct Matrix based on row and column values

2020-03-23 Thread Mark Adams
On Mon, Mar 23, 2020 at 10:18 AM Elias Karabelas wrote: > Ok I'll try to decipher that. Thought that I would maybe find something in > the GAMG routines > Not much, GAMG symmetrizes the graph (G) for coarse grid constriction, where G_ij must equal G_ji in parallel. G is a graph derived from A

Re: [petsc-users] Construct Matrix based on row and column values

2020-03-23 Thread Elias Karabelas
Yeah I'll let you know how it turns out, for the moment I'm aiming at scaler convection-diffusion equations for simulating the evolution of a tracer concentration in a fluid with a precalculated velocity field from a NS-Simulation. On 23/03/2020 15:53, Jed Brown wrote: Thanks; please don't

Re: [petsc-users] Construct Matrix based on row and column values

2020-03-23 Thread Jed Brown
Thanks; please don't drop the list. I'd be curious whether this operation is common enough that we should add it to PETSc. My hesitance has been that people may want many different variants when working with systems of equations, for example. Elias Karabelas writes: > Dear Jed, > > Yes the

Re: [petsc-users] Construct Matrix based on row and column values

2020-03-23 Thread Jed Brown
Elias Karabelas writes: > Dear Users, > > I want to implement a FCT (flux corrected transport) scheme with PETSc. > To this end I have amongst other things create a Matrix whose entries > are given by > > L_ij = -max(0, A_ij, A_ji) for i neq j > > L_ii = Sum_{j=0,..n, j neq i} L_ij > > where

Re: [petsc-users] Construct Matrix based on row and column values

2020-03-23 Thread Elias Karabelas
Ok I'll try to decipher that. Thought that I would maybe find something in the GAMG routines but I'll be happy to scroll through the ASM stuff :D On 23/03/2020 13:56, Matthew Knepley wrote: On Mon, Mar 23, 2020 at 8:41 AM Elias Karabelas mailto:karabelasel...@gmail.com>> wrote: Thanks

Re: [petsc-users] node DG with DMPlex

2020-03-23 Thread Matthew Knepley
On Wed, Mar 18, 2020 at 12:58 PM Yann Jobic wrote: > Hi matt, > > Le 3/17/2020 à 4:00 PM, Matthew Knepley a écrit : > > On Mon, Mar 16, 2020 at 5:20 PM Yann Jobic > > wrote: > > > > Hi all, > > > > I would like to implement a nodal DG with the DMPlex

Re: [petsc-users] Question about DMPLEX/P4EST with different Sections

2020-03-23 Thread Berend van Wachem
Dear Matt, It seems I judged to early. The solution works when the mesh is refined, and for multiple times refinement, but does not work for re-coarsening. I have created a working example where I show this, please find it attached. Starting from line 190, the forest is refined. A call to

Re: [petsc-users] Construct Matrix based on row and column values

2020-03-23 Thread Matthew Knepley
On Mon, Mar 23, 2020 at 8:41 AM Elias Karabelas wrote: > Thanks I'll have a look at it. So I understand correctly, that purely > algebraic is not the way to go through PETSc here? > You can make it work. You would have the same difficulty in any linear algebra package, namely that you need an

Re: [petsc-users] Construct Matrix based on row and column values

2020-03-23 Thread Elias Karabelas
Thanks I'll have a look at it. So I understand correctly, that purely algebraic is not the way to go through PETSc here? Cheers Elias On 23/03/2020 13:39, Matthew Knepley wrote: On Mon, Mar 23, 2020 at 8:38 AM Elias Karabelas mailto:karabelasel...@gmail.com>> wrote: On 23/03/2020

Re: [petsc-users] Construct Matrix based on row and column values

2020-03-23 Thread Matthew Knepley
On Mon, Mar 23, 2020 at 8:38 AM Elias Karabelas wrote: > > On 23/03/2020 13:36, Matthew Knepley wrote: > > On Mon, Mar 23, 2020 at 8:31 AM Elias Karabelas > wrote: > >> Dear Matt, >> >> I've just found this answer from 2014 >> >>

Re: [petsc-users] Construct Matrix based on row and column values

2020-03-23 Thread Elias Karabelas
On 23/03/2020 13:36, Matthew Knepley wrote: On Mon, Mar 23, 2020 at 8:31 AM Elias Karabelas mailto:karabelasel...@gmail.com>> wrote: Dear Matt, I've just found this answer from 2014 https://lists.mcs.anl.gov/pipermail/petsc-users/2014-August/022450.html wondering if this

Re: [petsc-users] Construct Matrix based on row and column values

2020-03-23 Thread Matthew Knepley
On Mon, Mar 23, 2020 at 8:31 AM Elias Karabelas wrote: > Dear Matt, > > I've just found this answer from 2014 > > https://lists.mcs.anl.gov/pipermail/petsc-users/2014-August/022450.html > > wondering if this would theoretically work. > > In serial certainly, I just don't see how it works in

Re: [petsc-users] Construct Matrix based on row and column values

2020-03-23 Thread Elias Karabelas
Dear Matt, I've just found this answer from 2014 https://lists.mcs.anl.gov/pipermail/petsc-users/2014-August/022450.html wondering if this would theoretically work. And the thing with this FCT-Schemes is, that they're build on purely algebraic considerations (like AMG) so I don't want to

Re: [petsc-users] Construct Matrix based on row and column values

2020-03-23 Thread Matthew Knepley
On Mon, Mar 23, 2020 at 7:46 AM Elias Karabelas wrote: > Dear Users, > > I want to implement a FCT (flux corrected transport) scheme with PETSc. > To this end I have amongst other things create a Matrix whose entries > are given by > > L_ij = -max(0, A_ij, A_ji) for i neq j > > L_ii =

[petsc-users] Construct Matrix based on row and column values

2020-03-23 Thread Elias Karabelas
Dear Users, I want to implement a FCT (flux corrected transport) scheme with PETSc. To this end I have amongst other things create a Matrix whose entries are given by L_ij = -max(0, A_ij, A_ji) for i neq j L_ii = Sum_{j=0,..n, j neq i} L_ij where Mat A is an (non-symmetric) Input Matrix