sfepy.discrete.fem.extmods.cmesh module¶
C Mesh data structures and functions.
-
class
sfepy.discrete.fem.extmods.cmesh.
CConnectivity
¶ Notes
The memory is allocated/freed in C - this class just wraps NumPy arrays around that data without copying.
-
cprint
()¶
-
indices
¶
-
n_incident
¶
-
num
¶
-
offset
¶
-
offsets
¶
-
-
class
sfepy.discrete.fem.extmods.cmesh.
CMesh
¶ -
cell_groups
¶
-
cell_types
¶
-
conns
¶
-
coors
¶
-
cprint
()¶
-
dim
¶
-
edge_oris
¶
-
entities
¶
-
face_oris
¶
-
facet_oris
¶
-
free_connectivity
()¶
-
from_mesh
()¶ Fill data from a Python mesh.
-
get_cell_conn
()¶
-
get_centroids
()¶ Return the coordinates of centroids of mesh entities with dimension dim.
-
get_complete
()¶ Get entities of dimension dim that are completely given by entities of dimension dent listed in entities.
-
get_conn
()¶
-
get_conn_as_graph
()¶ Get d1 -> d2 connectivity as a sparse matrix graph (values = ones).
For safety, creates a copy of the connectivity arrays. The connectivity is created if necessary.
-
get_from_cell_group
()¶ Get entities of dimension dim that are contained in cells of group ig and are listed in entities. If entities is None, all entities are used.
Adapter function to be removed after new assembling is done.
-
get_igs
()¶ Get cell groups of incident to entities of dimension dim.
Adapter function to be removed after new assembling is done.
-
get_incident
()¶ Get non-unique entities indices of dimension dim that are contained in entities of dimension dent listed in entities. As each of entities can be in several entities of dimension dent, offsets array is returned optionally.
-
get_local_entities
()¶
-
get_local_ids
()¶ Get local ids of non-unique entities incident of dimension dim (with given offsets per entities) incident to entities of dimension dent, see mesh_get_incident(), with respect to entities.
-
get_orientations
()¶ Get orientations of entities of dimension dim. Alternatively, co-dimension can be specified using codim argument.
-
get_surface_facets
()¶ Get facets (edges in 2D, faces in 3D) on the mesh surface.
-
key_to_index
¶
-
n_coor
¶
-
n_el
¶
-
num
¶
-
set_local_entities
()¶
-
setup_connectivity
()¶
-
setup_entities
()¶ Set up mesh edge (2D and 3D) and face connectivities (3D only) as well as their orientations.
-
tdim
¶
-
-
sfepy.discrete.fem.extmods.cmesh.
cmem_statistics
()¶
-
sfepy.discrete.fem.extmods.cmesh.
create_mesh_graph
()¶ Create sparse (CSR) graph corresponding to given row and column connectivities.
Parameters: n_row : int
The number of row connectivity nodes.
n_col : int
The number of column connectivity nodes.
n_gr : int
The number of element groups.
rconns : list of arrays
The list of length n_gr of row connectivities.
cconns : list of arrays
The list of length n_gr of column connectivities.
Returns: nnz : int
The number of graph nonzeros.
prow : array
The array of CSR row pointers.
icol : array
The array of CSR column indices.
-
sfepy.discrete.fem.extmods.cmesh.
get_cmem_usage
()¶
-
sfepy.discrete.fem.extmods.cmesh.
graph_components
()¶ Determine connected compoments of a compressed sparse graph.
Returns: n_comp : int
The number of components.
flag : array
The flag marking for each node its component.
-
sfepy.discrete.fem.extmods.cmesh.
orient_elements
()¶ Swap element nodes so that its volume is positive.