def test_no_active_cells():
    active_cells = sgrid.active_cell_index_at_nodes((3, 2))

    assert_array_equal(
        active_cells,
        np.array([
            BAD_INDEX_VALUE, BAD_INDEX_VALUE, BAD_INDEX_VALUE, BAD_INDEX_VALUE,
            BAD_INDEX_VALUE, BAD_INDEX_VALUE
        ]))
def test_no_active_cells():
    active_cells = sgrid.active_cell_index_at_nodes((3, 2))

    assert_array_equal(
        active_cells,
        np.array([BAD_INDEX_VALUE, BAD_INDEX_VALUE,
                  BAD_INDEX_VALUE, BAD_INDEX_VALUE,
                  BAD_INDEX_VALUE, BAD_INDEX_VALUE])
    )
    def test_no_active_cells(self):
        active_cells = sgrid.active_cell_index_at_nodes((3, 2))

        self.assertArrayEqual(
            active_cells,
            np.array([BAD_INDEX_VALUE, BAD_INDEX_VALUE,
                      BAD_INDEX_VALUE, BAD_INDEX_VALUE,
                      BAD_INDEX_VALUE, BAD_INDEX_VALUE])
        )
def test_node_active_cell_one_active_cell():
    active_cells = sgrid.active_cell_index_at_nodes((3, 3))

    assert_array_equal(
        active_cells,
        np.array([
            BAD_INDEX_VALUE,
            BAD_INDEX_VALUE,
            BAD_INDEX_VALUE,
            BAD_INDEX_VALUE,
            0,
            BAD_INDEX_VALUE,
            BAD_INDEX_VALUE,
            BAD_INDEX_VALUE,
            BAD_INDEX_VALUE,
        ]),
    )
Example #5
0
def test_node_active_cell_one_active_cell():
    active_cells = sgrid.active_cell_index_at_nodes((3, 3))

    assert_array_equal(
        active_cells,
        np.array(
            [
                BAD_INDEX_VALUE,
                BAD_INDEX_VALUE,
                BAD_INDEX_VALUE,
                BAD_INDEX_VALUE,
                0,
                BAD_INDEX_VALUE,
                BAD_INDEX_VALUE,
                BAD_INDEX_VALUE,
                BAD_INDEX_VALUE,
            ]
        ),
    )