![]() |
The Open FUSION Toolkit 26.9
An open-source framework for fusion and plasma science and engineering
|
Triangular mesh class for topology analysis
Public Member Functions | |
| __init__ (self, r, lf, info=True) | |
| boundary_cycles (self, info=True) | |
| get_face_edge_bop (self) | |
| get_loop_edge_vec (self, path) | |
| merge_cells (self, eflag, pflag) | |
Public Attributes | |
| be = np.zeros((self.ne,), dtype=np.bool_) | |
| bf = np.zeros((self.nf,), dtype=np.bool_) | |
| bp = np.zeros((self.np,), dtype=np.bool_) | |
| klpe = np.zeros((self.np+1,), dtype=np.int32) | |
| kpf = np.zeros((self.np+1,), dtype=np.int32) | |
| lbe = np.zeros((self.nbe,), dtype=np.int32) | |
| lbf = np.zeros((self.nbf,), dtype=np.int32) | |
| lbp = np.zeros((self.nbp,), dtype=np.int32) | |
| le = np.zeros((self.ne,2), dtype=np.int32) | |
| lef = -np.ones((self.ne,2), dtype=np.int32) | |
| lf = lf | |
| lfe = np.zeros((self.nf,3), dtype=np.int32) | |
| lff = np.zeros((self.nf,3), dtype=np.int32) | |
| tuple | llpe = (self.np+1)*np.ones((self.ne,), dtype=np.int32) |
| lpf = np.zeros((self.npf,), dtype=np.int32) | |
| nbe | |
| nbf | |
| nbp | |
| int | ne = 0 |
| nf = lf.shape[0] | |
| np = r.shape[0] | |
| npf = np.sum(nr) | |
| int | nsurfs = np.max(self.surf_tag)+1 |
| r = r | |
| surf_tag = self._orient_surface() | |
Protected Member Functions | |
| _orient_surface (self) | |
| _setup_boundary (self) | |
| _setup_edges (self) | |
| _setup_neighbors (self) | |
Protected Attributes | |
| dict | _non_manifold_edges |
| __init__ | ( | self, | |
| r, | |||
| lf, | |||
| info = True ) |
Construct mesh and orient @param r Vertex list [nv,3] @param lf Face list [nf,3]
|
protected |
Orient surface(s) in mesh to ensure consistency
|
protected |
Locate and mark boundary elements
|
protected |
Construct edges from mesh, building `klpe`, `llpe`, `le`, and `lfe`
|
protected |
Build topology neighbor lists `kpf`, `lpf`, `lef`, and `lff`
| boundary_cycles | ( | self, | |
| info = True ) |
Identify all distinct boundary vertex chains
| get_face_edge_bop | ( | self | ) |
Compute face to edge boundary operator \partial_2
| get_loop_edge_vec | ( | self, | |
| path ) |
Convert vertex chains to edges and compute path length
| merge_cells | ( | self, | |
| eflag, | |||
| pflag ) |
Merge all possible cells while retaining marked edge features
|
protected |
| be = np.zeros((self.ne,), dtype=np.bool_) |
| bf = np.zeros((self.nf,), dtype=np.bool_) |
| bp = np.zeros((self.np,), dtype=np.bool_) |
| klpe = np.zeros((self.np+1,), dtype=np.int32) |
| kpf = np.zeros((self.np+1,), dtype=np.int32) |
| lbe = np.zeros((self.nbe,), dtype=np.int32) |
| lbf = np.zeros((self.nbf,), dtype=np.int32) |
| lbp = np.zeros((self.nbp,), dtype=np.int32) |
| le = np.zeros((self.ne,2), dtype=np.int32) |
| lef = -np.ones((self.ne,2), dtype=np.int32) |
| lf = lf |
| lfe = np.zeros((self.nf,3), dtype=np.int32) |
| lff = np.zeros((self.nf,3), dtype=np.int32) |
| tuple llpe = (self.np+1)*np.ones((self.ne,), dtype=np.int32) |
| lpf = np.zeros((self.npf,), dtype=np.int32) |
| nbe |
| nbf |
| nbp |
| ne = 0 |
| nf = lf.shape[0] |
| np = r.shape[0] |
| npf = np.sum(nr) |
| nsurfs = np.max(self.surf_tag)+1 |
| r = r |
| surf_tag = self._orient_surface() |