FORTRAN example for GET_RFLEX_NMODE

 

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)

 

C----USER STATEMENT

      INTEGER check_nmode,ierr

call get_rflex_nmode(ifbody,check_nmode,ierr)

call errmes(ierr,"MForce",ID,"hyc_usub_test");

if(check_nmode.ne.nmode) then

   call errmes(0,"MForce",ID

     & "Selected number of mode is wrong!!!

     & There's an error!")

endif

do i=1, 6+nmode

   result(i)=0.0d0

enddo

      RETURN

END