On Mon, Jul 07, 2014 at 05:43:48PM +0200, Matthew Knepley wrote:
> On Mon, Jul 7, 2014 at 5:36 PM, Tobin Isaac <[email protected]> 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

Attachment: signature.asc
Description: Digital signature

Reply via email to