| 查看: 2410 | 回复: 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 |
» 猜你喜欢
自然科学基金委宣布启动申请书“瘦身提质”行动
已经有4人回复
投稿Elsevier的杂志(返修),总是在选择OA和subscription界面被踢皮球
已经有6人回复
中科院杭州医学所招收博士生一名(生物分析化学、药物递送)
已经有4人回复
求个博导看看
已经有18人回复
自荐读博
已经有6人回复
青基代表作,AAAI之类的A会的special track在国内认可度高吗?还是归为workshop之流?
已经有3人回复
上海工程技术大学【激光智能制造】课题组招收硕士
已经有6人回复
上海工程技术大学张培磊教授团队招收博士生
已经有4人回复
临港实验室与上科大联培博士招生1名
已经有9人回复
写了一篇“相变储能技术在冷库中应用”的论文,论文内容以实验为主,投什么期刊合适?
已经有6人回复
» 本主题相关价值贴推荐,对您同样有帮助:
我编的Simpson积分法fortran程序给不出结果,大侠们看看哪里出了问题?
已经有4人回复
fortran编译 read出错 完毕
已经有11人回复
Fortran的格式化输入输出问题
已经有14人回复
有关fortran的一次而问题,希望大家能帮帮忙,谢谢
已经有4人回复
写了一个fortran90的小程序,编译通不过,请大侠帮忙
已经有59人回复
【求助】如何写FORTRAN程序实现求平均最近邻距离
已经有34人回复
【求助】Fortran编译目标文件后的链接问题
已经有4人回复
6楼2011-09-28 11:02:42
snoopyzhao
至尊木虫 (职业作家)
- 程序强帖: 16
- 应助: 157 (高中生)
- 贵宾: 0.02
- 金币: 18844.7
- 红花: 29
- 帖子: 3803
- 在线: 1422.4小时
- 虫号: 183750
- 注册: 2006-02-13
- 专业: 污染生态化学
2楼2011-08-24 11:13:08
snoopyzhao
至尊木虫 (职业作家)
- 程序强帖: 16
- 应助: 157 (高中生)
- 贵宾: 0.02
- 金币: 18844.7
- 红花: 29
- 帖子: 3803
- 在线: 1422.4小时
- 虫号: 183750
- 注册: 2006-02-13
- 专业: 污染生态化学
3楼2011-08-24 11:26:59
4楼2011-08-24 12:53:08







回复此楼