Pyspark, Finite Element Analysis, Mathematical Modeling, Databricks.
(index_df .withColumn("node_row_index_for_n1", (col("node_column_index_n1") - 1) * (N2 + 1) + col("node_row_index_n1")) .withColumn("node_row_index_for_n2", (col("node_column_index_n2") - 1) * (N2 + 1) + col("node_row_index_n2")) .select("alpha", "n1", "n2", "node_row_index_for_n1",