#include "petscis.h" PetscErrorCode PetscLayoutSetUp(PetscLayout map)Collective on MPI_Comm
PetscLayoutCreate(MPI_Comm,PetscLayout *);
PetscLayoutSetBlockSize(PetscLayout,1);
PetscLayoutSetSize(PetscLayout,n) or PetscLayoutSetLocalSize(PetscLayout,N); or both
PetscLayoutSetUp(PetscLayout);
PetscLayoutGetSize(PetscLayout,PetscInt *);
If range exists, and local size is not set, everything gets computed from the range.
If the local size, global size are already set and range exists then this does nothing.