Model.hm_morph_getinfo_domaincount#

Model.hm_morph_getinfo_domaincount(domain_type)#

Returns the value of domain from HyperMorph.

Parameters:

domain_type (int) –

The type of domain to count. Valid values are:

0 - All domains

1 - 1D domains

2 - 2D domains

3 - 3D domains

4 - Global domains

5 - Edge domains

7 - General domains

Returns:

Example#

Get the number of 2D domains#
import hm
import hm.entities as ent

model = hm.Model()

_,result = model.hm_morph_getinfo_domaincount(domain_type=2)

print("numberOfDomains",result.numberOfDomains)