Finite element formulation of a new nonlocal damage model