# AODataPartitionAndSetupLocal

Partitions across a given key (for example cells), then partitions a segment (for example vertices) subservient to that key.

### Synopsis

    #include "petscao.h"
    PetscErrorCode PETSCDM_DLLEXPORT AODataPartitionAndSetupLocal(AOData ao,const char keyname[],const char segmentname[],IS *iskey,IS *issegment,ISLocalToGlobalMapping *ltog)

Collective on AOData

### Input Parameters

| ao | - the AO database
| keyname | - the name of the key
| segmentname | - the name of the segment

### Output Parameters

| iskey | - the local indices in global numbering of the key entries (cells). Note that these are contiguous from rstart to rend
| issegment | - the local indices in global numbering of the segment entries (vertices)
| ltog | - the local to global mapping for the segment entries (vertices)

Notes: this renumbers the key and segment entries in the AO database to reflect the new partitioning. The ltog mapping is a mapping for the issegment indices, that is ltog applied to the indices 0 to sizeof(issegment)-1 is the entries in issegment.

### See Also

AODataKeyParition(), AODataSegmentPartition()

Level:advanced
Location:src/dm/ao/utils/aosetlocal.c
Index of all AO routines
Table of Contents for all manual pages
Index of all manual pages