Nonlinear analysis of masonry and concrete structures under monotonic and cyclic loading: a regularized multidirectional d+/d− damage model