Hi,
First of all I must point out that I am not a fortran developer. All I need is to understand the fortran code and rewrite it in some other language. So I am here looking for help to better understand what is going on.
If you take a look at SUVM subroutine and focus on the RPROPS
argument. According to my understanding, the RPROPS
is a one-dimensional array
DIMENSION
1 IPROPS(*) ,RPROPS(*) ,RSTAVA(MSTRE+1) ,
2 STRAT(MSTRE) ,STRES(MSTRE)
and the same is suggested also in the documentation:
RPROPS
. Array of real material properties. It contains the elastic properties (Young’s modulus, E, and Poisson+s ratio, v) and the pairs {x, y} of sampling points along the hardening curve.RPROPS = [E, v, x_1, y_1, … , x_n, y_n]
With that out of the picture, let’s take a loook at the line 56 of SUVM subroutine
SIGMAY=PLFUN(EPBARN,NHARD,RPROPS(IPHARD))
where PLFUN function is called. The way this function is called in the above example makes me think the arguments of PLFUN are all scalars:
- EPBARN is a scalar (double).
- NHARD is a scalar (integer).
- RPROPS(IPHARD) is according to my understanding just an element from an array, thus a scalar. (note that IPHARD is a constant integer within the SUVM subroutine).
Now the big However
However, the definition of PLFUN is as follows:
DOUBLE PRECISION FUNCTION PLFUN(X, NPOINT, XFX)
C
INTEGER NPOINT, I
DOUBLE PRECISION X, XFX(2,*)
C***********************************************************************
C PIECEWISE LINEAR FUNCTION DEFINED BY A SET OF NPOINT PAIRS
C {X,F(X)} STORED IN THE MATRIX XFX (DIM. 2*NPOINT).
C***********************************************************************
C do something ....
RETURN
END
where, as you can see, the argument is a two-dimensional MATRIX.
Confused.
So I don’t get it. In the SUVM subroutine, the PLFUN is called with scalars, while the definition of the PLFUN should have a matrix.