%--------------------------------------------------------------------------
% ELEMENT.dN_MAT
%--------------------------------------------------------------------------
% Computation of the derivatives of the shape function at the integration
% points.
%--------------------------------------------------------------------------
% Syntax
%--------------------------------------------------------------------------
dN = dN_MAT(EL1,elem_type,gp)
dN = ELEMENT.dN_MAT(EL1,elem_type,gp)
%--------------------------------------------------------------------------
% Description
%--------------------------------------------------------------------------
% The dN_MAT method of the ELEMENT class is used to compute the derivatives
% of the shape functions at the integration points.
%--------------------------------------------------------------------------
% Input arguments
%--------------------------------------------------------------------------
% EL1 : ELEMENT object
% elem_type : STRING describing the type of finite element when a specific
% kinematics is used. It can be equal to:
% - TRUSS : truss element
% - BEAM : standard Euler Bernouilli beam element
% - TIMO, FLI : standard Timoshenko beam element (multifiber
% formulation)
% - FLIG : standard Timoshenko beam element (generalized
% formulation)
% - FCQ : quadratic beam element
% - T3G : T3 - gamma formulation shell FE (3D)
% gp : scalar, vector, matrix - description of the local coordinates
% of the integration points. gp is structured as follows:
% - gp(:,1) : first coordinate of the integration points
% - gp(:,2) : second coordinate of the integration points
% - gp(:,3) : third coordinate of the integration points
%--------------------------------------------------------------------------
% Output arguments
%--------------------------------------------------------------------------
% dN : scalar, vector, matrix - derivative of the shape functions
% evaluated at the integration points. It has the following
% structure:
% - r2 = ngp * nvar - npg stands for the number of
% integration points and nvar stands for the number of local
% variables describing the shape functions (1, 2 or 3)
% - if nvar equal to 1:
% - dNr(1:1:r2,n) : derivative of the shape function
% related to the node n with respect to the first
% variable evaluation
%
% - if nvar equal to 2:
% - dNr(1:2:r2,n) : derivative of the shape function
% related to the node n with respect to the first
% variable evaluation
% - dNr(2:2:r2+1,n) : derivative of the shape function
% related to the node n with respect to the second
% variable evaluation
%
% - if nvar equal to 3:
% - dNr(1:3:r2,n) : derivative of the shape function
% related to the node n with respect to the first
% variable evaluation
% - dNr(2:3:r2+1,n) : derivative of the shape function
% related to the node n with respect to the second
% variable evaluation
% - dNr(3:3:r2+2,n) : derivative of the shape function
% related to the node n with respect to the third
% variable evaluation
%--------------------------------------------------------------------------
% Example
%--------------------------------------------------------------------------
% Case of a QUA4 ELEMENT. gp is:
gp
gp =
-0.5774 -0.5774
0.5774 -0.5774
-0.5774 0.5774
0.5774 0.5774
% Then, N is:
dN
dN =
-0.3943 0.3943 0.1057 -0.1057
-0.3943 -0.1057 0.1057 0.3943
-0.3943 0.3943 0.1057 -0.1057
-0.1057 -0.3943 0.3943 0.1057
-0.1057 0.1057 0.3943 -0.3943
-0.3943 -0.1057 0.1057 0.3943
-0.1057 0.1057 0.3943 -0.3943
-0.1057 -0.3943 0.3943 0.1057