> I am working on the schur complement for eigenvalue problems, following
> step - 55. My stiffness block matrix is like this:
>
> *| AB.T |
> *
> *| BC |*
> *
> *
> and my mass block matrix is structured:
>
> *| M 0 |
> *
> *| 00 |*
> *
> *
> To obtain A_condensed, inversion of C is required. I have constructed
> the linear operators for C_inv and A_condensed using the
> inverse_operator and schur_complement functions based on the
> documentation here (
https://dealii.org/developer/doxygen/deal.II/
> group__LAOperators.html#ga76acca911f21089cd3bb385d20ccc995). However,
> SLEPcWrappers eigensolvers, such as SLEPcWrappers::SolverKrylovSchur and
> SLEPcWrappers::::SolverGeneralizedDavidson, only accept
> PETScWrappers::MatrixBase rather than linear operators as said in their
> documentations. Is there an easy way to form a
> PETScWrappers::MPI::SparseMatrix from the linear operator? I am trying
> not to calculate the schur_complement explicitly, however, it seems i
> may have to. I would really appreciate it for any suggestions.
Yuchen:
you want to look at PETScWrappers::MatrixFree, which is a class that
from the perspective of PETSc looks like a matrix, but implements its
own matrix-vector product. You'll have to derive your own class from
PETScWrappers::MatrixFree where you implement the vmult() function by
calling the vmult() function of the LinearOperator object you have.
Best
W.