请问,按照书上录入子程序后,不能计算出结果。请大家帮忙分析一下原因。谢谢。
子程序如下:
subroutine forcem(press,th1,th2,nn,n)
c
implicit real*8(a-h, o-z)
c
c... define non-uniform distributed force on an element
c
c... press distributed load(increment)magnitude
c... th1 (x,y,z)position of the integration point
c... th2 vector describing direction of load
c... nn integration point number
c... n(1) elment number
c... n(2) parameter identifying the type of load
c... n(3) not used
c... n(4) not used
c... n(5) distributed load index
c
c... Programmed to simulate a moving distributed load
c... The load is assumed to have a square shape with edge
c... lengths b. The center of the load is moving in the
c... (x,y)-plane with a constant velocity v along the line
c... x=y.
c... Since use will be made of the FOLLOW FORCE option together
c... with AUTO LOAD,the total load at the end of the increment
c... must be specified
c
dimension th1(3),th2(3),n(7)
c
c... include common block creeps to obtain total time (cptim)
c... and time increment (timinc)
include '../common/creeps'
c
c... define b and v
b=1.0
v=1.414
c
c... determine current centre of load
distan=v*(cptim+timinc)
xc=0.5*v*distan
yc=xc
c
c... boundaries of loaded area
xmin=xc-0.5
xmax=xc+0.5
ymin=yc-0.5
ymax=yc+0.5
c
c... define non-zero load only if integration point is
c... located within boundaries of loaded area
press=0.0
if(th1(1)<=xmax.and.th1(1)>=xmin.and.th1(2)<=ymax.and.th1(2)>=ymin)
press=2.0
c... define direction of load
th2(1)=0.0
th2(2)=0.0
th2(3)=-1.0
c
return
end
补充说明,日志如下:
MSC.Marc 2005 Windows_NT version
--------------------------------
:
Program name : marc
Job ID : e1_job1
User subroutine name : plate1
Restart file job ID :
Substructure file ID :
Post file job ID :
Defaults file ID :
View factor file ID :
Save generated module: no
Auto restart : 0
Contact decoupling : 0
Number of tasks : 0
Host file :
Distributed i/o :
Run directory : d:\training
Scratch directory : d:\training
Default bin directory: d:\MSC.Software\MSC.Marc\2005\marc2005\tools\..\bin
Material database : d:\MSC.Software\MSC.Marc\2005\marc2005\tools\..\AF_flowmat\
:
ifort /c /I"d:\MSC.Software\MSC.Marc\2005\marc2005\tools\..\common" /I"d:\MSC.Software\MSC.Marc\2005\marc2005\tools\..\bcssolver\common" /I"d:\MSC.Software\MSC.Marc\2005\marc2005\nt_mpich\include" /O2 /Qip /Qsave /W0 /object:"d:\training\plate1.obj" "d:\training\plate1.f"
Intel(R) Visual Fortran Compiler XE for applications running on IA-32, Version 12.0.5.221 Build 20110719
Copyright (C) 1985-2011 Intel Corporation. All rights reserved.
d:\training\plate1.f(50): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: )
if(th1(1)<=xmax.and.th1(1)>=xmin.and.th1(2)<=ymax.and.th1(2)>=ymin)
-------------------------------------------------------------------------^
compilation aborted for d:\training\plate1.f (code 1)
compile failed for d:\training\plate1.f
MSC.Marc Exit number 3