# SsjoudGrbrTalaPnktis.m
function SF=SsjoudGrbrTalaPnktis(VardaNr,X,AlgPar,lvarras,esFjoud,esQkoormus,suurused)
# 
# computed a internal forces for Gerber's beam at  x=X
#
##=========================================================================
## This Program is written by Andres Lahe,    2010-07-16
##                    e-mail: andres.lahe@ttu.ee
## LAST MODIFIED: Andres Lahe,    2010-08-03
## Copyright (c)  2010  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
##========================================================================= 
#
i=VardaNr;
xx=X;
##%%%%%%%%
vvF=zeros(2,4);
qkoormus=zeros(1,3);
Fjoud=zeros(1,2);
vvB=zeros(2,1);
#     "              "
Li=lvarras(i,1);
Fjoud=esFjoud(:,1:2,i);
qkoormus=esQkoormus(:,1:3,i);
AP=AlgPar(i,:)';
##%%%%%%%%%%
vvF=ylSTfhlin(xx);
#
vvB=ESTSTKrmus(xx,Li,Fjoud,qkoormus);
Fvv(:,1)=vvF*AP+vvB; 
##  %9.2f %9.2e
disp(sprintf('%22s %2i %5s  %6.6f   ', 'The forces of element nr',VardaNr,' at x =', X))
#disp(sprintf('%15s %2i %9s  %6.6f   ', 'The force of element nr',VardaNr,' at x =', X)
#
#for i=1:2 
#disp(sprintf('%14s %9.5e   ',suurused(i,:), Fvv(i,1)))
#endfor
#
for i=1:2 
disp(sprintf('%14s %9.3f   ',suurused(i,:), Fvv(i,1)))
endfor
#
#disp('------------------')
#
SF=Fvv(:,1);
#
endfunction
