<div class="gmail_quote">On Sun, Apr 22, 2012 at 16:21, TAY wee-beng <span dir="ltr"><<a href="mailto:zonexo@gmail.com">zonexo@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000"><div class="im">
<br>
On 22/4/2012 10:02 PM, Matthew Knepley wrote:
<blockquote type="cite">
<div class="gmail_extra">On Sun, Apr 22, 2012 at 3:55 PM, TAY
wee-beng <span dir="ltr"><<a href="mailto:zonexo@gmail.com" target="_blank">zonexo@gmail.com</a>></span>
wrote:<br>
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000"> Hi, <br>
<br>
I changed the vs2008 and linux source code to
VecView(x,PETSC_VIEWER_STDOUT_WORLD,ierr) but the results
for both outputs are 0 and 0.0416667 (except for one value
which is 0.0833333) respectively.</div>
</blockquote>
<div><br>
</div>
<div>It looks to me like there is a bug in KSPSetUp().
The DMKSPGetContext() is returning a null struct,</div>
<div>so the RHS is never formed, and the Mat is formed by the
default call to DMComputeJacobian. What</div>
<div>is intended here with KSPDM?</div>
</div>
</div>
</blockquote></div>
Hi,<br>
<br>
So is there a way to fix the bug? What can be done to get it
working? Is this the only fortran example which solve the laplacian
equation using multigrid ?<br></div></blockquote><div><br></div><div>I'm working on it now, will report back when it's fixed. I normally recommend src/snes/examples/tutorials/ex5f.F, even for linear problems.</div>
</div>