Integrable 2D and 3D piecewise smooth vector fields with chaotic behavior and preserving energy or not - Carvalho, Tiago de (Physica D: Nonlinear Phenomena, 2024)