Re: [petsc-users] Vec Ownership ranges with Global Section Offsets

2023-01-06 Thread Matthew Knepley
On Fri, Jan 6, 2023 at 12:18 PM Nicholas Arnold-Medabalimi < narno...@umich.edu> wrote: > I am doing that as well (although not for vertex dofs). And I had it > working quite well for purely cell-associated DOFs. But I realized later > that I also wanted to transmit some DOFs associated with

Re: [petsc-users] Vec Ownership ranges with Global Section Offsets

2023-01-06 Thread Nicholas Arnold-Medabalimi
I am doing that as well (although not for vertex dofs). And I had it working quite well for purely cell-associated DOFs. But I realized later that I also wanted to transmit some DOFs associated with faces so I suspect I'm messing something up there. Something we discussed back on 12/26 (email

Re: [petsc-users] Vec Ownership ranges with Global Section Offsets

2023-01-06 Thread Matthew Knepley
On Fri, Jan 6, 2023 at 11:32 AM Nicholas Arnold-Medabalimi < narno...@umich.edu> wrote: > Hi Matt > > This was generated using the DMPlexDistributeField which we discussed a > while back. Everything seemed to be working fine when I only had cells dofs > but I recently added face dofs, which seems

Re: [petsc-users] Vec Ownership ranges with Global Section Offsets

2023-01-06 Thread Nicholas Arnold-Medabalimi
Hi Matt This was generated using the DMPlexDistributeField which we discussed a while back. Everything seemed to be working fine when I only had cells dofs but I recently added face dofs, which seems to have caused some issues. Whats weird is that I'm feeding the same distribution SF and

Re: [petsc-users] Vec Ownership ranges with Global Section Offsets

2023-01-06 Thread Matthew Knepley
On Fri, Jan 6, 2023 at 10:41 AM Nicholas Arnold-Medabalimi < narno...@umich.edu> wrote: > Hi Matt > > I appreciate the help. The section view is quite extensive because each > cell has 55 dofs located at the cells and on certain faces. I've appended > the first of these which corresponds with the

Re: [petsc-users] Vec Ownership ranges with Global Section Offsets

2023-01-06 Thread Nicholas Arnold-Medabalimi
Hi Matt I appreciate the help. The section view is quite extensive because each cell has 55 dofs located at the cells and on certain faces. I've appended the first of these which corresponds with the output in the first email, to save space. The following 54 are exactly the same but offset

Re: [petsc-users] Vec Ownership ranges with Global Section Offsets

2023-01-06 Thread Matthew Knepley
On Fri, Jan 6, 2023 at 10:10 AM Nicholas Arnold-Medabalimi < narno...@umich.edu> wrote: > Hi Matt > > I apologize for any lack of clarity in the initial email. > > looking at the initial output on rank 1 > write(*,*) "cell",i,"offset",offset,'oStart',oStart, offset-oStart > cell 0

Re: [petsc-users] Vec Ownership ranges with Global Section Offsets

2023-01-06 Thread Nicholas Arnold-Medabalimi
Hi Matt I apologize for any lack of clarity in the initial email. looking at the initial output on rank 1 write(*,*) "cell",i,"offset",offset,'oStart',oStart, offset-oStart cell 0 offset2475 oStart2640-165 cell 1 offset2530 oStart2640

Re: [petsc-users] Vec Ownership ranges with Global Section Offsets

2023-01-06 Thread Matthew Knepley
On Fri, Jan 6, 2023 at 9:56 AM Nicholas Arnold-Medabalimi < narno...@umich.edu> wrote: > Apologies. If it helps, there is one cell of overlap in this small test > case for a 2D mesh that is 1 cell in height and a number of cells in > length. . > > process 0 > Petsc VecGetLocalSize2750 >

Re: [petsc-users] Vec Ownership ranges with Global Section Offsets

2023-01-06 Thread Nicholas Arnold-Medabalimi
Apologies. If it helps, there is one cell of overlap in this small test case for a 2D mesh that is 1 cell in height and a number of cells in length. . process 0 Petsc VecGetLocalSize2750 size(stateVecV)2750 process 1 Petsc VecGetLocalSize2640 size(stateVecV)

Re: [petsc-users] Vec Ownership ranges with Global Section Offsets

2023-01-06 Thread Matthew Knepley
On Fri, Jan 6, 2023 at 9:37 AM Nicholas Arnold-Medabalimi < narno...@umich.edu> wrote: > Hi Matt > > I made a typo on the line statVecV(offset) = in my > example, I agree. (I wrote that offhand since the actual assignment is much > larger) I should be statVecV(offset+1) = so I'm confident it's

Re: [petsc-users] Vec Ownership ranges with Global Section Offsets

2023-01-06 Thread Nicholas Arnold-Medabalimi
Hi Matt I made a typo on the line statVecV(offset) = in my example, I agree. (I wrote that offhand since the actual assignment is much larger) I should be statVecV(offset+1) = so I'm confident it's not a 1 0 indexing thing. My question is more related to what is happening in the offsets. c0

Re: [petsc-users] Vec Ownership ranges with Global Section Offsets

2023-01-06 Thread Matthew Knepley
On Fri, Jan 6, 2023 at 2:28 AM Nicholas Arnold-Medabalimi < narno...@umich.edu> wrote: > Hi Petsc Users, > > I'm working with a dmplex system with a subsampled mesh distributed with > an overlap of 1. > > I'm encountering unusual situations when using VecGetOwnershipRange to > adjust the offset

[petsc-users] Vec Ownership ranges with Global Section Offsets

2023-01-05 Thread Nicholas Arnold-Medabalimi
Hi Petsc Users, I'm working with a dmplex system with a subsampled mesh distributed with an overlap of 1. I'm encountering unusual situations when using VecGetOwnershipRange to adjust the offset received from a global section. The logic of the following code is first to get the offset needed to