:orphan: # PetscLayoutCreateFromRanges Creates a new `PetscLayout` with the given ownership ranges and sets it up. ## Synopsis ``` #include "petscis.h" PetscErrorCode PetscLayoutCreateFromRanges(MPI_Comm comm, const PetscInt range[], PetscCopyMode mode, PetscInt bs, PetscLayout *newmap) ``` Collective ## Input Parameters - ***comm -*** the MPI communicator - ***range -*** the array of ownership ranges for each rank with length commsize+1 - ***mode -*** the copy mode for range - ***bs -*** the block size (or `PETSC_DECIDE`) ## Output Parameter - ***newmap -*** the new `PetscLayout` ## See Also [PetscLayout](sec_matlayout), `PetscLayoutCreate()`, `PetscLayoutSetLocalSize()`, `PetscLayoutSetSize()`, `PetscLayoutGetSize()`, `PetscLayoutGetLocalSize()`, `PetscLayout`, `PetscLayoutDestroy()`, `PetscLayoutGetRange()`, `PetscLayoutGetRanges()`, `PetscLayoutSetBlockSize()`, `PetscLayoutGetBlockSize()`, `PetscLayoutSetUp()`, `PetscLayoutCreateFromSizes()` ## Level developer ## Location src/vec/is/utils/pmap.c --- [Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/vec/is/utils/pmap.c) [Index of all IS routines](index.md) [Table of Contents for all manual pages](/manualpages/index.md) [Index of all manual pages](/manualpages/singleindex.md)