Finding elements ids in a given block

Hi Guys,

Is there a way to find element ids belonging to a given block? Doing “list block 2” provides information on a number of Mesh_Elements, but I cannot figure out how to see the ids of these elements. In the ideal case, I would like to find out which elements belong to which block.

Thanks,
Ondrej

In the Python API, you can do:

element_type = "hex" # "tet", "pyramid", "tri", "quad", etc...
block_id = 2
elems_in_block = cubit.parse_cubit_list( "hex", f"in block {block_id}" )

Hi Greg, Not sure what I’m doing wrong but I’m getting an empty array. Please see below.

woops, forgot that the hexes aren’t necessarily “inherited” by the block assignment… if you assigned the block via block 2 volume <volume_id_list> then you’ll need to get the hexes of the volumes… i.e.,

elems_in_block = cubit.parse_cubit_list( "hex", f"in volume in block {block_id}" )

Many thanks, Greg. That works.