Source code for landlab.grid.hex_mappers

#!/usr/bin/env python3
"""Grid element mappers that are specific to hex grids.

Mapping functions unique to hex grids
+++++++++++++++++++++++++++++++++++++

.. autosummary::

    ~map_link_vector_components_to_node_hex
"""
import enum

import numpy as np


[docs] class LinkAtNode(enum.IntEnum): EAST = 0 # array column of link to east/right of node, horizontal grid ENE = 0 # array column of link to ene/upper right of node, vertical grid NNE = 1 # array column of link to nne/upper right of node, horizontal grid NORTH = 1 # array column of link to north/top of node, vertical grid NNW = 2 # array column of link to nnw/upper left of node, horizontal grid WNW = 2 # array column of link to wnw/upper left of node, vertical grid WEST = 3 # array column of link to west/left of node, horizontal grid WSW = 3 # array column of link to wsw/lower left of node, vertical grid SSW = 4 # array column of link to ssw/lower left of node, horizontal grid SOUTH = 4 # array column of link to south/bottom of node, vertical grid SSE = 5 # array column of link to sse/lower right of node, horizontal grid ESE = 5 # array column of link to ese/lower right of node, vertical grid
SIN60 = np.sin(np.deg2rad(60.0))