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#

DS: Direct Solver (or Dense System), DSTruncate(), DSSetDimensions()

Level#

advanced

Location#

src/sys/classes/ds/interface/dsops.c

Implementations#

DSGetTruncateSize_GHIEP() in src/sys/classes/ds/impls/ghiep/dsghiep.c
DSGetTruncateSize_NHEPTS() in src/sys/classes/ds/impls/nhepts/dsnhepts.c


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