Re: [petsc-users] Passive DM Variables

2022-08-29 Thread Mark Adams
You want "auxiliary" variables. There may be better examples but, try looking at https://petsc.org/release/src/snes/tutorials/ex12.c.html And search for "aux". Mark On Sun, Aug 28, 2022 at 12:44 PM Nicholas Arnold-Medabalimi < narno...@umich.edu> wrote: > Hi > > I'm working on a finite volume i

Re: [petsc-users] Passive DM Variables

2022-08-29 Thread Matthew Knepley
On Sun, Aug 28, 2022 at 12:44 PM Nicholas Arnold-Medabalimi < narno...@umich.edu> wrote: > Hi > > I'm working on a finite volume implementation using DMPlex. I was > wondering what the best-considered way to add cell variables to the DM that > we don't want to be part of the ksp/snes solve. As far

Re: [petsc-users] DMPlex Interpolation

2022-08-29 Thread Lawrence Mitchell
On Mon, 29 Aug 2022 at 14:55, Matthew Knepley wrote: > > On Sun, Aug 28, 2022 at 7:17 PM Matthew Knepley wrote: >> >> On Sun, Aug 28, 2022 at 5:36 PM Mike Michell wrote: >>> >>> Thank you for the reply. >>> >>> I think it can be more helpful for me if the attached sample code >>> (DMInterpolati

Re: [petsc-users] Passive DM Variables

2022-08-29 Thread Nicholas Arnold-Medabalimi
Yes, this is exactly what I was looking for. Thank you all. On Mon, Aug 29, 2022 at 8:02 AM Matthew Knepley wrote: > On Sun, Aug 28, 2022 at 12:44 PM Nicholas Arnold-Medabalimi < > narno...@umich.edu> wrote: > >> Hi >> >> I'm working on a finite volume implementation using DMPlex. I was >> wonde

Re: [petsc-users] DMPlex Interpolation

2022-08-29 Thread Matthew Knepley
On Mon, Aug 29, 2022 at 10:22 AM Lawrence Mitchell wrote: > On Mon, 29 Aug 2022 at 14:55, Matthew Knepley wrote: > > > > On Sun, Aug 28, 2022 at 7:17 PM Matthew Knepley > wrote: > >> > >> On Sun, Aug 28, 2022 at 5:36 PM Mike Michell > wrote: > >>> > >>> Thank you for the reply. > >>> > >>> I t

Re: [petsc-users] DMPlex Interpolation

2022-08-29 Thread Lawrence Mitchell
> > I am not sure Injection is going to "do the right thing" when you move > between spaces. At least my memory of the implementation > was that it just did local interpolation, which is not right when injecting > P0 into P1. Ah, that could be the case. For discontinuous things I think what you

Re: [petsc-users] DMPlex Interpolation

2022-08-29 Thread Mike Michell
Hi, @Matt-This is exactly what I wanted to do. Thank you for the help. Mapping for both directions (Q0->Q1 and Q1->Q0) works well. @Lawrence-Thank you for the comment. So far, Matt's comment fits my purpose. Thanks, > > > > I am not sure Injection is going to "do the right thing" when you move >