A diffusive dynamic brittle fracture model for heterogeneous solids and porous materials with implementation using a user-element subroutine