Fish代码学习

Fish代码关键命令学习

 zone.head

z = zone.head 

取得第一个模型内的单元的指针。

Get the first zone in the list of all zones in the model. This function should be considered deprecated; it is provided mostly for backward compatibility with old data files. Instead, see the fish_statement_loopforeach statement and the zone.list and zone.next functions.

Returns:z - a pointer to the first zone in the list of all zones in the model

zone.next

znext = zone.next(z)

返回列表上下一个单元的指针。

Get the next zone after z in the list of all zones in the model. Will return null if no more zones follow. This function should be considered deprecated; it is provided mostly for backward compatibility with old data files. Instead, see the fish_statement_loopforeach statement and the zone.list and zone.head functions.

Returns:znext - the next zone in the list, or null
Arguments:z - a pointer to a zone

zone.state

i = zone.state(z,bavg)

zone.state(z) = i

Get/set the current plasticity state indicators for the zone.

Tetrahedral subzones comprise a zone in FLAC3D, and each of them has a member variable that maintains its failure state. The member variable has 64 bits that can be used to represent 64 different states. Each constitutive model defines its own list of states, and its own assignment of state names to bits in the state variable. For convenience, however, a convention has been adopted for the most common states. The following table lists failure states and the convention adopted by many of the constitutive models.

The states supported by a constitutive model can be listed with the zone cmodel list state command.

The math.and and math.or intrinsics may be used to check against a specific bit or bit pattern.

Returns:

i - the plasticity state indicators, encoded as bits

Accepts:

i - the plasticity state indicator, encoded as bits. All tetra in the zone will be assigned this state indicator.

Arguments:

z - a zone pointer

bavg - if true, the bit will be set if 50% or more of the volume averaged tetra have that bit set. If false, the bit will be set if any tetra in the zone have that bit set. This value is ignored on assignment.

io.out

v = io.out(a)

输出字符串,变量转化为字符串。

Output a string. The variable is converted to a string if it is not a string, and it is output both to the console and to the log file, if one is open.

Returns:v - void return
Arguments:a - text to output

查询变量值

print fish
显示所有的函数和变量
list @变量名
print @变量名
[变量名]
以上三种方式都可以显示查询变量的数值。

 math.and

 i1=math.and(1,2)
 i2=math.and(9,9)

i3=math.and(1,1)

i1=0,i2=9,i3=1,也就是说,当两者相同时,返回该值,当两者不同时,返回0。

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值