程序中读入数据指令与输入数据方式不匹配不识别
精准四面体,精准求积四面体,精准四面体考察对于一个三维(3D)四面体内部的,精准求积规则的多项式的精准度.最高度数,如x2yz5的总度数是8.
(TETRAHEDRON_EXACTNESS, Investigate the polynomial exactness of a quadrature
rule for a tetrahedron by integrating all monomials
of a given degree.The rule will be adjusted to the unit tetrahedron.)
用户输入: User input:
W file = "_w.txt".
X file = "_x.txt".
R file = "_r.txt".
Maximum total degree to check = 0
At line 351 of file main.f95 (unit = 1)
Fortran runtime error: Cannot open file '_x.txt': No such file or directory
Error termination. Backtrace:
#00x7f6941db9d5a
#10x7f6941dba869
.........
#110xffffffffffffffff
...Program finished with exit code 0
Press ENTER to exit console.
*******************
程序运行如上.
*******************
已经有这些数据文档:
W file = "_w.txt".
X file = "_x.txt".
R file = "_r.txt".
*******************
程序中相关读入数据指令:
......
call get_unit ( input_unit )
open ( unit = input_unit, file = input_filename, &
#351 status = 'old', form = 'formatted', access = 'sequential' )
got_one = .false.
10 continue
........
*******************
求助盼复, 谢谢老师!
2021-12-28
从字面意思来看,找不到输入文件 _x.txt 收到,稍候! 有输入: (文件名)
keast7_w.txt, (the weights)
keast7_x.txt, (the abscissas)
keast7_r.txt ( the region)
8(最高次数)
报错,无法识别???
另*.txt 为数据文档 :-@ 我不清楚你的代码的使用流程。但是从提示来看,就是找不到 _x.txt
可能 keast7_x.txt 这个文件名是生成的,通过某个地方的输入 keast7 生成文件名 keast7_x.txt
但是你没有合适的输入相关内容。导致应该去寻找 keast7_x.txt,而程序错误的寻找了 _x.txt
没有源代码,一切只能靠猜。我也不确定猜得对不对。
会用C++写代码的人,和会玩“用C++写的游戏”的人,可能是两类人。
这种问题只能你自己去看源代码,去寻找这套代码的正确使用方式。
收到,谢谢! 可否用另一种方式输入
keast7_w.txt, (the weights)
keast7_x.txt, (the abscissas)
keast7_r.txt ( the region)里的数据内容, 及适当修改一下本程序中的数据读入指令,并附上_*.txt中的内容(已经有数据)于本程序上??! :-dizzy: 可以,只要你能读懂你的代码的逻辑。你就一定能修改成符合自己使用习惯的逻辑。
你需要了解,并不是所有Fortran代码的使用逻辑都一样,完全取决于代码作者的意图和想法。 收到, 谢谢! :-handshake
页:
[1]