hifir4py.ksp.GMRES_WorkSpace¶
-
class
GMRES_WorkSpace(n: int, restart: int = 30, dtype: numpy.dtype = <class 'numpy.float64'>)[source]¶ Workspace class for GMRES solver
This class is a collection of all buffer arrays used in GMRES solver, i.e.,
gmres_hif. Users can create this buffer object a priori, so that it will be efficient to invoke GMRES multiple times.-
v, w Length-n arrays
Type: ndarray
Examples
The following code constructs a workspace buffer that is length 10 and with restart dimension 30.
>>> from hifir4py.ksp import * >>> work = GMRES_WorkSpace(10)
-
__init__(n: int, restart: int = 30, dtype: numpy.dtype = <class 'numpy.float64'>)[source]¶ Constructor of workspace buffer for GMRES
Parameters: - n (int) – Length of the RHS vector
- restart (int, optional) – Restart dimension of KSP, default is 30
- dtype (
dtype) – Data type, default is double-precision real
-
property
dtype: numpy.dtype¶ NumPy data type
Type: numpy.dtype
-
property
restart: int¶ Restart dimension
Type: int
-
property
size: int¶ Size (length) of the workspace
Type: int
-