Skip to main content
`Ctrl`+`K`

# LMESetProblemType

Specifies the type of matrix equation to be solved.

## Synopsis

    #include "slepclme.h"
    PetscErrorCode LMESetProblemType(LME lme,LMEProblemType type)

Logically Collective

## Input Parameters

- lme - the linear matrix equation solver context

- type - a known type of matrix equation

## Options Database Keys

- -lme_lyapunov - continuous-time Lyapunov equation

- -lme_sylvester - Sylvester equation

- -lme_gen_lyapunov - generalized Lyapunov equation

- -lme_gen_sylvester - generalized Sylvester equation

- -lme_dt_lyapunov - discrete-time Lyapunov equation

- -lme_stein - Stein equation

## Notes

The coefficient matrices \(A\), \(B\), \(D\), \(E\) must be provided via `LMESetCoefficients()`, but some of them are optional depending on the matrix equation.

Problem Type | Equation | `LMEProblemType` | \(A\) | \(B\) | \(D\) | \(E\)
--- | --- | --- | --- | --- | --- | ---
Continuous-Time Lyapunov | \(AX+XA^*=-C\) | `LME_LYAPUNOV` | yes | \(A^*\) | - | -
Sylvester | \(AX+XB=C\) | `LME_SYLVESTER` | yes | yes | - | -
Generalized Lyapunov | \(AXD^*+DXA^*=-C\) | `LME_GEN_LYAPUNOV` | yes | \(A^*\) | yes | \(D^*\)
Generalized Sylvester | \(AXE+DXB=C\) | `LME_GEN_SYLVESTER` | yes | yes | yes | yes
Discrete-Time Lyapunov | \(AXA^*-X=-C\) | `LME_DT_LYAPUNOV` | yes | - | - | \(A^*\)
Stein | \(AXE-X=-C\) | `LME_STEIN` | yes | - | - | yes

In the above table, the notation \(A^*\) means that this matrix need not be passed, but the user may choose to pass an explicit transpose of matrix \(A\) (for improved efficiency).

Also note that some of the equation types impose restrictions on the properties of the coefficient matrices and possibly on the right-hand side \(C\).

## See Also

LME: Linear Matrix Equation, `LMESetCoefficients()`, `LMESetType()`, `LMEGetProblemType()`, `LMEProblemType`

## Level

beginner

## Location

src/lme/interface/lmeopts.c

## Examples

src/lme/tutorials/ex32.c

Index of all LME routines Table of Contents for all manual pages Index of all manual pages