[petsc-users] ksp/dmmg laplace examples

Jed Brown jed at 59A2.org
Wed Jul 28 10:27:35 CDT 2010


On Wed, 28 Jul 2010 13:08:59 +0100, Darach Golden <darach at tchpc.tcd.ie> wrote:
> In each of the examples above, the linear system to be solved seems to
> contain entries for the total number of nodes (including boundary
> nodes), with rows associated with boundary nodes containing values on
> the diagonal only (in the Dirichlet case).  Is this correct?

Yes.  For simple problems, especially on unstructured grids these nodes
can be eleminated, but they are usually left in for structured grids or
for hybrid conditions or conditions that change over time.

> It's these diagonal matrix values that are confusing me:

Note that you can scale this any way you like and you will get the same
solution.  The problem is volume weighted (somewhat important for
geometric multigrid, happens automatically with FEM) and the boundary
conditions are scaled to produce similar diagonal entrios to nearby
nodes.  To explain the exact values, note that Laplace produces diagonal
entries of magnitude

  2 d h^d \sum_{i=1}^d 1/h_d^2

in d dimensions.  See src/snes/examples/tutorials/ex48.c for a nonlinear
vector problem in a finite element context.

Jed


More information about the petsc-users mailing list