sfepy.discrete.common.domain module

class sfepy.discrete.common.domain.Domain(name, mesh=None, nurbs=None, bmesh=None, regions=None, verbose=False)[source]
create_extra_tdim_region(region, functions, tdim)[source]
create_region(name, select, kind='cell', parent=None, check_parents=True, extra_options=None, functions=None, add_to_regions=True, allow_empty=False)[source]

Region factory constructor. Append the new region to self.regions list.

create_regions(region_defs, functions=None, allow_empty=False)[source]
get_centroids(dim)[source]

Return the coordinates of centroids of mesh entities with dimension dim.

has_faces()[source]
reset_regions()[source]

Reset the list of regions associated with the domain.

save_regions(filename, region_names=None)[source]

Save regions as individual meshes.

Parameters:
filenamestr

The output filename.

region_nameslist, optional

If given, only the listed regions are saved.

save_regions_as_groups(filename, region_names=None)[source]

Save regions in a single mesh but mark them by using different element/node group numbers.

If regions overlap, the result is undetermined, with exception of the whole domain region, which is marked by group id 0.

Region masks are also saved as scalar point data for output formats that support this.

Parameters:
filenamestr

The output filename.

region_nameslist, optional

If given, only the listed regions are saved.

sfepy.discrete.common.domain.region_leaf(domain, regions, rdef, functions, tdim)[source]

Create/setup a region instance according to rdef.

sfepy.discrete.common.domain.region_op(level, op_code, item1, item2)[source]