Region defines a subset of a FE domain.
Region kinds:
The ‘cell’ kind is the most general and it is the default.
Region set-like operators: + (union), - (difference), * (intersection), followed by one of (‘v’, ‘e’, ‘f’, ‘c’, and ‘s’) for vertices, edges, faces, cells, and facets.
Created: 31.10.2005
Return True in the region contains the other region.
The check is performed using entities corresponding to the other region kind.
Initialize the entities corresponding to the region kind and regenerate all already existing (accessed) entities of lower topological dimension from the kind entities.
Create a new region containing given cells.
Parameters: | cells : array
domain : Domain instance
name : str, optional
kind : str, optional
parent : str, optional
|
---|---|
Returns: | obj : Region instance
|
Create a new region containing given facets.
Parameters: | facets : array
domain : Domain instance
name : str, optional
kind : str, optional
parent : str, optional
|
---|---|
Returns: | obj : Region instance
|
Create a new region containing given vertices.
Parameters: | vertices : array
domain : Domain instance
name : str, optional
kind : str, optional
|
---|---|
Returns: | obj : Region instance
|
Return indices of cells in the region cells.
Raises ValueError if true_cells_only is True and the region kind does not allow cells. For true_cells_only equal to False, cells incident to facets are returned if the region itself contains no cells.
Notes
If the number of unique values in cells is smaller or equal to the number of cells in the region, all cells has to be also the region cells (self is a superset of cells). The region cells are considered depending on true_cells_only.
Otherwise, indices of all cells in self that are in cells are returned.
Get cells of the region.
Raises ValueError if true_cells_only is True and the region kind does not allow cells. For true_cells_only equal to False, cells incident to facets are returned if the region itself contains no cells. Obeys parent region, if given.
Return the characteristic function of the region as a vector of values defined either in the mesh vertices (by_cell == False) or cells. The values are either 1 (val_by_id == False) or sequential id + 1.
Return the graph of region edges as a sparse matrix having uid(k) + 1 at (i, j) if vertex[i] is connected with vertex[j] by the edge k.
Degenerate edges are ignored.
Return an array (per group) of (iel, ifa) for each facet. A facet can be in 1 (surface) or 2 (inner) cells.
Get number of region cells.
Parameters: | is_surface : bool
|
---|---|
Returns: | n_cells : int
|
Setup entities of topological dimension dim using the available entities of the highest topological dimension.
Setup entities of topological dimension dim using the region vertices.
Check if the regions r1 and r2 are disjoint.
Uses vertices for the check - *_only regions not allowed.
Return a dependency graph and a name-sort name mapping for given region definitions.