Hi everyone,
I am new to fortran coding so forgive me if my question is trivial. I am coding some Fortran subroutines that will help me solving and Abaqus finite element simulation. The subroutine works in this way: it takes data from Abaqus makes some calculation and then update some variables. I have some problems with a matrix (OLDECE2N) that was built to save a variable (ECE2N) from the previous time increment of the simulation. E.g. if I am in step 1 I save OLDECE2N(I,J)=ECE2N(I,J) so that when I am in step 2 I can read ECE2 at step 1 through OLDECE2.
Here is how I define OLDECE2N (NELX=13 and NELY=5, previously defined):
DIMENSION OLDECE2N(NELX,NELY)
Since at first step there is no ECE2N value I set OLDECE2N to zero in this way:
IF(STEP.EQ.1) THEN
DO II=1,NELX
DO JJ=1,NELY
OLDECE2N(II,JJ)=0
END DO
END DO
END IF
So finally at the end of my calculations i save ECE2N values to OLDECE2N:
DO II=1,NELX
DO JJ=1,NELY
OLDECE2N(II,JJ)=ECE2N(II,JJ)
END DO
END DO
Unfortunately it doesn't work as it should. In fact OLDECE2N does not contain all the right data (see the attachment .log). especially first value OLDECE2N(1,1) = 5.0519-316 I don't know where it comes from. I was able to solve the problem by changing DIMENSION and by adding DATA:
DIMENSION OLDECE2N(13,5)
DATA OLDECE2N/0*0/
but I don't want to write the values 13 and 5 by myself everytime. I want fortran to do that for me. Any idea?
Thank you in advance
Federico