Variable stiffness boundary condition to determine effective toughness of heterogeneous materials