PetscMergeMPIIntArray — PETSc 3.22.5 documentation

Skip to main content
`Ctrl`+`K`

# PetscMergeMPIIntArray

Merges two SORTED `PetscMPIInt` arrays.

## Synopsis

    #include "petscsys.h"
    PetscErrorCode PetscMergeMPIIntArray(PetscInt an, const PetscMPIInt aI[], PetscInt bn, const PetscMPIInt bI[], PetscInt *n, PetscMPIInt **L)

Not Collective

## Input Parameters

- an - number of values in the first array

- aI - first sorted array of `PetscMPIInt`

- bn - number of values in the second array

- bI - second array of `PetscMPIInt`

## Output Parameters

- n - number of values in the merged array (<= an + bn)

- L - merged sorted array, allocated if address of NULL pointer is passed

## See Also

`PetscIntSortSemiOrdered()`, `PetscSortReal()`, `PetscSortIntWithPermutation()`, `PetscSortInt()`, `PetscSortIntWithArray()`

## Level

intermediate

## Location

src/sys/utils/sorti.c

Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages