[petsc-users] Where can I learn about combining grids for a Laplacian

Jed Brown jed at jedbrown.org
Sun Sep 7 20:06:44 CDT 2014


"Alletto, John M" <john.m.alletto at lmco.com> writes:

> I have a 3D Laplacian program that I wrote in matlab that I would like to transition to PETSc.
>
> In my current program I have an inner cube which utilizes a 27 point uniform stencil
> surrounded by an outer cubical which uses a smaller stencil on a variable grid.
>
> I require the inner cubical to contain accurate results and do not care if error accumulates in the outer regions.

This is not how elliptic PDEs work.  In general, you need accuracy
throughout the domain to have an accurate solution in a desired area.
Depending on the coefficients and forcing function, you might get away
with adaptive resolution, but you can't naively lay down a fine
mesh/accurate discretization in the target area and expect to get an
accurate solution.

Now if you had, for example, isotropic coefficients in most of the
domain, but anisotropic tensor-valued coefficients in a region, you
could use a stencil that is (necessarily) 27-point in the anisotropic
region and reduces to 7-point elsewhere.  For that, you could
preallocate a matrix with the exact number of nonzeros that will be
needed, though I recommend starting with the 27-point case and only
optimize later if it will provide a clear benefit.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140907/b8cc20be/attachment.pgp>


More information about the petsc-users mailing list