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 4 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 5 entries in the constant variable array.
C
C
C VOI is time in component environment (second).
C CONSTS(1) is a in component contraction (mNpermmsq).
C CONSTS(2) is b in component contraction (pms).
C CONSTS(3) is Po in component contraction (mNpermmsq).
C CONSTS(4) is alpha in component contraction (mNpermmsq).
C CONSTS(5) is L_se_o in component contraction (dimensionless).
C ALGBRC(1) is L in component contraction (dimensionless).
C ALGBRC(4) is v in component contraction (pms).
C ALGBRC(2) is L_se in component contraction (dimensionless).
C STATES(1) is L_ce in component contraction (dimensionless).
C ALGBRC(3) is P in component contraction (mNpermmsq).
C RATES(1) is d/dt L_ce in component contraction (dimensionless).
C
      SUBROUTINE initConsts(CONSTS, RATES, STATES)
      REAL CONSTS(*), RATES(*), STATES(*)
      CONSTS(1) = 37.24
      CONSTS(2) = 0.325
      CONSTS(3) = 144.9
      CONSTS(4) = 1449.027
      CONSTS(5) = 0.3
      STATES(1) = 0.7
      RETURN
      END
      SUBROUTINE computeRates(VOI, CONSTS,  RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      ALGBRC(1) = TERNRY(VOI.LE.1.00000, 1.00000, TERNRY(VOI.GT.1.00000.AND.VOI.LT.5.00000, 0.920000, 0.900000)
      ALGBRC(2) = ALGBRC(1) - STATES(1)
      ALGBRC(3) =  CONSTS(4)*(ALGBRC(2) - CONSTS(5))
      ALGBRC(4) = ( - CONSTS(2)*(CONSTS(3) - ALGBRC(3)))/(ALGBRC(3)+CONSTS(1))
      RATES(1) = ALGBRC(4)
      RETURN
      END
      SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      ALGBRC(1) = TERNRY(VOI.LE.1.00000, 1.00000, TERNRY(VOI.GT.1.00000.AND.VOI.LT.5.00000, 0.920000, 0.900000)
      ALGBRC(2) = ALGBRC(1) - STATES(1)
      ALGBRC(3) =  CONSTS(4)*(ALGBRC(2) - CONSTS(5))
      ALGBRC(4) = ( - CONSTS(2)*(CONSTS(3) - ALGBRC(3)))/(ALGBRC(3)+CONSTS(1))
      RETURN
      END
      REAL FUNCTION TERNRY(TEST, VALA, VALB)
      LOGICAL TEST
      REAL VALA, VALB
      IF (TEST) THEN
        TERNRY = VALA
      ELSE
        TERNRY = VALB
      ENDIF
      RETURN
      END