Eigenerosion for static and dynamic brittle fracture