Generated Code

The following is f77 code generated by the CellML API from this CellML file. (Back to language selection)

The raw code is available.

C
C There are a total of 2 entries in the algebraic variable array.
C There are a total of 1 entries in each of the rate and state variable arrays.
C There are a total of 7 entries in the constant variable array.
C
C
C VOI is time in component Environment (s).
C CONSTS(1) is HR in component Environment (ratepm).
C CONSTS(6) is hrf in component Environment (Hz).
C CONSTS(2) is PRint in component LVTiming (s).
C ALGBRC(1) is beattime in component LVTiming (s).
C CONSTS(3) is Esys in component LVElastanceFunction (elastance).
C CONSTS(4) is Edia in component LVElastanceFunction (elastance).
C CONSTS(5) is TsK in component LVElastanceFunction (s).
C CONSTS(7) is Ts in component LVElastanceFunction (s).
C ALGBRC(2) is E_LV in component LVElastanceFunction (elastance).
C STATES(1) is dummy in component dummy (dimensionless).
C RATES(1) is d/dt dummy in component dummy (dimensionless).
C
      SUBROUTINE initConsts(CONSTS, RATES, STATES)
      REAL CONSTS(*), RATES(*), STATES(*)
      CONSTS(1) = 70
      CONSTS(2) = 0.00012
      CONSTS(3) = 5.6
      CONSTS(4) = 0.19
      CONSTS(5) = 0.35
      STATES(1) = 10
      CONSTS(6) = CONSTS(1)/60.0000
      CONSTS(7) =  CONSTS(5)* ( 1.00000*CONSTS(6)) ** (1.0 / 2)
      RETURN
      END
      SUBROUTINE computeRates(VOI, CONSTS,  RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      RATES(1) =  STATES(1)*- 3.00000
      RETURN
      END
      SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      ALGBRC(1) = (VOI -  INT(VOI/CONSTS(6))*CONSTS(6)) - CONSTS(2)
      ALGBRC(2) = TERNRY(ALGBRC(1).GE.0.00000.AND.ALGBRC(1).LE.CONSTS(7), CONSTS(4)+( (CONSTS(3) - CONSTS(4))*(1.00000 - cos((  3.14159265358979*ALGBRC(1))/CONSTS(7))))/2.00000, TERNRY(ALGBRC(1).LT. 1.50000*CONSTS(7).AND.ALGBRC(1).GE.CONSTS(7), CONSTS(4)+( (CONSTS(3) - CONSTS(4))*(1.00000+cos(( 2.00000* 3.14159265358979*(ALGBRC(1) - CONSTS(7)))/CONSTS(7))))/2.00000, CONSTS(4))
      RETURN
      END
      REAL FUNCTION TERNRY(TEST, VALA, VALB)
      LOGICAL TEST
      REAL VALA, VALB
      IF (TEST) THEN
        TERNRY = VALA
      ELSE
        TERNRY = VALB
      ENDIF
      RETURN
      END