compute_nodal_edge_dirs(nodes, region, field, return_imap=False)¶
Nodal edge directions are computed by simple averaging of direction vectors of edges a node is contained in. Edges are assumed to be straight and a node must be on a single edge (a border node) or shared by exactly two edges.
compute_nodal_normals(nodes, region, field, return_imap=False)¶
Nodal normals are computed by simple averaging of element normals of elements every node is contained in.
extend_cell_data(data, domain, rname, val=None, is_surface=False, average_surface=True)¶
Extend cell data defined in a region to the whole domain.
The data defined in the region.
- domainFEDomain instance
The FE domain.
The region name.
- valfloat, optional
The value for filling cells not covered by the region. If not given, the smallest value in data is used.
If True, the data are defined on a surface region. In that case the values are averaged or summed into the cells containing the region surface faces (a cell can have several faces of the surface), see average_surface.
If True, the data defined on a surface region are averaged, otherwise the data are summed.
The data extended to all domain elements.
Get all edge paths in a graph with non-masked vertices. The mask is updated.
Get a reasonable minimal value of DOFs suitable for extending over a whole domain.
Return the inverse of remap, i.e. a mapping from a sub-range indices to a full range, see
Prepare vector for remapping range [0, n_full] to its subset given by indices.
Prepare vector for translating old_indices to new_indices.
The translation vector. Then new_ar = translate[old_ar].
Uniformly refine level-times a mesh given by filename.
The refined mesh is saved to a file with name constructed from base name of filename and level-times appended ‘_r’ suffix.
The mesh file name.
The refinement level.