## SisejoudTalaPunktis.m
function SF=SisejoudTalaPunktis(VardaNr,X,AlgPar,lvarras,selem,esFjoud,esQkoormus,suurused)
## The forces of beam, ElementNr, at x = X
##=========================================================================
## This Program is writtwn 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
##===========================================================================
#
#if nargin != 8
if ~(nargin==8)
error(' function SisejoudTalaPunktis have wrong number of input arguments!') 
endif
#%%%%%%%%%%%%%%%%%
i=VardaNr;
xx=X;
#%%%%%%%%%%
vvF=zeros(4,8);
qkoormus=zeros(1,3);
Fjoud=zeros(1,2);
vvB=zeros(4,1);
#
    EI=selem(i,9);   # from topology
    GAr=selem(i,10);  #    "      "
Li=lvarras(i,1);
Fjoud=esFjoud(:,1:2,i);
qkoormus=esQkoormus(:,1:3,i);
AP=AlgPar(i,:)';
#%%%%%%%%%%%
vvF=ylTfhlin(1.0,xx,GAr,EI); 
#%vvB=yzThqz(1.0,xx,qz,EI); 
#%vvFz=yzTfzv(1.0,xx,aLx,Fz,EI);
vvB=ESTtalaKrmus(1.0,xx,Li,Fjoud,qkoormus,EI);
Fvv(:,1)=vvF*AP+vvB; #%+vvFz;
#%  %9.2f %9.2e
disp(sprintf('%15s %2i %9s  %4.6f   ', 'Forces of element',VardaNr,' at x =', X))
#
for i=1:2 
disp(sprintf('%14s %9.5e   ',suurused(i,:), Fvv(i,1)))
endfor
#
for i=3:4 
disp(sprintf('%14s %9.5f   ',suurused(i,:), Fvv(i,1)))
endfor
#
#disp('------------------')
#
SF=Fvv(:,1);
#
endfunction
