!Function 'GetNSTATEV' provides number of state variables needed for UMAT

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=3 !additionally store STRAN in x3-direction
    ELSE
        GetNSTATV=2
    END IF

END FUNCTION
