# AOCreateBasic
Creates a basic application ordering using two integer arrays. 
## Synopsis
```
#include "petscao.h"   
PetscErrorCode AOCreateBasic(MPI_Comm comm, PetscInt napp, const PetscInt myapp[], const PetscInt mypetsc[], AO *aoout)
```
Collective


## Input Parameters

- ***comm -*** MPI communicator that is to share `AO`
- ***napp -*** size of integer arrays
- ***myapp -*** integer array that defines an ordering
- ***mypetsc -*** integer array that defines another ordering (may be NULL to
indicate the natural ordering, that is 0,1,2,3,...)



## Output Parameter

- ***aoout -*** the new application ordering





## Note
The arrays myapp and mypetsc must contain the all the integers 0 to napp-1 with no duplicates; that is there cannot be any "holes"
in the indices. Use `AOCreateMapping()` or `AOCreateMappingIS()` if you wish to have "holes" in the indices.


## See Also
 [](sec_ao), [](sec_scatter), `AO`, `AOCreateBasicIS()`, `AODestroy()`, `AOPetscToApplication()`, `AOApplicationToPetsc()`

## Level
beginner

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/vec/is/ao/impls/basic/aobasic.c.html#AOCreateBasic">src/vec/is/ao/impls/basic/aobasic.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/vec/is/ao/impls/basic/aobasic.c)


[Index of all AO routines](index.md)  
[Table of Contents for all manual pages](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
