sfepy.discrete.common.domain module¶
- class sfepy.discrete.common.domain.Domain(name, mesh=None, nurbs=None, bmesh=None, regions=None, verbose=False)[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.
- get_centroids(dim)[source]¶
Return the coordinates of centroids of mesh entities with dimension dim.
- 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.