Compact modeling of multi-gate transistors