🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

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

User: "liangycc"
Altair Community Member
Updated by liangycc

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!!! 

Find more posts tagged with

Sort by:
1 - 4 of 41
    User: "tinh"
    Altair Community Member
    Updated by tinh

    Use hm_count

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

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

    }

    User: "liangycc"
    Altair Community Member
    OP
    Updated by liangycc

    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?

    User: "tinh"
    Altair Community Member
    Updated by tinh

    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]

     

    User: "liangycc"
    Altair Community Member
    OP
    Updated by liangycc

    Thank you very much!