Dear all,<div>    I hope you&#39;re having a nice weekend. I&#39;m still using this program to solve Poisson Equations. After several discussions before, I know how to use it in general. However, I met a problem when I want to use it twice to solve a same Poisson Equations with two different RHS.(same boundary conditions)</div>
<div>1) after I&#39;ve done my first computation of a Poisson equation, I use DMMGSetKSP() again setting up another (*rhs) . </div><div>    However, I found that this DMMGSetKSP does not call the function that makes the new (*rhs), i.e. ComputeNewRHS(). </div>
<div>2) In the first tempt to solve the Poisson equation with old RHS, DMMGSetKSP called the function making the old (*rhs). If I comment out the first DMMGSetKSP(), which creates the old (*rhs), then this DMMGSetKSP, which create the new (*rhs), can call the function making the new (*rhs)</div>
<div>2) I read the manual of &quot;DMMGSetKSP&quot; saying <span class="Apple-style-span" style="font-family: &#39;Times New Roman&#39;; background-color: rgb(255, 255, 255); font-size: medium; "><b>For linear problems may be called more than once, reevaluates the matrices if it is called more than once. Call <a href="http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-3.1/docs/manualpages/DMMG/DMMGSolve.html#DMMGSolve">DMMGSolve</a>() directly several times to solve with the same matrix but different right hand sides.</b> </span>Does this mean that I do not need to call DMMGSetKSP if I need to solve the same Poisson equation with another RHS? If so, how can I pass my new RHS to dmmg?</div>
<div><br></div><div>thanks in advance, </div><div>Alan</div><div><br></div>