[petsc-users] Using /src/ksp/ksp/example/tutorial/ex29.c to solve Poisson Equation Twice

Alan Wei zhenglun.wei at gmail.com
Mon Oct 3 12:00:56 CDT 2011


Dear all,
    I still have the problem. >_<
    I can not find the DMMG interface provided to change the RHS, mentioned
by Dr. Smith. The only thing I have is DMMGSetKSP(). It is
DMMGSetKSP(dmmg,ComputeRHS,ComputeMatrix).When I use it first time in this
example, it calls both ComputeRHS and ComputeMatrix (I assert some print-out
probes inside these two functions). However, If I use it again, it just does
not call the new one; rather, it calls the old one.
     My code is attached. Could you please help me to fix this problem ^_^.

best,
Alan

On Sun, Oct 2, 2011 at 5:52 PM, Alan Wei <zhenglun.wei at gmail.com> wrote:

> In this example, i recalled the ComputeRHS.
>
> Alan
>
>
> On Sun, Oct 2, 2011 at 5:22 PM, Jed Brown <jedbrown at mcs.anl.gov> wrote:
>
>> On Sun, Oct 2, 2011 at 16:31, Alan Wei <zhenglun.wei at gmail.com> wrote:
>>
>>> BTW, what is the DMMG interface you are talking about? is it
>>> DMMGSetKSP()?
>>
>>
>> Every object and function containing "DMMG" will be removed. (I don't
>> think we've decided on a precise timeline, but don't write new code that
>> uses DMMG.)
>>
>>
>>> if so, that's is my problem. At the 2nd time of using DMMGSetKSP() in the
>>> main function, it does not call the __function__ to compute the right hand
>>> side. >_< any suggestions on that?
>>
>>
>> What function is being called?
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20111003/67f31963/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Ex29.zip
Type: application/zip
Size: 12206 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20111003/67f31963/attachment.zip>


More information about the petsc-users mailing list