Check one set of points is inside a surface.
(fro, to)
| 545 | |
| 546 | |
| 547 | def _assert_inside(fro, to): |
| 548 | """Check one set of points is inside a surface.""" |
| 549 | # this is "is_inside" in surface_checks.c |
| 550 | fro_name = _bem_surf_name[fro["id"]] |
| 551 | to_name = _bem_surf_name[to["id"]] |
| 552 | logger.info(f"Checking that surface {fro_name} is inside surface {to_name} ...") |
| 553 | tot_angle = _get_solids(to["rr"][to["tris"]], fro["rr"]) |
| 554 | if (np.abs(tot_angle / (2 * np.pi) - 1.0) > 1e-5).any(): |
| 555 | raise RuntimeError( |
| 556 | f"Surface {fro_name} is not completely inside surface {to_name}" |
| 557 | ) |
| 558 | |
| 559 | |
| 560 | def _check_surfaces(surfs, incomplete="raise"): |