# sfepy.discrete.fem.domain module

Computational domain, consisting of the mesh and regions.

class sfepy.discrete.fem.domain.FEDomain(name, mesh, verbose=False, **kwargs)

  Domain is divided into groups, whose purpose is to have homogeneous data shapes.

  clear_surface_groups()

    Remove surface group data.

  create_surface_group(region)

    Create a new surface group corresponding to region if it does not exist yet.

    Notes

    Surface groups define surface facet connectivity that is needed for `sfepy.discrete.fem.mappings.FEMapping`.

  fix_element_orientation(geom_els=None, force_check=False)

    Ensure element vertices ordering giving positive cell volumes.

  get_conn(ret_gel=False, tdim=None, cells=None)

    Get the cell-vertex connectivity and, if ret_gel is True, also the corresponding reference geometry element. If tdim is not None get the connectivity of the cells with topological dimension tdim.

  get_diameter()

    Return the diameter of the domain.

    Notes

    The diameter corresponds to the Friedrichs constant.

  get_element_diameters(cells, volume, mode, square=True)
  get_mesh_bounding_box()

    Return the bounding box of the underlying mesh.

    Returns:
      bbox ndarray (2, dim)

        The bounding box with min. values in the first row and max. values in the second row.

  get_mesh_coors(actual=False)

    Return the coordinates of the underlying mesh vertices.

  refine()

    Uniformly refine the domain mesh.

    Returns:
      domain FEDomain instance

        The new domain with the refined mesh.

    Notes

    Works only for meshes with single element type! Does not preserve node groups!