DSTruncate#

Truncates the system represented in the DS object.

Synopsis#

#include "slepcds.h" 
PetscErrorCode DSTruncate(DS ds,PetscInt n,PetscBool trim)

Logically Collective

Input Parameters#

  • ds - the direct solver context

  • n - the new size

  • trim - a flag to indicate if the factorization must be trimmed

Note#

The new size is set to n. Note that in some cases the new size could be n+1 or n-1 to avoid breaking a 2x2 diagonal block (e.g., in real Schur form). In cases where the extra row is meaningful, the first n elements are kept as the extra row for the new system.

If the flag trim is turned on, it resets the locked and intermediate dimensions to zero, see DSSetDimensions(), and sets the state to DS_STATE_RAW. It also cleans the extra row if being used.

The typical usage of trim=PETSC_TRUE is to truncate the Schur decomposition at the end of a Krylov iteration. In this case, the state must be changed to DS_STATE_RAW so that DSVectors() computes eigenvectors from scratch.

See Also#

DS: Direct Solver (or Dense System), DSSetDimensions(), DSSetExtraRow(), DSStateType

Level#

advanced

Location#

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

Implementations#

DSTruncate_GHIEP() in src/sys/classes/ds/impls/ghiep/dsghiep.c
DSTruncate_GNHEP() in src/sys/classes/ds/impls/gnhep/dsgnhep.c
DSTruncate_GSVD() in src/sys/classes/ds/impls/gsvd/dsgsvd.c
DSTruncate_HEP() in src/sys/classes/ds/impls/hep/dshep.c
DSTruncate_HSVD() in src/sys/classes/ds/impls/hsvd/dshsvd.c
DSTruncate_NHEP() in src/sys/classes/ds/impls/nhep/dsnhep.c
DSTruncate_NHEPTS() in src/sys/classes/ds/impls/nhepts/dsnhepts.c
DSTruncate_SVD() in src/sys/classes/ds/impls/svd/dssvd.c


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