How to calculate number of penta,hexa and quad grid quickly?
Hi,
Thanks to all of you for your valuable time and efforts putting in helping others.
I have many grid elements.It has many penta,hexa and quad grids.How can i distinguish them and calculate their numbers?
Now i use hm_getmark and hm_nodelist to identify them.However,it costs lots of time.And i don't think it is a good idea.
Could you give me a better idea?
Thank you very much!!!
Answers
-
Use hm_count
foreach {ename econf} {quad 104 penta 206 hexa 208} {
puts '#$ename = [hm_count elems all $econf 0]'
}
0 -
Altair Forum User said:
Use hm_count
foreach {ename econf} {quad 104 penta 206 hexa 208} {
puts '#$ename = [hm_count elems all $econf 0]'
}
Amazing!Besides,could i use hm_count to calculate the min and max Jacobian for quad or hexa quickly?
0 -
No, it cannot.
Try below:
*createmark elems 1 'by config' 104
set Jacobs [lsort [hm_getvalue elems mark=1 dataname=jacobian]]
puts min=[lindex $Jacobs 0]
puts max=[lindex $Jacobs end]
0 -
Thank you very much!
0