%--------------------------------------------------------------------------
% ELEMENT.N_MAT
%--------------------------------------------------------------------------
% Computation of the shape function at the integration points.
%--------------------------------------------------------------------------
% Syntax
%--------------------------------------------------------------------------
N = N_MAT(EL1,elem_type,gp)
N = ELEMENT.N_MAT(EL1,elem_type,gp)
%--------------------------------------------------------------------------
% Description
%--------------------------------------------------------------------------
% The N_MAT method of the ELEMENT class is used to compute the shape
% function 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 : 1 node point FE (2D)
% - BEAM : 2 node line FE (2D)
% - TIMO : 3 node triangle FE (2D and 3D)
% - FLI : 6 node triangle FE (2D)
% - FLIG : 4 node quadrilateral FE (2D)
% - FCQ : 4 node tetrahedron FE (3D)
% - T3G : 4 node tetrahedron 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
%--------------------------------------------------------------------------
% N : scalar, vector, matrix - shape function evaluated at the
% integration points. It has the following structure:
% - N(:,1) : shape function of the first node evaluated at all
% integration points
% - .
% - .
% - .
% - N(:,n) : shape function of the nth node evaluated at all
% integration points
%--------------------------------------------------------------------------
% Example
%--------------------------------------------------------------------------
% Case of a TRI3 ELEMENT. gp is:
gp
gp =
0 0
% Then, N is:
N
N =
1 0 0
% 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:
N
N =
0.6220 0.1667 0.0447 0.1667
0.1667 0.6220 0.1667 0.0447
0.1667 0.0447 0.1667 0.6220
0.0447 0.1667 0.6220 0.1667