How to calculate number of penta,hexa and quad grid quickly?

liangycc
liangycc Altair Community Member
edited October 2020 in Community Q&A

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

  • tinh
    tinh Altair Community Member
    edited January 2019

    Use hm_count

    foreach {ename econf} {quad 104 penta 206 hexa 208} {

        puts '#$ename = [hm_count elems all $econf 0]'

    }

  • liangycc
    liangycc Altair Community Member
    edited January 2019

    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?

  • tinh
    tinh Altair Community Member
    edited January 2019

    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]

     

  • liangycc
    liangycc Altair Community Member
    edited January 2019

    Thank you very much!