Then sigmaij has the ij component of the stress tensor projected on the finite element space defined in mft. If mft is a Lagrangian FEM the values of sigmaij will correspond to the nodes of mft. The projection from gauss points to the finite element space is as Yves mentioned some kind of averaging.

Thanks a lot for your reply. I am not sure what you mean there. I have gone through the example and they calculate Von Mises Stress but there is already a function for that. Could you please tell me which physical quantity or _expression_ is being interpolated in that example so that I can use it as a basis for my pressure calculation. It would be really helpful if you would elaborate a bit on the usage and the example for calculating any _expression_ as I am quite new to fem and getfem. Thanks a lot.

There is no specific function for that, but you can use the
interpolation facilities of the model object. You can see an
example of use for instance in the
demo_thermo_elasticity_electrical_coupling example which has a
python, Matlab, Scilab and C++ version. You can interpolate any
_expression_. Be aware that the stress being discontinuous across
the element edges/faces, the value will be averaged.

Regards,

Yves

Le 25/01/2017 à 06:08, samyak jain a écrit :

Dear getfem-users,

I have started using getfem recently to work on few contact
problems between elastic bodies.

I am able to solve few simple cases and I am able to
compute displacement (u) and Von-Mises/Tresca values on my
mesh nodes.

The problem I am facing is that I have to calculate
pressure at the mesh points and for that I believe I need the
stress tensor values at these discrete mesh points. Could
someone please guide me or tell me how to get the value of
these variables. I went through the documentation and checked
everywhere but I couldn't find a way to calculate stress
tensor/pressure.