- 积分
- 0
- 注册时间
- 2010-10-5
- 仿真币
-
- 最后登录
- 1970-1-1
|
feapv数组内存管理没懂,明白的指教下,下面文字来自feapv开发手册上的。
integer num_nps , num_ups
parameter (num_nps = 400 , num_ups = 200)
integer np , up
common /pointer/ np(num_nps) , up(num_ups)
Each pointer is an offset relative to the address of a REAL*8 array hr(1) or an INTEGER
array mr(1) defined in a blank common
real*8 hr
integer mr
common hr(1),mr(1)
说是hr,mr,记录地址的偏移,感觉他是把所有的数组写在一个内存空白区域hr(real*8),mr(integer),然后记录每个生成数组在空白区域的位置,并且用字典把数组名来记录下来。
他还举了个得到节点坐标的数组的例子
For example, if a development requires the nodal coordinate
data the call
integer xpoint, xlen, xpre
logical flag
....
call pgetd ('X ',xpoint,xlen,xpre,flag)
x1 = hr(xpoint)
For example y1 is located at hr(xpoint+1)
这么看来hr存的是具体的内容,而非地址。
但他在头文件中把hr,mr大小定义好了,都是1,hr(xpoint+1)岂不是会数组越界..
|
|