tjhei / cracks

pfm-cracks: A Finite Element code for crack propagation
GNU General Public License v2.0
81 stars 45 forks source link

Fixed NaN problem for 2x2 matrix with nonzero [1][1] element #1

Closed prashantmital closed 8 years ago

prashantmital commented 8 years ago

The current check was not thorough enough to correctly resolve eigenvalues for cases in which all entries apart from (1,1) are zero. This produced a NaN which caused downstream operations to breakdown.

Example of input that produces a Nan:

0    0
0    8
prashantmital commented 8 years ago

@tjhei I am using some snippets from this code for the purpose of my MS Thesis. I will share my code openly once I have finished! Thought I would make this PR in case you also faced issues sometimes with this functionality. I'm actually a student in Mary's group working on Phase-Field. Thomas is my Reader and has been guiding me. The motivation for the affected part is described on the final page of your preprint "A primal-dual active set method and predictor-corrector mesh adaptivity for computing fracture propagation using a phase-field approach". It's great to see deal.ii code here in the wild :+1:

tjhei commented 8 years ago

Awesome, thanks for contributing back! Yes, this change makes a lot of sense.