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 1 entries in the algebraic variable array.
C There are a total of 3 entries in each of the rate and state variable arrays.
C There are a total of 10 entries in the constant variable array.
C
C
C VOI is time in component environment (minute).
C CONSTS(1) is QAO in component heart_hypertrophy_or_deterioration (L_per_minute).
C CONSTS(2) is PA in component heart_hypertrophy_or_deterioration (mmHg).
C CONSTS(3) is POT in component heart_hypertrophy_or_deterioration (mmHg).
C CONSTS(4) is PPA in component heart_hypertrophy_or_deterioration (mmHg).
C STATES(1) is HPL in component left_ventricular_hypertrophy (dimensionless).
C CONSTS(5) is HSL in component parameter_values (dimensionless).
C CONSTS(6) is Z13 in component parameter_values (dimensionless).
C STATES(2) is HPR in component right_ventricular_hypertrophy (dimensionless).
C CONSTS(7) is HSR in component parameter_values (dimensionless).
C ALGBRC(1) is HMD in component heart_deterioration (dimensionless).
C CONSTS(8) is DHDTR in component parameter_values (per_mmHg_per_minute).
C STATES(3) is HMD1 in component heart_deterioration (dimensionless).
C CONSTS(9) is DHM in component heart_deterioration (per_minute).
C RATES(1) is d/dt HPL in component left_ventricular_hypertrophy (dimensionless).
C RATES(2) is d/dt HPR in component right_ventricular_hypertrophy (dimensionless).
C RATES(3) is d/dt HMD1 in component heart_deterioration (dimensionless).
C
      SUBROUTINE initConsts(CONSTS, RATES, STATES)
      REAL CONSTS(*), RATES(*), STATES(*)
      CONSTS(1) = 5.00707
      CONSTS(2) = 103.525
      CONSTS(3) = 35.1148
      CONSTS(4) = 15.6376
      STATES(1) = 1.00163
      CONSTS(5) = 1
      CONSTS(6) = 0.625
      STATES(2) = 1.00237
      CONSTS(7) = 1
      CONSTS(8) = 0.05
      STATES(3) = 1.0
      CONSTS(9) =  (CONSTS(3) - 10.0000)*CONSTS(8)
      CONSTS(9) = CONSTS(9)
      RETURN
      END
      SUBROUTINE computeRates(VOI, CONSTS,  RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      RATES(3) = CONSTS(9)
      RATES(1) = (( CONSTS(2)*CONSTS(1))/( 500.000*CONSTS(5)) ** CONSTS(6) - STATES(1))/57600.0
      RATES(2) = (( CONSTS(4)*CONSTS(1))/( 75.0000*CONSTS(7)) ** CONSTS(6) - STATES(2))/57600.0
      RETURN
      END
      SUBROUTINE computeVariables(VOI, CONSTS, RATES, STATES, ALGBRC)
      REAL VOI, CONSTS(*), RATES(*), STATES(*), ALGBRC(*)
      ALGBRC(1) = TERNRY(STATES(3).GT.1.00000, 1.00000, STATES(3))
      RETURN
      END
      REAL FUNCTION TERNRY(TEST, VALA, VALB)
      LOGICAL TEST
      REAL VALA, VALB
      IF (TEST) THEN
        TERNRY = VALA
      ELSE
        TERNRY = VALB
      ENDIF
      RETURN
      END