slepc4py.SLEPc.Util — slepc4py 3.24.3 documentation

Skip to main content
`Ctrl`+`K`

# slepc4py.SLEPc.Util

class slepc4py.SLEPc.Util

  Bases: `object`

  Other utilities such as the creation of structured matrices.

  Methods Summary

  `createMatBSE`(R, C) | Create a matrix that can be used to define a BSE type problem.
  `createMatHamiltonian`(A, B, C) | Create matrix to be used for a structured Hamiltonian eigenproblem.

  Methods Documentation

  classmethod createMatBSE(R, C)

    Create a matrix that can be used to define a BSE type problem.

    Collective.

    Create a matrix that can be used to define a structured eigenvalue problem of type BSE (Bethe-Salpeter Equation).

    Parameters:

      - R (petsc4py.PETSc.Mat) – The matrix for the diagonal block (resonant).

      - C (petsc4py.PETSc.Mat) – The matrix for the off-diagonal block (coupling).

    Returns:

      The matrix with the block form \(H = [ R\; C; {-C}^*\; {-R}^T ]\).

    Return type:

      `petsc4py.PETSc.Mat`

    See also

    `MatCreateBSE`

    Source code at slepc4py/SLEPc/Util.pyx:8

  classmethod createMatHamiltonian(A, B, C)

    Create matrix to be used for a structured Hamiltonian eigenproblem.

    Collective.

    Parameters:

      - A (petsc4py.PETSc.Mat) – The matrix for (0,0) block.

      - B (petsc4py.PETSc.Mat) – The matrix for (0,1) block, must be real symmetric or Hermitian.

      - C (petsc4py.PETSc.Mat) – The matrix for (1,0) block, must be real symmetric or Hermitian.

    Returns:

      The matrix with the block form \(H = [ A\; B; C\; -A^* ]\).

    Return type:

      `petsc4py.PETSc.Mat`

    See also

    `MatCreateHamiltonian`

    Source code at slepc4py/SLEPc/Util.pyx:38