[petsc-users] Gradient in DMProjectField

Maximilian Hartig imilian.hartig at gmail.com
Tue Sep 12 11:52:40 CDT 2017


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?

Thanks,
Max


More information about the petsc-users mailing list