[petsc-users] ksppreonly question

Shao-Ching Huang huangsc at gmail.com
Fri Sep 21 17:15:56 CDT 2012


Diffusion term from incompressible Navier Stokes equation. Is that
what you are asking?

Thanks.

On Fri, Sep 21, 2012 at 3:14 PM, Matthew Knepley <knepley at gmail.com> wrote:
> On Fri, Sep 21, 2012 at 5:13 PM, Shao-Ching Huang <huangsc at gmail.com> wrote:
>>
>> Thanks. A1 is part of the Laplacian operator discretized by finite
>> volume method on non-Cartesian mesh.
>
>
> That is not very specific. Can you be more specific?
>
>   Matt
>
>>
>> On Fri, Sep 21, 2012 at 3:09 PM, Matthew Knepley <knepley at gmail.com>
>> wrote:
>> > On Fri, Sep 21, 2012 at 2:45 PM, Shao-Ching Huang <huangsc at gmail.com>
>> > wrote:
>> >>
>> >> Hi
>> >>
>> >> I am trying to write the procedure of a legacy code in PETSc (for
>> >> comparison purposes). Instead of solving the system "Ax = b", the
>> >> legacy code iterates on something like:
>> >>
>> >> A1*x(n+1) = b - A2*x(n)
>> >>
>> >> where A=A1+A2 and "n" is the iteration index. It seems to me that I
>> >> need to use ksppreonly
>> >>
>> >>
>> >> (http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/KSP/KSPPREONLY.html).
>> >
>> >
>> > This kind of splitting is common. PETSc has Richardson, Jacobi, SOR that
>> > do
>> > this. What
>> > are the matrices A1 and A2?
>> >
>> >    Matt
>> >
>> >>
>> >> My question is: how do I update the right-hand-side, b - A2*x(n),
>> >> after every iteration using PETSc API?
>> >>
>> >> Thanks.
>> >>
>> >> Shao-Ching
>> >
>> >
>> >
>> >
>> > --
>> > 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
>
>
>
>
> --
> 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