[petsc-users] Gradient in DMProjectField

Matthew Knepley knepley at gmail.com
Tue Sep 12 14:26:41 CDT 2017


On Tue, Sep 12, 2017 at 12:52 PM, Maximilian Hartig <
imilian.hartig at gmail.com> wrote:

> Hello,
>
> in my attempt to use an incremental formulation for elastoplasticity I
> wanted to create an auxiliary field in which the stresses from the past
> tilmestep are stored. I managed to create an auxiliary DM on which I have a
> field for the displacement, one for the stress and one for the inner
> variables. I transfer the displacements to a global vector on the auxiliary
> field, then calculate the stresses and inner variables using the
> DMProjectField function. Transfer of the displacements works fine and they
> are correct. The problem is with the stresses. While on some gauss points I
> get the correct stress, others have random stresses. I construct the strain
> using the gradient of the displacements and I believe this is where the
> problem lies. However, I have not been able to pinpoint it.
> When I just transfer the displacements to the auxiliary fields and then
> use a_x in the residual function instead, the stresses are correct. Is
> there a trick with using u_x in the DMProjectField?
>

Its possible that there is a bug. Just so I understand, you are saying that
DMProjectField() has the wrong gradient of the input Vec?
It would really be great if you could demonstrate it with a standalone
example.

  Thanks,

    Matt


> Thanks,
> Max




-- 
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

http://www.caam.rice.edu/~mk51/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20170912/6279f5a1/attachment.html>


More information about the petsc-users mailing list