| 查看: 2403 | 回复: 9 | ||
| 本帖产生 1 个 程序强帖 ,点击这里进行查看 | ||
| 当前只显示满足指定条件的回帖,点击这里查看本话题的所有回帖 | ||
[求助]
请教一个fortran小程序编译出错的问题,谢谢
|
||
|
如下程序编译不成功,不知道问题出在哪里,mesh.dat文件格式是第一行是numnp, numel的数值,第二行到最后是mesh的各个四边形的具体坐标。错误信息是:Error: A specification expression object must be a dummy argument, a COMMON block object, or an object accessible through host or use association [NUMNP] integer*4 numnp, numel 还有G:\Program Files\Microsoft Visual Studio\MyProjects\mesh\pmesh.for(22) : Error: An automatic object is invalid in a main program. [X] dimension x(2,numnp),ia(numnp),请多多指教,谢谢 PROGRAM pmesh c c----------------------------------------------------------------- c purpose : to eliminate the string from existed mesh data c warning : the mesh has to be made out of quadrangles only c in :c c out : c x : array containing node coordinates c ia : nodes reference number c ien : list of element nodes c mat : material ref. numbers for all elements c in : element sides ref. number cc----------------------------------------------------------------------- c implicit real*8 (a-h,o-z) real xreal,yreal integer*4 numnp, numel dimension x(2,numnp),ia(numnp) dimension ien(4,numel),mat(numel),in(4,numel) open(57,file='pmesh1.dat') open(58,file='pmesh2.dat') call sizemesh(numnp, numel) open(21,file='mesh.dat') read(21,*) do 300 i=1,numnp read(21,2100)idum,xreal,yreal,ia(i) x(1,i) = xreal x(2,i) = yreal write(57,*)idum,xreal,yreal,ia(i) 300 continue do 500 n=1,numel read(21,2300)ndum,(ien(i,n),i=1,4),(in(i,n),i=1,4) write(58,*)ndum,(ien(i,n),i=1,4),(in(i,n),i=1,4) 500 continue close(21) 2100 format(i5,2x,e15.5,2x,e12.5,2x,i2) 2300 format(5(i5,2x),4(i2,2x)) end c************************************************************** subroutine sizemesh(numnp,numel) integer numnp, numel open(21,file='mesh.dat') read(21,*) numnp,numel close(21) return end |
» 猜你喜欢
回收溶剂求助
已经有7人回复
职称评审没过,求安慰
已经有40人回复
硝基苯如何除去
已经有3人回复
A期刊撤稿
已经有4人回复
垃圾破二本职称评审标准
已经有17人回复
投稿Elsevier的Neoplasia杂志,到最后选publishing options时页面空白,不能完成投稿
已经有22人回复
申请26博士
已经有5人回复
EST投稿状态问题
已经有7人回复
毕业后当辅导员了,天天各种学生超烦
已经有4人回复
求助文献
已经有3人回复
» 本主题相关价值贴推荐,对您同样有帮助:
我编的Simpson积分法fortran程序给不出结果,大侠们看看哪里出了问题?
已经有4人回复
fortran编译 read出错 完毕
已经有11人回复
Fortran的格式化输入输出问题
已经有14人回复
有关fortran的一次而问题,希望大家能帮帮忙,谢谢
已经有4人回复
写了一个fortran90的小程序,编译通不过,请大侠帮忙
已经有59人回复
【求助】如何写FORTRAN程序实现求平均最近邻距离
已经有34人回复
【求助】Fortran编译目标文件后的链接问题
已经有4人回复
snoopyzhao
至尊木虫 (职业作家)
- 程序强帖: 16
- 应助: 157 (高中生)
- 贵宾: 0.02
- 金币: 18844.7
- 红花: 29
- 帖子: 3803
- 在线: 1422.4小时
- 虫号: 183750
- 注册: 2006-02-13
- 专业: 污染生态化学
3楼2011-08-24 11:26:59
snoopyzhao
至尊木虫 (职业作家)
- 程序强帖: 16
- 应助: 157 (高中生)
- 贵宾: 0.02
- 金币: 18844.7
- 红花: 29
- 帖子: 3803
- 在线: 1422.4小时
- 虫号: 183750
- 注册: 2006-02-13
- 专业: 污染生态化学
2楼2011-08-24 11:13:08
4楼2011-08-24 12:53:08
snoopyzhao
至尊木虫 (职业作家)
- 程序强帖: 16
- 应助: 157 (高中生)
- 贵宾: 0.02
- 金币: 18844.7
- 红花: 29
- 帖子: 3803
- 在线: 1422.4小时
- 虫号: 183750
- 注册: 2006-02-13
- 专业: 污染生态化学
5楼2011-08-24 14:53:26













回复此楼