def ds_dirn(delxx, append_gridsuffix_to_xx=False):
    gridsuffix = ''
    scalefactor_orthog_inj = []
    for i in range(3):
        if append_gridsuffix_to_xx:
            scalefactor_orthog_inj.append(scalefactor_orthog[i].subs(xx[0], sp.sympify((str(xx[0]) + gridsuffix))).subs(xx[1], sp.sympify((str(xx[1]) + gridsuffix))).subs(xx[2], sp.sympify((str(xx[2]) + gridsuffix))))
        else:
            scalefactor_orthog_inj.append(scalefactor_orthog[i])
    ds_dirn = ixp.zerorank1(3)
    for i in range(3):
        ds_dirn[i] = (delxx[i] * scalefactor_orthog_inj[i])
    return ds_dirn
def ds_dirn(delxx, append_gridsuffix_to_xx=False):
    gridsuffix = 
    scalefactor_orthog_inj = []
    for i in range(3):
        if append_gridsuffix_to_xx:
            scalefactor_orthog_inj.append(scalefactor_orthog[i].subs(xx[0], sp.sympify((str(xx[0]) + gridsuffix))).subs(xx[1], sp.sympify((str(xx[1]) + gridsuffix))).subs(xx[2], sp.sympify((str(xx[2]) + gridsuffix))))
        else:
            scalefactor_orthog_inj.append(scalefactor_orthog[i])
    ds_dirn = ixp.zerorank1(3)
    for i in range(3):
        ds_dirn[i] = (delxx[i] * scalefactor_orthog_inj[i])
    return ds_dirn