def test__compute_edges_linear(self): nodes = np.asfortranarray([[0.0, 2.0, -3.0], [0.0, 1.0, 3.0]]) p100, p010, p001 = nodes.T triangle = self._make_one(nodes, 1) edge1, edge2, edge3 = triangle._compute_edges() nodes1 = np.asfortranarray(np.vstack([p100, p010]).T) nodes2 = np.asfortranarray(np.vstack([p010, p001]).T) nodes3 = np.asfortranarray(np.vstack([p001, p100]).T) self._edges_helper(edge1, edge2, edge3, nodes1, nodes2, nodes3)
def test__compute_edges_quadratic(self): nodes = self.QUADRATIC p200, p110, p020, p101, p011, p002 = nodes.T triangle = self._make_one(nodes, 2) edges = triangle._compute_edges() nodes1 = np.asfortranarray(np.vstack([p200, p110, p020]).T) nodes2 = np.asfortranarray(np.vstack([p020, p011, p002]).T) nodes3 = np.asfortranarray(np.vstack([p002, p101, p200]).T) self._edges_helper(edges[0], edges[1], edges[2], nodes1, nodes2, nodes3)
def test__compute_edges_linear(self): nodes = np.asfortranarray([[0.0, 2.0, -3.0], [0.0, 1.0, 3.0]]) # pylint: disable=unpacking-non-sequence p100, p010, p001 = nodes.T # pylint: enable=unpacking-non-sequence triangle = self._make_one(nodes, 1) edge1, edge2, edge3 = triangle._compute_edges() nodes1 = np.asfortranarray(np.vstack([p100, p010]).T) nodes2 = np.asfortranarray(np.vstack([p010, p001]).T) nodes3 = np.asfortranarray(np.vstack([p001, p100]).T) self._edges_helper(edge1, edge2, edge3, nodes1, nodes2, nodes3)
def test__compute_edges_quadratic(self): nodes = self.QUADRATIC # pylint: disable=unpacking-non-sequence p200, p110, p020, p101, p011, p002 = nodes.T # pylint: enable=unpacking-non-sequence triangle = self._make_one(nodes, 2) edges = triangle._compute_edges() nodes1 = np.asfortranarray(np.vstack([p200, p110, p020]).T) nodes2 = np.asfortranarray(np.vstack([p020, p011, p002]).T) nodes3 = np.asfortranarray(np.vstack([p002, p101, p200]).T) self._edges_helper(edges[0], edges[1], edges[2], nodes1, nodes2, nodes3)
def test__compute_edges_cubic(self): nodes = np.asfortranarray([ [ 0.0, 0.328125, 0.65625, 1.0, 0.1484375, 0.5, 1.0, 0.1484375, 0.53125, 0.0, ], [ 0.0, 0.1484375, 0.1484375, 0.0, 0.328125, 0.5, 0.53125, 0.65625, 1.0, 1.0, ], ]) # pylint: disable=unpacking-non-sequence ( p300, p210, p120, p030, p201, unused_p111, p021, p102, p012, p003, ) = nodes.T # pylint: enable=unpacking-non-sequence triangle = self._make_one(nodes, 3) edges = triangle._compute_edges() self._edges_helper( edges[0], edges[1], edges[2], np.asfortranarray(np.vstack([p300, p210, p120, p030]).T), np.asfortranarray(np.vstack([p030, p021, p012, p003]).T), np.asfortranarray(np.vstack([p003, p102, p201, p300]).T), )