polaris.mesh.connectivity.active_edge_masks

polaris.mesh.connectivity.active_edge_masks(ds_mesh, cell_mask)[source]

Find, for each local edge of each cell, whether the neighboring cell across that edge and across the next and previous edges around the same cell belong to the domain.

An edge is “active” when the cell on the other side of it is part of the domain, so an active edge is one across which the two models can move water or ice. Two edges that are adjacent in a cell’s edge ordering meet at a vertex, so active & active_next marks the vertices of the cell whose surrounding cells all belong to the domain.

Parameters:
Returns:

  • active (numpy.ndarray) – A boolean array of shape (nCells, maxEdges) that is True where the neighbor across the local edge is in the domain

  • active_next (numpy.ndarray) – The same for the next edge around each cell

  • active_prev (numpy.ndarray) – The same for the previous edge around each cell