generate_boundary_map#
- cherab.lhd.emc3.inversion.polygon.generate_boundary_map(zone1, zone2, index_type='coarse', min_points=200, ratio=0.0)#
Generate boundary map.
This function calculates boundary map between two zones. In case of a pair of “zone0” and “zone11”, which are adjoined each other at the 9 degree in toroidal, the map determines which cell of the next (backward) zone the last cell of the previous (forward) zone touches.
Note
Currently, the pairs “zone0” and “zone11” are assumed and verified. There is no guarantee that the other pairs will work well.
- Parameters:
- zone1
str Name of forward zone.
- zone2
str Name of backward zone
- index_type{“coarse”, “cell”}
Index type, by default
"coarse".- min_points
int Number of minimum points to generate, by default 200.
- ratio
float Ratio to area of the polygon, by default 0.0. 0.0 means that the number of points is always
min_points.
- zone1
- Returns:
- (
N,M)scipy.sparse.lil_matrix Array of boundary map between zone1 and zone2.
- (
Examples
>>> vmap = generate_boundary_map("zone0", "zone11", index_type="coarse")