|
46 | 46 | _FaceIDs, |
47 | 47 | make_mesh, |
48 | 48 | ) |
49 | | -from meshmode.mesh.tools import AffineMap, find_point_permutation |
| 49 | +from meshmode.mesh.tools import AffineMap, find_point_to_point_mapping |
50 | 50 |
|
51 | 51 |
|
52 | 52 | __doc__ = """ |
@@ -589,18 +589,18 @@ def evec(i: int) -> np.ndarray: |
589 | 589 | result[i] = 1 |
590 | 590 | return result |
591 | 591 |
|
592 | | - def unpack_single(ary: np.ndarray | None) -> np.ndarray: |
| 592 | + def unpack_single(ary: np.ndarray | None) -> int: |
593 | 593 | assert ary is not None |
594 | 594 | item, = ary |
595 | 595 | return item |
596 | 596 |
|
597 | | - base_vertex_index = unpack_single(find_point_permutation( |
598 | | - targets=-np.ones(grp.dim), |
599 | | - permutees=grp.vertex_unit_coordinates().T)) |
| 597 | + base_vertex_index = unpack_single(find_point_to_point_mapping( |
| 598 | + src_points=-np.ones(grp.dim).reshape(-1, 1), |
| 599 | + tgt_points=grp.vertex_unit_coordinates().T)) |
600 | 600 | spanning_vertex_indices = [ |
601 | | - unpack_single(find_point_permutation( |
602 | | - targets=-np.ones(grp.dim) + 2 * evec(i), |
603 | | - permutees=grp.vertex_unit_coordinates().T)) |
| 601 | + unpack_single(find_point_to_point_mapping( |
| 602 | + src_points=(-np.ones(grp.dim) + 2 * evec(i)).reshape(-1, 1), |
| 603 | + tgt_points=grp.vertex_unit_coordinates().T)) |
604 | 604 | for i in range(grp.dim) |
605 | 605 | ] |
606 | 606 |
|
@@ -748,11 +748,10 @@ def _get_tensor_product_element_flip_matrix_and_vertex_permutation( |
748 | 748 | unit_flip_matrix, |
749 | 749 | grp.vertex_unit_coordinates().T) |
750 | 750 |
|
751 | | - vertex_permutation_to = find_point_permutation( |
752 | | - targets=flipped_vertices, |
753 | | - permutees=grp.vertex_unit_coordinates().T, |
754 | | - ) |
755 | | - if vertex_permutation_to is None: |
| 751 | + vertex_permutation_to = find_point_to_point_mapping( |
| 752 | + src_points=flipped_vertices, |
| 753 | + tgt_points=grp.vertex_unit_coordinates().T) |
| 754 | + if np.any(vertex_permutation_to < 0): |
756 | 755 | raise RuntimeError("flip permutation was not found") |
757 | 756 |
|
758 | 757 | flipped_unit_nodes = np.einsum("ij,jn->in", unit_flip_matrix, grp.unit_nodes) |
@@ -1140,7 +1139,6 @@ def _match_boundary_faces( |
1140 | 1139 | bdry_m_vertices = mesh.vertices[:, bdry_m_vertex_indices] |
1141 | 1140 | bdry_n_vertices = mesh.vertices[:, bdry_n_vertex_indices] |
1142 | 1141 |
|
1143 | | - from meshmode.mesh.tools import find_point_to_point_mapping |
1144 | 1142 | m_idx_to_n_idx = find_point_to_point_mapping( |
1145 | 1143 | bdry_pair_mapping.aff_map(bdry_m_vertices), |
1146 | 1144 | bdry_n_vertices) |
|
0 commit comments