function spvF=ysplvfmhvII(baasi0,S,x,l,EA,GAr,EJ)
# computed asparse fransfer matrix ̂IU=(I*Zp-U*Zv=Z0, 
# Zp'=[Up Wp Fip Sp Hp Mp]) of the second order analysis
# for a frame (Sign Convention 2), 
# Zp=F*Zv, Zp'=[Up Wp Fip Sp Hp Mp]
#  where
#  EA - axial stiffness of the element
#  GAr - shear stiffness of the element
#  EJ - bending stiffness of the element
#  l - length of member
#  baasi0 -- scaling multiplier for the displacements (i = EJ/l)
#  S - axial force
#
##=========================================================================
## This Program is written by Andres Lahe,   2009-02-13
##                    e-mail: andres.lahe@ttu.ee
## LAST MODIFIED: Andres Lahe,    2010-03-12
## Copyright (c)  2009 by Tallinn University of Technology 
##                Department of Mechanics
##                http://www.ttu.ee/
##
## This program is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License
## as published by the Free Software Foundation; either version 2
## of the License, or (at your option) any later version.

## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
## GNU General Public License for more details.

## You should have received a copy of the GNU General Public License
## along with this program; if not, write to the Free Software
## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
## http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
##=========================================================================
#
#
#l=x;
#lp=l;
#
#vF=zeros(6,12);
spvF=sparse(6,12);
#vI=eye(6);
spvI=speye(6);
#vI(1,1)=vI(1,1); # ei ole baas0 korrutatud.
#vI(2,2)=vI(2,2);
#vI(3,3)=vI(3,3);
#spvI=speye(3);
#vF=InsertBtoA(vF,6,12,1,1,vI,6,6);
spvF=spInsertBtoA(spvF,1,1,spvI);
#vU=-ylfmhvII(baasi0,S,x,l,EA,GAr,EJ);
spvU1=ysplfmhvII(baasi0,S,x,l,EA,GAr,EJ);
spvU=spvU1.*(-1);
#vF=InsertBtoA(vF,6,12,1,7,vU,6,6);
spvF=spInsertBtoA(spvF,1,7,spvU);
#
endfunction

