MatCreateLREP#
Create a matrix that can be used to define a structured Linear Response eigenvalue problem.
Synopsis#
#include "slepcsys.h"
PetscErrorCode MatCreateLREP(Mat AK,Mat BM,PetscBool red,Mat *H)
Collective
Input Parameters#
AK - matrix for the diagonal block (\(A\)) or the top block (\(K\))
BM - matrix for the off-diagonal block (\(B\)) or the bottom block (\(M\))
red - whether the reduced form should be built
Output Parameter#
H - the resulting matrix
Notes#
The resulting matrix has the block form
red=PETSC_TRUE) is The reduced form can be obtained from the original formulation by setting \(K=A-B\) and \(M=A+B\). However, \(K\) and \(M\) need not have such relation, in which case the computed eigenvalues will be \(\pm\lambda_i\), where \(\lambda_i^2\) are the eigenvalues of the product eigenvalue problem \(KM\) (or \(MK\)).
The obtained matrix can be used as an input matrix to EPS eigensolvers via
EPSSetOperators() for the case that the problem type is EPS_LREP. Note that the
user cannot just build a matrix with the required structure, it must be done via
this function.
In the current implementation, H is a MATNEST matrix, where A and B form the
top block row, while the bottom block row is composed of shell matrices scaled by -1.
Similarly, in the reduced formulation, the MATNEST has two zero blocks.
Internally, the eigensolver will work with the reduced form, and it will carry out the conversion transparently if the first form is provided by the user.
See Also#
Structured Eigenvalue Problems, MatCreateNest(), EPSSetOperators(), EPSSetProblemType(), MatCreateBSE(), MatCreateHamiltonian()
Level#
intermediate
Location#
Examples#
Index of all Sys routines Table of Contents for all manual pages Index of all manual pages