def METHOD_NAME(
        node : ti.template(), 
        cell : ti.template(),
        S : ti.template()):
    """
    Note:
        三角形网格上的 1 次拉格朗日有限元空间, 组装刚度矩阵
    """
    for c in range(cell.shape[0]):
        x0 = node[cell[c, 0], 0]
        y0 = node[cell[c, 0], 1]
        x1 = node[cell[c, 1], 0]
        y1 = node[cell[c, 1], 1]
        x2 = node[cell[c, 2], 0]
        y2 = node[cell[c, 2], 1]
        l = (x1 - x0)*(y2 - y0) - (y1 - y0)*(x2 - x0) 
        gphi = ti.Matrix([
            [(y1 - y2)/l, (x2 - x1)/l], 
            [(y2 - y0)/l, (x0 - x2)/l],
            [(y0 - y1)/l, (x1 - x0)/l]])
        l *= 0.5
        for i in ti.static(range(3)):
            for j in ti.static(range(3)):
                S[c, i, j] = l*(gphi[i, 0]*gphi[j, 0] +
                        gphi[i, 1]*gphi[j, 1])