- 积分
- 0
- 注册时间
- 2006-5-8
- 仿真币
-
- 最后登录
- 1970-1-1
|
楼主 |
发表于 2008-4-2 09:47:16
|
显示全部楼层
来自 天津
The New and Restore commands are not permitted to be invoked from within a fish function.我也见了,可是怎么实现在fish里面调用res 1.sav的目的呢?我把1.sav里面的状态存到put的fish函数,用get这个fish函数调用,还是不行,get还是不能在我编的fish里面调用.
例:
我用以下程序:
new
set log on
res 1.sav
def put ;把1.sav写进put里面
oo = open('state.bin',1,0)
p_z = zone_head
loop while p_z # null
ret = z_statesave(p_z)
.
.
.
endloop
end
def get ;把1.sav调出来
oo = open('state6.bin',0,0)
p_z = zone_head
loop while p_z # null
ret = z_staterest(p_z)
.
.
.
endloop
end
put
get
def jisuan
ratio=1.0
loop while ratio>0.001
ratio=ratio-0.01
force1=-1*ratio*5.5e4
if abs(dz1)>1.0e-2 then
get ;调出1.sav
command
ini xdis=0.0 ydis=0.0 zdis=0.0
mo mohr
prop bulk 1e8 shear 0.3e8 coh 1e4 ten 1e4
apply nstress force1 range z 14.9 15.1 x 5.9 7.9
set large
plot add con zdis
solve
save 12.sav
call d:\get_gp_maxzdisp.fis ;搜索出地表最大位移dz1
endcommand
else
exit
endif
endloop
end
jisuan
可是这样也不行,get放在fish里面那种效果,调不出来1.sav,放在jisuan这个fish外面可以调出1.sav,不知道为什么?请教大家 |
|