mment">% nodes associated with MP</span>
0036    nn  = length(nIN);                                                       <span class="comment">% number of nodes influencing the MP</span>
0037    Svp = mpData(mp).Svp;                                                    <span class="comment">% basis functions</span>
0038    fp  = (mpData(mp).mpM*grav + mpData(mp).fp)*Svp;                         <span class="comment">% material point body &amp; point nodal forces</span>
0039    ed  = repmat((nIN-1)*nD,nD,1)+r