fish define get_plast
shearnow = 1
tensionnow = 2
shearpast = 4
tensionpast = 8
v_shear_now = 0.0
v_tension_now = 0.0
v_shear_past = 0.0
v_tension_past = 0.0
p_z = zone.head
loop while p_z # null
if math.and(zone.state(p_z,true),shearnow) = shearnow then
v_shear_now = v_shear_now + zone.vol(p_z)
else if math.and(zone.state(p_z,true),tensionnow) = tensionnow then
v_tension_now = v_tension_now + zone.vol(p_z)
else if math.and(zone.state(p_z,true),shearpast) = shearpast then
v_shear_past = v_shear_past + zone.vol(p_z)
else if math.and(zone.state(p_z,true),tensionpast) = tensionpast then
v_tension_past = v_tension_past + zone.vol(p_z)
endif
p_z = zone.next(p_z)
endloop
ii1 = io.out('shear_now : ' + string(v_shear_now))
ii2 = io.out('tension_now : ' + string(v_tension_now))
ii3 = io.out('shear_past : ' + string(v_shear_past))
ii4 = io.out('tension_past : ' + string(v_tension_past))
end
@get_plast
906

被折叠的 条评论
为什么被折叠?



