Energy minimization and Kirchhoff’s laws in Negative Capacitance Ferroelectric Capacitors and MOSFETs