Package slepc4py :: Module SLEPc :: Class DS |
[hide private]
[frames] | no frames]

# Class DS

DS

Nested Classes | [hide private]
| MatType To refer to one of the matrices stored internally in DS
| ParallelType DS parallel types
| StateType DS state types
| Type DS type

Instance Methods | [hide private]
a new object with type S, a subtype of T |
__new__(S, ...) |
allocate(self, ld) Allocates memory for internal storage or matrices in DS. |
cond(self) Compute the inf-norm condition number of the first matrix. |
create(self, comm=None) Creates the DS object. |
destroy(self) Destroys the DS object. |
duplicate(self) Duplicate the DS object with the same type and dimensions. |
getBlockSize(self) Gets the block size. |
getCompact(self) Gets the compact storage flag. |
getDimensions(self) Returns the current dimensions. |
getExtraRow(self) Gets the extra row flag. |
getGSVDDimensions(self) Gets the number of columns and rows of a DS of type `GSVD`. |
getLeadingDimension(self) Returns the leading dimension of the allocated matrices. |
getMat(self, matname) Returns the requested matrix as a sequential dense Mat object. |
getMethod(self) Gets the method currently used in the DS. |
getOptionsPrefix(self) Gets the prefix used for searching for all DS options in the database. |
getPEPCoefficients(self) Gets the polynomial basis coefficients of a DS of type PEP. |
getPEPDegree(self) Gets the polynomial degree of a DS of type PEP. |
getParallel(self) Gets the mode of operation in parallel runs. |
getRefined(self) Gets the refined vectors flag. |
getSVDDimensions(self) Gets the number of columns of a DS of type SVD. |
getState(self) Returns the current state. |
getType(self) Gets the DS type of this object. |
reset(self) Resets the DS object. |
restoreMat(self, matname, Mat mat) Restore the previously seized matrix. |
setBlockSize(self, bs) Selects the block size. |
setCompact(self, comp) Switch to compact storage of matrices. |
setDimensions(self, n=None, l=None, k=None) Resize the matrices in the DS object. |
setExtraRow(self, ext) Sets a flag to indicate that the matrix has one extra row. |
setFromOptions(self) Sets DS options from the options database. |
setGSVDDimensions(self, m, p) Sets the number of columns and rows of a DS of type `GSVD`. |
setIdentity(self, matname) Copy the identity on the active part of a matrix. |
setMethod(self, meth) Selects the method to be used to solve the problem. |
setOptionsPrefix(self, prefix) Sets the prefix used for searching for all DS options in the database. |
setPEPCoefficients(self, pbc) Sets the polynomial basis coefficients of a DS of type PEP. |
setPEPDegree(self, deg) Sets the polynomial degree of a DS of type PEP. |
setParallel(self, pmode) Selects the mode of operation in parallel runs. |
setRefined(self, ref) Sets a flag to indicate that refined vectors must be computed. |
setSVDDimensions(self, m) Sets the number of columns of a DS of type SVD. |
setState(self, state) Change the state of the DS object. |
setType(self, ds_type) Selects the type for the DS object. |
truncate(self, n, trim=False) Truncates the system represented in the DS object. |
updateExtraRow(self) Performs all necessary operations so that the extra row gets up-to-date after a call to `solve()`. |
view(self, Viewer viewer=None) Prints the DS data structure. |
Inherited from `petsc4py.PETSc.Object`: `__copy__`, `__deepcopy__`, `__eq__`, `__ge__`, `__gt__`, `__le__`, `__lt__`, `__ne__`, `__nonzero__`, `appendOptionsPrefix`, `compose`, `decRef`, `getAttr`, `getClassId`, `getClassName`, `getComm`, `getDict`, `getName`, `getRefCount`, `getTabLevel`, `incRef`, `incrementTabLevel`, `query`, `setAttr`, `setName`, `setTabLevel`, `stateGet`, `stateIncrease`, `stateSet`, `viewFromOptions` Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__init__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__sizeof__`, `__str__`, `__subclasshook__`

Properties | [hide private]
| block_size
| compact
| extra_row
| method
| parallel
| refined
| state
Inherited from `petsc4py.PETSc.Object`: `classid`, `comm`, `fortran`, `handle`, `klass`, `name`, `prefix`, `refcount`, `type` Inherited from `object`: `__class__`

Method Details | [hide private]

### __new__(S, ...) |
Returns: a new object with type S, a subtype of T Overrides: object.__new__

### allocate(self, ld) |
Allocates memory for internal storage or matrices in DS. # Parameters ld: int Leading dimension (maximum allowed dimension for the matrices, including the extra row if present).

### cond(self) |
Compute the inf-norm condition number of the first matrix. # Returns cond: real Condition number.

### create(self, comm=None) |
Creates the DS object. # Parameters comm: Comm, optional MPI communicator; if not provided, it defaults to all processes.

### destroy(self) |
Destroys the DS object. Overrides: petsc4py.PETSc.Object.destroy

### getBlockSize(self) |
Gets the block size. # Returns bs: int The block size.

### getCompact(self) |
Gets the compact storage flag. # Returns comp: bool The flag.

### getDimensions(self) |
Returns the current dimensions. # Returns n: int The new size. l: int Number of locked (inactive) leading columns. k: int Intermediate dimension (e.g., position of arrow). t: int Truncated length.

### getExtraRow(self) |
Gets the extra row flag. # Returns comp: bool The flag.

### getGSVDDimensions(self) |
Gets the number of columns and rows of a DS of type `GSVD`. # Returns m: int The number of columns. p: int The number of rows for the second matrix.

### getLeadingDimension(self) |
Returns the leading dimension of the allocated matrices. # Returns ld: int Leading dimension (maximum allowed dimension for the matrices).

### getMat(self, matname) |
Returns the requested matrix as a sequential dense Mat object. # Parameters matname: DS.MatType enumerate The requested matrix.

### getMethod(self) |
Gets the method currently used in the DS. # Returns meth: int Identifier of the method.

### getOptionsPrefix(self) |
Gets the prefix used for searching for all DS options in the database. # Returns prefix: string The prefix string set for this DS object. Overrides: petsc4py.PETSc.Object.getOptionsPrefix

### getPEPCoefficients(self) |
Gets the polynomial basis coefficients of a DS of type PEP. # Returns pbc: array of float Coefficients.

### getPEPDegree(self) |
Gets the polynomial degree of a DS of type PEP. # Returns deg: int The polynomial degree.

### getParallel(self) |
Gets the mode of operation in parallel runs. # Returns pmode: DS.ParallelType enumerate The parallel mode.

### getRefined(self) |
Gets the refined vectors flag. # Returns comp: bool The flag.

### getSVDDimensions(self) |
Gets the number of columns of a DS of type SVD. # Returns m: int The number of columns.

### getState(self) |
Returns the current state. # Returns state: DS.StateType enumerate The current state.

### getType(self) |
Gets the DS type of this object. # Returns type: DS.Type enumerate The direct solver type currently being used. Overrides: petsc4py.PETSc.Object.getType

### restoreMat(self, matname, Mat mat) |
Restore the previously seized matrix. # Parameters matname: DS.MatType enumerate The selected matrix. mat: Mat The matrix previously obtained with getMat().

### setBlockSize(self, bs) |
Selects the block size. # Parameters bs: int The block size.

### setCompact(self, comp) |
Switch to compact storage of matrices. # Parameters comp: bool True means compact storage. # Notes Compact storage is used in some DS types such as DS.Type.HEP when the matrix is tridiagonal. This flag can be used to indicate whether the user provides the matrix entries via the compact form (the tridiagonal DS.MatType.T) or the non-compact one (DS.MatType.A). The default is `False`.

### setDimensions(self, n=None, l=None, k=None) |
Resize the matrices in the DS object. # Parameters n: int, optional The new size. l: int, optional Number of locked (inactive) leading columns. k: int, optional Intermediate dimension (e.g., position of arrow). # Notes The internal arrays are not reallocated.

### setExtraRow(self, ext) |
Sets a flag to indicate that the matrix has one extra row. # Parameters ext: bool True if the matrix has extra row. # Notes In Krylov methods it is useful that the matrix representing the direct solver has one extra row, i.e., has dimension (n+1)*n . If this flag is activated, all transformations applied to the right of the matrix also affect this additional row. In that case, (n+1) must be less or equal than the leading dimension. The default is `False`.

### setFromOptions(self) |
Sets DS options from the options database. # Notes To see all options, run your program with the `-help` option. Overrides: petsc4py.PETSc.Object.setFromOptions

### setGSVDDimensions(self, m, p) |
Sets the number of columns and rows of a DS of type `GSVD`. # Parameters m: int The number of columns. p: int The number of rows for the second matrix.

### setIdentity(self, matname) |
Copy the identity on the active part of a matrix. # Parameters matname: DS.MatType enumerate The requested matrix.

### setMethod(self, meth) |
Selects the method to be used to solve the problem. # Parameters meth: int An index identifying the method.

### setOptionsPrefix(self, prefix) |
Sets the prefix used for searching for all DS options in the database. # Parameters prefix: string The prefix string to prepend to all DS option requests. # Notes A hyphen (`-`) must NOT be given at the beginning of the prefix name. The first character of all runtime options is AUTOMATICALLY the hyphen. Overrides: petsc4py.PETSc.Object.setOptionsPrefix

### setPEPCoefficients(self, pbc) |
Sets the polynomial basis coefficients of a DS of type PEP. # Parameters pbc: array of float Coefficients.

### setPEPDegree(self, deg) |
Sets the polynomial degree of a DS of type PEP. # Parameters deg: int The polynomial degree.

### setParallel(self, pmode) |
Selects the mode of operation in parallel runs. # Parameters pmode: DS.ParallelType enumerate The parallel mode.

### setRefined(self, ref) |
Sets a flag to indicate that refined vectors must be computed. # Parameters ref: bool True if refined vectors must be used. # Notes Normally the vectors returned in DS.MatType.X are eigenvectors of the projected matrix. With this flag activated, `vectors()` will return the right singular vector of the smallest singular value of matrix At-theta*I, where At is the extended (n+1)xn matrix and theta is the Ritz value. This is used in the refined Ritz approximation. The default is `False`.

### setSVDDimensions(self, m) |
Sets the number of columns of a DS of type SVD. # Parameters m: int The number of columns.

### setState(self, state) |
Change the state of the DS object. # Parameters state: DS.StateType enumerate The new state. # Notes The state indicates that the dense system is in an initial state (raw), in an intermediate state (such as tridiagonal, Hessenberg or Hessenberg-triangular), in a condensed state (such as diagonal, Schur or generalized Schur), or in a truncated state. This function is normally used to return to the raw state when the condensed structure is destroyed.

### setType(self, ds_type) |
Selects the type for the DS object. # Parameters ds_type: DS.Type enumerate The direct solver type to be used.

### truncate(self, n, trim=False) |
Truncates the system represented in the DS object. # Parameters n: int The new size. trim: bool, optional A flag to indicate if the factorization must be trimmed.

### view(self, Viewer viewer=None) |
Prints the DS data structure. # Parameters viewer: Viewer, optional Visualization context; if not provided, the standard output is used. Overrides: petsc4py.PETSc.Object.view