def test_set_matrix(self, backend, mat, elements, elem_node,
                        kernel_inc, kernel_set, g, skip_cuda):
        mat.zero()
        op2.par_loop(kernel_inc, elements,
                     mat(op2.INC, (elem_node[op2.i[0]], elem_node[op2.i[1]])),
                     g(op2.READ))
        mat.assemble()
        # Check we have ones in the matrix
        assert mat.values.sum() == 3 * 3 * elements.size
        op2.par_loop(kernel_set, elements,
                     mat(op2.WRITE, (elem_node[op2.i[0]], elem_node[op2.i[1]])),
                     g(op2.READ))
        mat.assemble()
        assert mat.values.sum() == (3 * 3 - 2) * elements.size
        mat.zero()
Test accessing a scalar matrix with the WRITE access by adding some
dataset/ETHPy150Open OP2/PyOP2/test/unit/test_matrices.py/TestMatrices.test_set_matrix