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.
Notes
Functions depending on ig are adapters for current code that should be removed after new assembling is done.
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
|
Get cells of the region.
Raises ValueError if true_cells_only is True and the region kind does not allow cells (e.g. surface integration region). For true_cells_only equal to False, cells incident to facets are returned if the region itself contains no cells.
If offset is True, the cell group offset is subtracted from the cell ids.
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 mesh entities of dimension dim, and optionally with the cell group ig.
Return an array (per group) of (iel, ifa) for each facet. A facet can be in 1 (surface) or 2 (inner) cells.
If offset is True, the cell group offset is subtracted from the cell ids.
If force_ig is True, only the cells with the given ig are used.
Get number of region cells.
Parameters: | ig : int, optional
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.