MatCreateHamiltonian#
Create a matrix that can be used to define a structured eigenvalue problem of Hamiltonian type.
Synopsis#
#include "slepcsys.h"
PetscErrorCode MatCreateHamiltonian(Mat A,Mat B,Mat C,Mat *H)
Collective
Input Parameters#
A - matrix for the (0,0) block
B - matrix for the (0,1) block, must be real symmetric or complex Hermitian
C - matrix for the (1,0) block, must be real symmetric or complex Hermitian
Output Parameter#
H - the resulting matrix
Notes#
The resulting matrix has the block form
The obtained matrix can be used as an input matrix to EPS eigensolvers via
EPSSetOperators() for the case that the problem type is EPS_HAMILT. 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 the (1,1) block is
a matrix of type MATHERMITIANTRANSPOSEVIRTUAL obtained from A and scaled by -1.
See Also#
Structured Eigenvalue Problems, MatCreateNest(), EPSSetOperators(), EPSSetProblemType(), MatCreateBSE()
Level#
intermediate
Location#
Examples#
src/eps/tutorials/ex56.c
src/eps/tutorials/ex57.c
Index of all Sys routines Table of Contents for all manual pages Index of all manual pages