# AOSetType
Builds an application ordering for a particular `AOType` 
## Synopsis
```
#include "petscao.h"  
PetscErrorCode AOSetType(AO ao, AOType method)
```
Collective on ao


## Input Parameters

- ***ao    -*** The `AO` object
- ***method -*** The name of the AO type



## Options Database Key

- ***-ao_type <type> -*** Sets the `AO` type; use -help for a list of available types





## Notes
See "petsc/include/petscao.h" for available AO types (for instance, `AOBASIC` and `AOMEMORYSCALABLE`).

`AO` are usually created via the convenience routines such as `AOCreateBasic()` or `AOCreateMemoryScalable()`


## See Also
 `AO`, `AOType`, `AOCreateBasic()`, `AOCreateMemoryScalable()`, `AOGetType()`, `AOCreate()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/vec/is/ao/interface/aoreg.c.html#AOSetType">src/vec/is/ao/interface/aoreg.c</A>


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