Discrete element modeling of the brittle-ductile transition in strength tests for quasi-brittle materials