def test_minimal_zero_mat(self, backend, skip_cuda):

        code = c_for("i", 1,
                     c_for("j", 1,
                           Assign(Symbol("local_mat", ("i", "j")), c_sym("0.0"))))
        zero_mat_code = FunDecl("void", "zero_mat",
                                [Decl("double", Symbol("local_mat", (1, 1)))],
                                Block([code], open_scope=False))

        nelems = 128
        set = op2.Set(nelems)
        map = op2.Map(set, set, 1, np.array(range(nelems), np.uint32))
        sparsity = op2.Sparsity((set, set), (map, map))
        mat = op2.Mat(sparsity, np.float64)
        kernel = op2.Kernel(zero_mat_code, "zero_mat")
        op2.par_loop(kernel, set,
                     mat(op2.WRITE, (map[op2.i[0]], map[op2.i[1]])))

        mat.assemble()
        expected_matrix = np.zeros((nelems, nelems), dtype=np.float64)
        eps = 1.e-12
        assert_allclose(mat.values, expected_matrix, eps)
Check if nodes are already authorized
dataset/ETHPy150Open OP2/PyOP2/test/unit/test_matrices.py/TestMatrices.test_minimal_zero_mat--crossover with--dataset/ETHPy150Open saltstack/salt/salt/modules/pcs.py/is_auth