On Sun, Apr 22, 2012 at 16:21, TAY wee-beng <zonexo at gmail.com> wrote:
> > On 22/4/2012 10:02 PM, Matthew Knepley wrote: > > On Sun, Apr 22, 2012 at 3:55 PM, TAY wee-beng <zonexo at gmail.com> wrote: > >> Hi, >> >> 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. >> > > It looks to me like there is a bug in KSPSetUp(). The DMKSPGetContext() > is returning a null struct, > so the RHS is never formed, and the Mat is formed by the default call > to DMComputeJacobian. What > is intended here with KSPDM? > > Hi? > > 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 ? > 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. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120422/0f3ec1ea/attachment.htm>
