A compact formulation for response matrix nodal simulation