A 3D passivity-based adaptive algorithm for automated parameterized macromodeling of electromagnetic structures