Finite integration method for nonlocal elastic bar under static and dynamic loads