FORTRAN example for GET_RFLEX_NSTRAIN

 

C---- SUB. MODAL_FORCE

      SUBROUTINE MODAL_FORCE

     &          (ID,TIME,UPAR,NPAR,IFBODY,POS,VEL,ACC,

     &           NMODE,NNODE,NMODALLOAD,MODALLOADS,

     &           JFLAG,IFLAG,RESULT)

      implicit none

C---- TO EXPORT * SUBROUTINE

      !DEC$ ATTRIBUTES DLLEXPORT,C::MODAL_FORCE

 

C---- INCLUDE SYSTEM CALL

      INCLUDE 'SYSCAL.F'

 

      INTEGER ID, NPAR, IFBODY

      DOUBLE PRECISION TIME, UPAR(*), POS(12), VEL(6), ACC(6)

      INTEGER NMODE, NNODE, NMODALLOAD

      DOUBLE PRECISION MODALLOADS(6+NMODE, NMODALLOAD)

      LOGICAL JFLAG, IFLAG

      DOUBLE PRECISION RESULT[REFERENCE](6+NMODE)

 

common/Stress_Strain_result/ Stress144,Strain144,Stress144_3nref,

     &                              Strain144_3nref

double precision Stress144(11),Strain144(11)

double precision Stress144_3nref(11),Strain144_3nref(11)

 

C----USER STATEMENT

      INTEGER ierr,i

integer itemp,Node144SeqID, Node143SeqID, Node582SeqID

double precision StressShape144(6),StrainShape144(6)

 

call get_rflex_nodeseqid(ifbody,144,Node144SeqID,ierr)

call get_rflex_nodeseqid(ifbody,143,Node143SeqID,ierr)

call get_rflex_nodeseqid(ifbody,582,Node582SeqID,ierr)

 

call get_rflex_nstress(ifbody,Node144SeqID,1,0,Stress144,ierr)

call get_rflex_nstrain(ifbody,Node144SeqID,1,0,Strain144,ierr)

call get_rflex_nstress_3nref(ifbody,Node144SeqID,1,Node144SeqID,

     &        Node143SeqID,Node582SeqID,Stress144_3nref,ierr)

call get_rflex_nstrain_3nref(ifbody,Node144SeqID,1,Node144SeqID,

     &        Node143SeqID,Node582SeqID,Strain144_3nref,ierr)

 

call get_rflex_stressshape(ifbody,7,Node144SeqID,1,StressShape144,ierr)

call get_rflex_strainshape(ifbody,7,Node144SeqID,1,StrainShape144,ierr)

 

do i=1, 6+nmode

   result(i)=0.0d0

enddo

      RETURN

      END

 

SUBROUTINE REQUEST_USUB(time,upar,npar,iflag,result)

C---- TO EXPORT * SUBROUTINE

      !DEC$ ATTRIBUTES DLLEXPORT,C::REQUEST_USUB

 

C---- INCLUDE SYSTEM CALL

      INCLUDE 'SYSCAL.F'

double precision time,upar(*)

integer npar,iflag

double precision result(8)

 

common/Stress_Strain_result/ Stress144,Strain144,Stress144_3nref,

     &                              Strain144_3nref

double precision Stress144(11),Strain144(11)

double precision Stress144_3nref(11),Strain144_3nref(11)

 

result(2) = Stress144(1)

result(3) = Strain144(1)

result(4) = Stress144_3nref(1)

result(6) = Strain144_3nref(1)

 

RETURN

END