[petsc-users] Jacobian construction, DA vs Plex

Tobin Isaac tisaac at ices.utexas.edu
Mon Jul 7 13:28:04 CDT 2014


On Mon, Jul 07, 2014 at 05:43:48PM +0200, Matthew Knepley wrote:
> On Mon, Jul 7, 2014 at 5:36 PM, Tobin Isaac <tisaac at ices.utexas.edu> wrote:
> 
> >
> > Hi,
> >
> > If I have a pointwise Jacobian function f, I know that I can call
> > DMGetDS() and pass f to PetscDSSetJacobian(), and that f will be used
> > by PetscFEIntegrate() and thus by DMPlexSNESComputeJacobianFEM().  It
> > looks like PetscFEIntegrate() is only used by plex and not da.  Is
> > there anyway that I can use f to construct a Jacobian with a da
> > object?
> >
> 
> There is a completely untested way. My idea is that the DA is able to give
> back
> cell closures the same way that Plex does, making all the FEM code work just
> as it does in the unstructured case. There are a few toy tests of this
> functionality
> in src/dm/impls/plex/examples/tests/ex3.c. I have not made a thoroughgoing
> example which switches between Plex and DA, but it should be possible. Let
> me know if it fails.
> 
> All this DA code which does not assume a vertex discretization is activated
> by
> giving it a default section.
> 
>   Thanks,
> 
>      Matt

Thanks, Matt. I see the cell loop in DMDAComputeL2Diff(), and it looks
similar enough to the plexfem.c cell loops that I could adapt
DMPlexSNESComputeJacobianFEM() if I wanted to.

  Toby

> 
> 
> >   Toby
> >
> -- 
> 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: Digital signature
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140707/2fbf59c2/attachment.pgp>


More information about the petsc-users mailing list