:orphan: # PetscLayout defines layout of vectors and matrices (that is the "global" numbering of vector and matrix entries) across MPI processes (which rows are owned by which processes) ## Synopsis ``` typedef struct _n_PetscLayout *PetscLayout; ``` ## Notes PETSc vectors (`Vec`) have a global number associated with each vector entry. The first MPI process that shares the vector owns the first `n0` entries of the vector, the second MPI process the next `n1` entries, etc. A `PetscLayout` is a way of managing this information, for example the number of locally owned entries is provided by `PetscLayoutGetLocalSize()` and the range of indices for a given MPI process is provided by `PetscLayoutGetRange()`. Each PETSc `Vec` contains a `PetscLayout` object which can be obtained with `VecGetLayout()`. For convenience `Vec` provides an API to access the layout information directly, for example with `VecGetLocalSize()` and `VecGetOwnershipRange()`. Similarly PETSc matrices have layouts, these are discussed in [](ch_matrices). ## See Also `PetscLayoutCreate()`, `PetscLayoutDestroy()`, `PetscLayoutGetRange()`, `PetscLayoutGetLocalSize()`, `PetscLayoutGetSize()`, `PetscLayoutGetBlockSize()`, `PetscLayoutGetRanges()`, `PetscLayoutFindOwner()`, `PetscLayoutFindOwnerIndex()`, `VecGetLayout()`, `VecGetLocalSize()`, `VecGetOwnershipRange()` ## Level developer ## Location include/petscistypes.h --- [Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/include/petscistypes.h) [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)