I have a user elemnt in feap for which I tried to extrapolate strees from Gauss points to the nodes the plot is nonsense ,however i compare it with another user elemnets I have known it and the s and p are calculated right and also the stresses and strains comes to this sub routine rightly I wonder where is the problem.
subroutine nSE_ProjStre(ix,xl,sig,eps,nes,nel,nqp,p,s,se)
implicit none
include 'strnum.h'
include 'cdata.h'
integer :: ix(*)
integer :: nes,nel
integer :: nqp
double precision :: sig(nes,*)
double precision :: eps(3,*)
double precision :: p(*),det,detx
double precision :: s(nen,*)
double precision :: se(nen)
double precision :: xsj,xg
double precision :: qdp(nqp,2+1)
double precision :: XIvec(2)
integer, parameter :: ndm = 2
double precision :: shp(nel,nen),shpx(3,nel),shpxi(3,nel)
double precision :: xl(ndm,nen)
integer :: i,iqp
call nSetQuadPt(qdp)
p(1:4)=0.0d0
write(*,*)'p',p(1:4)
do iqp = 1,nqp
XIvec = qdp(iqp,1:ndm)
call SHP2D(XIvec ,xl, shpx, detx, ndm, nen, ix, .false.) ! N(x,y), N derv x, N derv y
do i = 1,nel
xg = shpx(3,i)*detx
p(i) = p(i) + xg
c! Stress projections
s(i,1) = s(i,1) + sig(1,iqp)*xg
s(i,2) = s(i,2) + sig(2,iqp)*xg
s(i,3) = s(i,3) + sig(3,iqp)*xg
c! Strain projections
s(i, 4) = s(i, 4) + eps(1,iqp)*xg
s(i, 5) = s(i, 5) + eps(2,iqp)*xg
s(i, 6) = s(i, 6) + eps(3,iqp)*xg
end do
end do
write(*,*)'s',s(1,1:6)
write(*,*)'p',p(1:4)
iste=6
end subroutine
Its is worthy to mention that after calling the strees in the case of Isw==8 I call this subroutine with
call nSE_ProjStre(ix,xl,spkv,glsv,nes,nel,nqp,p,s,se)