Functions for a mesh refinement with hanging nodes.
Using LCBCs with hanging nodes is not supported.
- sfepy.discrete.fem.refine_hanging.find_facet_substitutions(facets, cells, sub_cells, refine_facets)¶
Find facet substitutions in connectivity.
- sub = [coarse cell, coarse facet, fine1 cell, fine1 facet, fine2 cell,
- sfepy.discrete.fem.refine_hanging.find_level_interface(domain, refine_flag)¶
Find facets of the coarse mesh that are on the coarse-refined cell boundary.
ids w.r.t. current mesh: - facets: global, local w.r.t. cells[:, 0], local w.r.t. cells[:, 1]
interface cells: - cells[:, 0] - cells to refine - cells[:, 1] - their facet sharing neighbors (w.r.t. both meshes) - cells[:, 2] - facet kind: 0 = face, 1 = edge
- sfepy.discrete.fem.refine_hanging.refine(domain0, refine, subs=None, ret_sub_cells=False)¶
- sfepy.discrete.fem.refine_hanging.refine_region(domain0, region0, region1)¶
Coarse cell sub_cells[ii, 0] in mesh0 is split into sub_cells[ii, 1:] in mesh1.
The new fine cells are interleaved among the original coarse cells so that the indices of the coarse cells do not change.
The cell groups are preserved. The vertex groups are preserved only in the coarse (non-refined) cells.