!Function 'GetNSTATEV' provides number of state variables needed for UMAT
!DEC$ FREEFORM
FUNCTION GetNSTATV(NTENS,NDI,PROPS)
                                                                                                                                       
    INTEGER(KIND=AbqIK):: GetNSTATV
    INTEGER(KIND=AbqIK), INTENT(IN):: NTENS,NDI
    REAL(KIND=AbqRK),INTENT(IN):: PROPS(:)
    
    IF (NTENS==3) THEN !plane stress condition
        GetNSTATV=2 !additionally store STRAN in x3-direction
    ELSE
        GetNSTATV=1
    END IF

END FUNCTION
