def basis_transform_tensorDD_from_rfmbasis_to_Cartesian(Jac_dUrfm_dDCartUD, src_tensorDD):
    Cart_dst_tensorDD = ixp.zerorank2()
    for i in range(3):
        for j in range(3):
            for l in range(3):
                for m in range(3):
                    Cart_dst_tensorDD[i][j] += ((Jac_dUrfm_dDCartUD[l][i] * Jac_dUrfm_dDCartUD[m][j]) * src_tensorDD[l][m])
    return Cart_dst_tensorDD
def basis_transform_tensorDD_from_rfmbasis_to_Cartesian(Jac_dUrfm_dDCartUD, src_tensorDD):
    Cart_dst_tensorDD = ixp.zerorank2()
    for i in range(3):
        for j in range(3):
            for l in range(3):
                for m in range(3):
                    Cart_dst_tensorDD[i][j] += ((Jac_dUrfm_dDCartUD[l][i] * Jac_dUrfm_dDCartUD[m][j]) * src_tensorDD[l][m])
    return Cart_dst_tensorDD