Discrete And Continuum Modeling Of Brittle And Ductile Fracture Within The Framework Of Finite Element Method