# sfepy.discrete.common.domain module

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

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

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

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

  has_faces()
  reset_regions()

    Reset the list of regions associated with the domain.

  save_regions(filename, region_names=None)

    Save regions as individual meshes.

    Parameters:
      filename str

        The output filename.

      region_names list, optional

        If given, only the listed regions are saved.

  save_regions_as_groups(filename, region_names=None)

    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:
      filename str

        The output filename.

      region_names list, optional

        If given, only the listed regions are saved.

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

  Create/setup a region instance according to rdef.

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