[petsc-dev] Can I call PetscSectionAddDof(s, p, ndof) at a shred 'p' by more than one processors?

Lawrence Mitchell wence at gmx.li
Wed Nov 18 13:19:39 CST 2020



> On 18 Nov 2020, at 15:26, Zhang, Hong via petsc-dev <petsc-dev at mcs.anl.gov> wrote:
> 
> Matt or Jed,
> Can I call PetscSectionAddDof(s,p,ndof) at a shred 'p' by more than one processors? For example,
> if (rank == 0) {
>     PetscSectionAddDof(s,p,1) ;
> } else if (rank == 1) {
>     PetscSectionAddDof(s,p,2) ;
> } 
> Then, at shared 'p', section 's' has dof=3?

Sections are "local" objects that are tied together by an SF that describes point ownership.

So I think that the only thing you need is that if two processes set a dof on what is globally the same point, they should agree on how many dofs live there.

I wonder if PetscSectionAddDof (etc...) should be marked as logically collective.

Lawrence


More information about the petsc-dev mailing list