Cathy039
Civil/Environmental
- Sep 15, 2017
- 14
SUBROUTINE DLOAD(F,KSTEP,KINC,TIME,NOEL,NPT,LAYER,KSPT,COORDS,JLTYP,SNAME)
INCLUDE 'ABA_PARAM.INC'
DIMENSION TIME(2), COORDS (3)
CHARACTER*80 SNAME
PARAMETER(RADIUS=0.15D0,AREA=0.D0)
PI=2.*ASIN(1.D0)
THETA=ACOS(COORDS(3)/RADIUS)/180
IF(COORDS(3).GE.0) THEN
AREA1=THETA*PI*RADIUS**2-COORDS(3)*SQRT(RADIUS**2-COORDS(3)**2)
ELSE
AREA1=THETA*PI*RADIUS**2+COORDS(3)*SQRT(RADIUS**2-COORDS(3)**2)
END IF
AREA=AREA+AREA1
F=DENSITY*GRAVIATION*AREA*PI*RADIUS/32
RETURN
END
I run it in Visual Studio 2013. The error messages are below:
Error 3 Compilation Aborted (code 1) C:\Users\YC\Documents\Visual Studio 2013\Projects\Console1\Console1\921.f90 1
Error 2 error #6414: This PARAMETER constant name is invalid in this context. [AREA] C:\Users\YC\Documents\Visual Studio 2013\Projects\Console1\Console1\921.f90 26
Error 1 error #5102: Cannot open include file 'ABA_PARAM.INC' C:\Users\YC\Documents\Visual Studio 2013\Projects\Console1\Console1\921.f90 15
INCLUDE 'ABA_PARAM.INC'
DIMENSION TIME(2), COORDS (3)
CHARACTER*80 SNAME
PARAMETER(RADIUS=0.15D0,AREA=0.D0)
PI=2.*ASIN(1.D0)
THETA=ACOS(COORDS(3)/RADIUS)/180
IF(COORDS(3).GE.0) THEN
AREA1=THETA*PI*RADIUS**2-COORDS(3)*SQRT(RADIUS**2-COORDS(3)**2)
ELSE
AREA1=THETA*PI*RADIUS**2+COORDS(3)*SQRT(RADIUS**2-COORDS(3)**2)
END IF
AREA=AREA+AREA1
F=DENSITY*GRAVIATION*AREA*PI*RADIUS/32
RETURN
END
I run it in Visual Studio 2013. The error messages are below:
Error 3 Compilation Aborted (code 1) C:\Users\YC\Documents\Visual Studio 2013\Projects\Console1\Console1\921.f90 1
Error 2 error #6414: This PARAMETER constant name is invalid in this context. [AREA] C:\Users\YC\Documents\Visual Studio 2013\Projects\Console1\Console1\921.f90 26
Error 1 error #5102: Cannot open include file 'ABA_PARAM.INC' C:\Users\YC\Documents\Visual Studio 2013\Projects\Console1\Console1\921.f90 15