[petsc-users] Modify RHS values at each iteration
Zou (Non-US), Ling
ling.zou at inl.gov
Thu Jan 2 16:14:00 CST 2014
Hi Jed. I have a similar situation here. I am intentionally testing an
iterative method. It requires me to do some handling (for example copying
the current solution vector out) right after a nonlinear iteration is
finished, but before anything happening of the next nonlinear iteration. Is
there any way to do so?
Best,
Ling
On Thu, Nov 21, 2013 at 5:41 AM, Jed Brown <jedbrown at mcs.anl.gov> wrote:
> TAY wee-beng <zonexo at gmail.com> writes:
>
> > Hi Jed,
> >
> > I need a solve a Poisson equation, which is part of my finite volume CFD
> > code.
> >
> > The RHS terms are calculated from the velocity.
> >
> > In the standard mtd, the RHS terms are calculated from the velocity,
> > which then solves the Poisson eqn to get the pressure.
> >
> > Now, to improve the accuracy of the pressure obtained, a paper suggested
> > obtaining the pressure from the velocity in 1 iteration. Then use the
> > new pressure for the momentum eqn to get a more accurate intermediate
> > velocity. The RHS terms are recomputed again using the new velocity,
> > which is then used to calculate the new pressure. This cycle goes on
> > until the pressure converges to a certain value.
>
> This is a crude iterative method for solving a coupled problem. I
> recommend that you solve the coupled problem. See the section of the
> user's manual on solving block problems, and the examples in PETSc that
> solve Stokes-type problems.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140102/03542138/attachment.html>
More information about the petsc-users
mailing list