slepc-main 2024-12-17
Report Typos and Errors

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 RAW. It also cleans the extra row if being used.

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

See Also

DSSetDimensions(), DSSetExtraRow(), DSStateType

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