pg_utils.eigen.compute_eigen
- pg_utils.eigen.compute_eigen(read_from: Union[str, Tuple[ndarray, ndarray, List]], read_fmt: Literal['hdf5', 'pickle', 'json'] = 'hdf5', save_to: Optional[str] = None, save_fmt: Literal['hdf5', 'pickle'] = 'hdf5', diag: bool = False, chop: Optional[float] = None, prec: Optional[int] = None, overwrite: bool = False, verbose: int = 0) List[ndarray] [source]
Eigensolver step IV: compute eigenvalues and eigenvectors from matrices
- Parameters:
read_from (Union[str, Tuple[np.ndarray, np.ndarray]]) – file name to be loaded as the starting set of equations. If two arrays are given, they are interpreted as mass and stiffness matrices, respectively.
read_fmt (Literal["hdf5", "pickle", "json"]) – input format of the file default to “hdf5” format (restricted to double prec numpy arrays)
save_to (Optional[str]) – output json file name, if None (default), no file will be written.
save_fmt (Literal["hdf5", "pickle"]) – output format of the file default to “hdf5” format (restricted to double-prec numpy arrays)
diag (bool) – whether to enforce diagonality of mass matrix, default=False
chop (Optional[float]) – setting numbers whose absolute values are smaller than a threshold to zero. If None, then no chopping performed.
prec (Optional[int]) – precision (no. of binary digits) for eigensolver. If None set, then double-prec numpy/scipy backend is used.
overwrite (bool) – whether to overwrite existing file upon output, False by default.
verbose (int) – verbosity level, default to 0.
- Returns:
eigenvalues and eigenvectors