[petsc-dev] [petsc-maint #152223] [PATCH 1/2] Remove dependence of petscvec.h on vecimpl.h while still providing fast VecGetArray
Barry Smith
bsmith at mcs.anl.gov
Tue Feb 12 21:59:00 CST 2013
I have added PetscObjectComm() and used it 2531 times in the PETSc source.
I have not yet added any code to deal with MPI_COMM_NULL yet.
Barry
On Feb 12, 2013, at 5:39 PM, Jed Brown <jedbrown at mcs.anl.gov> wrote:
>
> On Tue, Feb 12, 2013 at 5:32 PM, Matthew Knepley <petsc-maint at mcs.anl.gov> wrote:
> > I also think including the impl is a bad option. I think the default should be an Object (yes,
> > I am advocating changing the interface again), and SETERRC() would take a comm.
>
> I had suggested MPI_Comm PetscObjectGetComm(PetscObject) that can be called inside the SETERRQ() thing, is not an issue for performance since it is called only for error processing. For some reason it was silently rejected.
>
> I thought it violated the Style Guide :)
>
> Should we name this non-error-checking thing PetscObjectComm() (returning MPI_COMM_NULL if passed invalid input) and leave the error-checking PetscObjectGetComm() for existing users and any time it's convenient to use? Or is it too confusing to have two ways to access the comm?
More information about the petsc-dev
mailing list