for future extension, please keep in mind that we have more than two nodes for higher-order line elements. so this function actually copies linear order.