Exact Dynamic Stiffness Elements Using 1D Higher-Order Theories: Application to Sandwich Beams