%--------------------------------------------------------------------------
% ELEMENT.STRAIN_ELEM
%--------------------------------------------------------------------------
% Computation of the strains at each integration point of a unique ELEMENT.
%--------------------------------------------------------------------------
% Syntax
%--------------------------------------------------------------------------
out = STRAIN_ELEM(EL1,MO1,IR,ed)
out = STRAIN_ELEM(EL1,MO1,IR,ed,cara)
out = ELEMENT.STRAIN_ELEM(EL1,MO1,IR,ed)
out = ELEMENT.STRAIN_ELEM(EL1,MO1,IR,ed,cara)
%--------------------------------------------------------------------------
% Description
%--------------------------------------------------------------------------
% The STRAIN_ELEM method of the ELEMENT class is used to compute the
% strains at each integration point.
%--------------------------------------------------------------------------
% Input arguments
%--------------------------------------------------------------------------
% EL1 : ELEMENT object
% MO1 : MODEL object related to the ELEMENT object EL1
% IR : INT_RULE object describing the integration rule
% ed : scalar, vector - description of the nodal displacements. ed
% is structured as follows:
% - ed = [dof1_1
% .
% .
% .
% dof1_n
% dof2_1
% .
% .
% .
% dof2_n
% .
% .
% . ];
% with dofi_j stands for the value of the jth degree of freedom
% at node i.
%
% cara : struct - description of the material parameters related to
% the ELEMENT object EL1.
%--------------------------------------------------------------------------
% Output arguments
%--------------------------------------------------------------------------
% out : scalar, vector, matrix - out(i,:) is the strain vector
% evaluated at the integration point i
%
%--------------------------------------------------------------------------
% Example
%--------------------------------------------------------------------------
% Case of a QUA4 ELEMENT.
cara =
rho: {[0] [0] [0] [0]}
alpha: {1x4 cell}
visq: {[1] [1] [1] [1]}
epai: {[1] [1] [1] [1]}
youn: {1x4 cell}
nu: {[0.2000] [0.2000] [0.2000] [0.2000]}
out = STRAIN_ELEM(EL1,MO1,IR,ed)
out =
1.0e-07 *
0.0198 -0.1443 0 -0.0202
0.0053 -0.1443 0 -0.0466
0.0198 -0.1179 0 -0.0057
0.0053 -0.1179 0 -0.0321