[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question regarding PCMG



With regards to the first problem I had, I was misinterpreting how
the function PCApply should work. I had assumed that you could pass
in an initial vector x_init to the PCApply by calling PCApply(x, x_init) and have x_init
rewritten by the result. Unfortunately this is not the correct way to do things
in PETSc and I have figured out a way to use the KSPRichardson context
for the stationary solver I have coded as my own PC object.


For the second problem, the fix for the first problem will avoid it since I
will no longer be trying to use the KSPPreonly but the KSPRichardson.

Thank you very much for your help, Mr. Knepley!

Sincerely,

-Tsuyoshi Koyama

----- Original Message ----- From: "Matthew Knepley" <knepley@xxxxxxxxx>
To: <petsc-users@xxxxxxxxxxx>
Sent: Tuesday, August 14, 2007 3:02 PM
Subject: Re: Question regarding PCMG



On 8/13/07, TsuyoshiKoyama(berkeley) <tkoyama@xxxxxxxxxxxx> wrote:
As for the second case, the reason I might not select a coarse solver is
since I
am trying to solve a Helmholtz equation and the coarse grid solve might not
be
correct enough to apply. Thus, you may just point out that the coarse grid
should
be large enough to resolve the so called low frequency error and that if you
do so
you should still be able to solve direct, but I was curious on testing
different types
of operations at the coarsest level.

The coarse solver can be set to anything you choose. You just extract the coarse KSP and set the type.

 Thanks,

   Matt

--
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