Closed vavrines closed 1 year ago
This can lead to unconsistent sequential and parallel results in computing the damage
Hello @vavrines,
Thank you for reaching out - you have a valid point here.
The calculation of the damage with calc_damage
is in the current form, one of the functions that only is correct after an update of the body with update_thread_cache!
or update_thread_cache_contact!
, respectively.
All the values of the tid
dimensions are added to the first index.
Unfortunately, the current version of the main branch had a bug, which resulted in inconsistent damage results for the reference results because the update functions were missing.
Please do not hesitate to contact me if you have further questions.
Got it. Overall, I think the package is very well written, thanks for creating it! I guess we can close this now.
Since multithreading is explicitly configured in the current code (with
tid
in most cases), should this line be explicit about the specific thread as well?https://github.com/kfrb/Peridynamics.jl/blob/4110dd2c62853464314eb617e95b84697f5276c1/src/peridynamics_base.jl#L869