On Fri, Nov 22, 2013 at 6:25 PM, Geoffrey Irving <[email protected]> wrote:
> On Fri, Nov 22, 2013 at 4:17 PM, Jed Brown <[email protected]> wrote: > > Geoffrey Irving <[email protected]> writes: > >> Here are results with -ksp_monitor_true_residual -pc_type none: > >> > >> http://naml.us/random/laplace-rtol.txt # with -ksp_rtol 1e-5 > >> http://naml.us/random/laplace-atol.txt # with -ksp_atol 1e-5 > > > > Looks like the preconditioner is singular. > > The preconditioner is none: -pc_type none. > > >> Both versions converge in 3 iterations for the first SNES iteration, > >> but the relative one starts to churn after that since the residual > >> starts very small. The true residual goes down to 4/3 and stagnates. > >> Is there a convenient way to print out the RHS to see whether it has a > >> component in the nullspace (which seems likely given the true residual > >> stagnation)? > > > > -snes_monitor_residual will plot the solution. (This option should be > > upgraded to support arbitrary output formats.) You can also call > > VecView from your residual function. > > > >> I suppose I already do print the result of SNESComputeFunction on the > >> zero vec, which is > >> > >> RHS = [ 6.66666667e-01 1.33333333e+00 6.66666667e-01 > 1.11022302e-16] > > > > Looks like you need to project out the null space. > > Yep, I was hallucinating that analytically consistent implies > discretely consistent. > > Is there a standard way to do this in the context of an SNES, where > I'm not computing the residual directly myself? Should I write a > wrapper around DMPlexComputeResidualFEM and pass the wrapper to > DMSNESSetFunctionLocal, or is there a way to tell SNES about the > nullspace directly? Is such a projection happening somewhere in snes > ex12? > SNES will do it automatically. You can just call MatNullSpaceRemove(). Matt > Thanks, > Geoffrey > -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener
