


NORMALIZECONSTRAINTS [G_mn]= normalizeconstraints( pR_mg )
Calculates the G_mn matrix from the Jacobian of the
multi point and rigid constraints R_mg
G_mn = -inv(R_mm) * R_mn
where R_mg = [ R_mm R_mn ]
m dependent dof
n independent dof
g global dof g = m + n
Input: pR_mg pointer to R_mg matrix on data base
R_mg is the m x g matrix of constraints
Use m.R_mg in the calling script
Output: G_mn m x n normalized matrix of constraints in the workspace
Input from global workspace:
uset uset.pv_* partitioning vector
uset.*size size
*=n,m etc.
Called by sol101 (ms), Normalmodes (ms), sol159 (ms) (all solution sequences)
Calls IMdb (mex)
where ms= m-script, mf= m-function, mex= executable function (c-code)
uset.pv_m and uset.pv_n partitioning indicees are with respect to the g- set
R_mg is the matrix (Jacobian) of constraints from MPCs and rigid elements,
with m rows and g columns. The m constraint equations are used to eliminate m
dof out of g dof leaving n dof . The normalized constraint matrix G_mn
is needed for later elimination, partition and merge operations.

0001 function [G_mn]= normalizeconstraints( R_mg ,uset); 0002 % NORMALIZECONSTRAINTS [G_mn]= normalizeconstraints( pR_mg ) 0003 % 0004 % Calculates the G_mn matrix from the Jacobian of the 0005 % multi point and rigid constraints R_mg 0006 % 0007 % G_mn = -inv(R_mm) * R_mn 0008 % 0009 % where R_mg = [ R_mm R_mn ] 0010 % 0011 % m dependent dof 0012 % n independent dof 0013 % g global dof g = m + n 0014 % 0015 % Input: pR_mg pointer to R_mg matrix on data base 0016 % R_mg is the m x g matrix of constraints 0017 % Use m.R_mg in the calling script 0018 % 0019 % Output: G_mn m x n normalized matrix of constraints in the workspace 0020 % 0021 % Input from global workspace: 0022 % 0023 % uset uset.pv_* partitioning vector 0024 % uset.*size size 0025 % *=n,m etc. 0026 % 0027 % Called by sol101 (ms), Normalmodes (ms), sol159 (ms) (all solution sequences) 0028 % Calls IMdb (mex) 0029 % where ms= m-script, mf= m-function, mex= executable function (c-code) 0030 % 0031 % uset.pv_m and uset.pv_n partitioning indicees are with respect to the g- set 0032 % 0033 % R_mg is the matrix (Jacobian) of constraints from MPCs and rigid elements, 0034 % with m rows and g columns. The m constraint equations are used to eliminate m 0035 % dof out of g dof leaving n dof . The normalized constraint matrix G_mn 0036 % is needed for later elimination, partition and merge operations. 0037 % 0038 0039 % Retrieve R_mg, partition, and calculate G_mn 0040 0041 if(uset.msize>0) 0042 0043 R_mm = R_mg(:, uset.pv_m); 0044 R_mn = R_mg(:, uset.pv_n); 0045 0046 G_mn= - inv(R_mm) * R_mn; 0047 0048 else 0049 0050 G_mn= []; 0051 0052 end