Schur complement system
Matthew Knepley
knepley at gmail.com
Sun Mar 9 17:47:59 CDT 2008
On Sun, Mar 9, 2008 at 3:25 PM, Kathrin Burckhardt
<tribur at vision.ee.ethz.ch> wrote:
> Hi Matt,
>
> 1. Where do I integrate the application of the Schur system using
> MATSHELL? Can I use KSP?
Here is a sketch:
MatShellSetLOperation(S, MATOP_MULT, myApply);
PetscErrorCode myApply(Mat S, Vec x, Vec y) {
<Get temp vectors, matrices, and KSP from shell context>
MatMult(B, x, tmp1);
KSPSetOperators(ksp, A, A);
KSPSolve(ksp, tmp1, tmp2);
MatMultTranspose(B, tmp2, y);
}
> 2. I already have the local Schur complements computed. Is it advisable
> to once setup the global Schur matrix using MATIS and then use KSP,
> instead of the application of the Schur complement, i.e. the two
> MatMult() and the KSPSolve(), at each iteration?
It depends on how dense the Schur complement is.
Matt
> Thank you,
> Kathrin
>
>
> > Yes, you can certainly solve this system. Normally, you would just create a
> > simple MATSHELL to apply the Schur complement, which does two MatMult()s
> > and one KSPSolve(). We are integrating specific support for this, but it will
> > not be released until the summer I think.
> >
> > Thanks,
> >
> > Matt
> >
> > On Fri, Mar 7, 2008 at 5:50 AM, Kathrin Burckhardt
> > <tribur at vision.ee.ethz.ch> wrote:
> >> Dear nice people,
> >>
> >> Did you ever try to solve a Schur complement system using PETSc?
> >>
> >>
> >
> >
> >
> >
>
>
--
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which
their experiments lead.
-- Norbert Wiener
More information about the petsc-users
mailing list