[petsc-dev] finite element energy functions

Jed Brown jedbrown at mcs.anl.gov
Mon Dec 2 17:01:30 CST 2013


Matthew Knepley <knepley at gmail.com> writes:

> When you and Peter changed the way SNES used to work, I asked you how I
> should
> change Plex. You told me to do this:
>
>     ierr = DMSNESSetFunctionLocal(dm,  (PetscErrorCode
> (*)(DM,Vec,Vec,void*)) DMPlexComputeResidualFEM, &user);CHKERRQ(ierr);
>     ierr = DMSNESSetJacobianLocal(dm,  (PetscErrorCode
> (*)(DM,Vec,Mat,Mat,MatStructure*,void*)) DMPlexComputeJacobianFEM,
> &user);CHKERRQ(ierr);

Can you find the email?  I don't think I would have recommended this.

> which I did. Moreover, this is how it always worked, namely specifying the
> local function.
> What exactly are you proposing to replace this?

DMPlexSNESSetFunctionFEM(), similar to DMDASNESSetFunctionLocal in
src/snes/examples/tutorials/ex5.c and ex19.c.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20131202/a10bffcf/attachment.sig>


More information about the petsc-dev mailing list