Linear and nonlinear triple diffusive convection in the presence of sinusoidal/non-sinusoidal gravity modulation: A comparative study