Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question on damage computation #11

Closed
vavrines opened this issue Apr 25, 2023 · 3 comments
Closed

Question on damage computation #11

vavrines opened this issue Apr 25, 2023 · 3 comments

Comments

@vavrines
Copy link

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

@vavrines
Copy link
Author

This can lead to unconsistent sequential and parallel results in computing the damage

@kaipartmann
Copy link
Owner

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.

https://github.com/kfrb/Peridynamics.jl/blob/9e26b578d00c27668ff9a3865f89f2116ab1c2c9/src/peridynamics_base.jl#L1121-L1136

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.

@vavrines
Copy link
Author

Got it. Overall, I think the package is very well written, thanks for creating it! I guess we can close this now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants