Re: [petsc-users] Interpolation between nodal and elemental field

2023-05-16 Thread K. Wu
Got it, thanks Matt! Matthew Knepley 于2023年5月16日周二 17:28写道: > On Tue, May 16, 2023 at 11:12 AM K. Wu wrote: > >> Hi Matt, >> >> >> >> I am using two PETSc DM, one for vertices (nodes), and one for cells >> (elements). >> > > I assume you mean DMDA. > > >> I want to do the following operation: >

Re: [petsc-users] Interpolation between nodal and elemental field

2023-05-16 Thread Matthew Knepley
On Tue, May 16, 2023 at 11:12 AM K. Wu wrote: > Hi Matt, > > > > I am using two PETSc DM, one for vertices (nodes), and one for cells > (elements). > I assume you mean DMDA. > I want to do the following operation: > > x is a global vector generated from DM vertices, with length Nn. y is a > gl

Re: [petsc-users] Interpolation between nodal and elemental field

2023-05-16 Thread K. Wu
Hi Matt, I am using two PETSc DM, one for vertices (nodes), and one for cells (elements). I want to do the following operation: x is a global vector generated from DM vertices, with length Nn. y is a global vector generated from DM cells, with length Ne. I want to generate a sparse matrix A wi

Re: [petsc-users] Interpolation between nodal and elemental field

2023-05-16 Thread Matthew Knepley
On Tue, May 16, 2023 at 10:27 AM K. Wu wrote: > Hi all, > > Good day! > > I am currently working on interploating the nodal field vector I obtained > to its corresponding elemental field vector. I am doing it in a simple way > by using structured mesh, the element value is just the average of its

[petsc-users] Interpolation between nodal and elemental field

2023-05-16 Thread K. Wu
Hi all, Good day! I am currently working on interploating the nodal field vector I obtained to its corresponding elemental field vector. I am doing it in a simple way by using structured mesh, the element value is just the average of its corresponding nodal values. Is it possible to generate a c