Multidomain framework for switched electromechanical dynamics