# AOPetscToApplicationPermuteReal
Permutes an array of blocks of reals in the PETSc ordering to the application-defined ordering. 
## Synopsis
```
#include "petscao.h" 
PetscErrorCode AOPetscToApplicationPermuteReal(AO ao, PetscInt block, PetscReal array[])
```
Collective


## Input Parameters

- ***ao    -*** The application ordering context
- ***block -*** The block size
- ***array -*** The integer array



## Output Parameter

- ***array -*** The permuted array





## Notes
The length of the array should be block*N, where N is length
provided to the AOCreate*() method that created the AO.

The permutation takes array[i_pet] --> array[i_app], where i_app is
the index of 'i' in the application ordering and i_pet is the index
of 'i' in the petsc ordering.


## See Also
 [](sec_ao), `AO`, `AOCreateBasic()`, `AOView()`, `AOApplicationToPetsc()`, `AOPetscToApplicationIS()`

## Level
beginner

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

## Implementations

<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/vec/is/ao/impls/basic/aobasic.c.html#AOPetscToApplicationPermuteReal_Basic">AOPetscToApplicationPermuteReal_Basic in src/vec/is/ao/impls/basic/aobasic.c</A><BR>


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