ndiffusion.UnstructuredMesh2D

class ndiffusion.UnstructuredMesh2D

2-D unstructured mesh of polygonal cells.

Define vertices, cell connectivity, and (optionally) boundary faces:

vx, vy         : vertex coordinates [n_verts]
cell_vertices  : flat vertex-index list for all cells
cell_offsets   : size n_cells+1; offsets into cell_vertices
                 cell c owns verts [offsets[c] .. offsets[c+1])
                 any simple polygon, vertices in order (either winding)
material_id    : material index per cell [n_cells]
bface_v0/v1    : vertex-pair lists defining boundary faces
bface_bc_tag   : BC tag per boundary face (index into bc array)
                 defaults to 0 if shorter than bface_v0
periodic_a0/a1 : edges joined periodically to periodic_b0/b1
                 (vertex to corresponding vertex)
__init__(self: ndiffusion._core.UnstructuredMesh2D) → None

Methods

__init__(self)

Attributes

property bface_bc_tag
property bface_v0
property bface_v1
property cell_offsets
property cell_vertices
property material_id
property periodic_a0
property periodic_a1
property periodic_b0

Periodic boundary pairs. Pair k joins edge (periodic_a0[k], periodic_a1[k]) to (periodic_b0[k], periodic_b1[k]), vertex to corresponding vertex: a0 maps to b0 and a1 to b1. Those edges are then interior faces rather than boundaries, so the flux is continuous across them. The correspondence fixes the rigid transform, so a translation (a repeating lattice) and a rotation (a symmetry sector without mirror symmetry) are both expressible. Unlike a reflective condition this imposes no symmetry of its own, so it is the right choice for a rotationally symmetric core.

property periodic_b1
property vx
property vy