slepc-3.18.2 2023-01-26
Report Typos and Errors

# DSSortWithPermutation

Reorders the result of DSSolve() according to a given permutation.

### Synopsis

    #include "slepcds.h"
    PetscErrorCode DSSortWithPermutation(DS ds,PetscInt *perm,PetscScalar *eigr,PetscScalar *eigi)

Logically Collective on ds

### Input Parameters

| ds | - the direct solver context
| perm | - permutation that indicates the new ordering

### Input/Output Parameters

| eigr | - array with the reordered eigenvalues (real part)
| eigi | - array with the reordered eigenvalues (imaginary part)

### Notes

This routine reorders the arrays provided in eigr and eigi, and also the dense system stored inside ds (assumed to be in condensed form). There is no sorting criterion, as opposed to DSSort(). Instead, the new ordering is given in argument perm.

### See Also

DSSolve(), DSSort()

### Level

advanced

### Location

src/sys/classes/ds/interface/dsops.c
Index of all DS routines
Table of Contents for all manual pages
Index of all manual pages