slepc-3.21.2 2024-09-25
Report Typos and Errors

# DSGetTruncateSize

Gets the correct size to be used in DSTruncate() to avoid breaking a 2x2 block.

### Synopsis

    #include "slepcds.h"
    PetscErrorCode DSGetTruncateSize(DS ds,PetscInt l,PetscInt n,PetscInt *k)

Not Collective

### Input Parameters

| ds | - the direct solver context
| l | - the size of the locked part (set to 0 to use ds->l)
| n | - the total matrix size (set to 0 to use ds->n)

### Output Parameter

| k | - the wanted truncation size (possibly modified)

### Notes

This should be called before DSTruncate() to make sure that the truncation does not break a 2x2 block corresponding to a complex conjugate eigenvalue.

The total size is n (either user-provided or ds->n if 0 is passed). The size where the truncation is intended is equal to l+k (where l can be equal to the locked size ds->l if set to 0). Then if there is a 2x2 block at the l+k limit, the value of k is increased (or decreased) by 1.

### See Also

DSTruncate(), DSSetDimensions()

### 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