Skip to content

fracture.ccp: functions, arrays, and thread safe cohesive force assembly refactor#336

Open
alexholmes814 wants to merge 13 commits into
lanl:mainfrom
alexholmes814:fracture-lanl-summer-2026
Open

fracture.ccp: functions, arrays, and thread safe cohesive force assembly refactor#336
alexholmes814 wants to merge 13 commits into
lanl:mainfrom
alexholmes814:fracture-lanl-summer-2026

Conversation

@alexholmes814

@alexholmes814 alexholmes814 commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

Description

This PR covers the following refactors in fracture.cpp:

  • Replace RUN kernels with FOR_ALLs
  • Serialize cohesive force assembly via one thread per cohesive pair map (avoids thread collisions for case where two or more cohesive zone node pairs share the same node). This is currently a thread safe placeholder and will eventually be replaced by Nathaniel's parallel, thread safe algorithm "build_multi_node_connectivity"
  • Removed unnecessary guards / checks in fracture.cpp
  • Refactored applicable DCArrayKokkos to CArrayKokkos in fracture.cpp / fracture.hpp
  • Refactored non-initialize member functions to be free functions in fracture.cpp / fracture.hpp (and updated respective function calls in sgh_execute.cpp)

Type of change

Please select all relevant options

  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Formatting and/or style fixes
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

  • Test A : Local regression test for serial and openmp pass; Retested analytical solution for monotonically increasing displacement test
  • Test B : Local NVIDIA GPU regression test through Darwin node passed

Test Configuration:

  • OS version: 15.7.7 (24G720)
  • Hardware: 2.9 GHz 6-Core Intel Core i9
  • Compiler: Clang

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • The code builds from scratch with my new changes
  • [] I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@jacob-moore22 jacob-moore22 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work! lgtm.

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

Successfully merging this pull request may close these issues.

2 participants