# AOCreateMemoryScalableIS
Creates a memory scalable application ordering using two index sets. 
## Synopsis
```
#include "petscao.h"   
PetscErrorCode AOCreateMemoryScalableIS(IS isapp, IS ispetsc, AO *aoout)
```
Collective


## Input Parameters

- ***isapp -*** index set that defines an ordering
- ***ispetsc -*** index set that defines another ordering (may be NULL to use the
natural ordering)



## Output Parameter

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





## Notes
The index sets isapp and ispetsc must contain the all the integers 0 to napp-1 (where napp is the length of the index sets) with no duplicates;
that is there cannot be any "holes".

Comparing with `AOCreateBasicIS()`, this routine trades memory with message communication.


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

## Level
beginner

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/vec/is/ao/impls/memscalable/aomemscalable.c.html#AOCreateMemoryScalableIS">src/vec/is/ao/impls/memscalable/aomemscalable.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/vec/is/ao/impls/memscalable/aomemscalable.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)  
