Skip to content

Commit

Permalink
Make node patch recovery threadsafe (idaholab#26053)
Browse files Browse the repository at this point in the history
  • Loading branch information
dschwen committed Nov 17, 2023
1 parent 0226581 commit b6d88c3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion framework/include/userobjects/NodalPatchRecoveryBase.h
Expand Up @@ -31,8 +31,8 @@ class NodalPatchRecoveryBase : public ElementUserObject

virtual void initialize() override;
virtual void execute() override;
virtual void threadJoin(const UserObject &) override;
virtual void finalize() override;
virtual void threadJoin(const UserObject &) override {}

protected:
/// Compute the quantity to recover using nodal patch recovery
Expand Down
8 changes: 8 additions & 0 deletions framework/src/userobjects/NodalPatchRecoveryBase.C
Expand Up @@ -116,6 +116,14 @@ NodalPatchRecoveryBase::execute()
_be[elem_id] = be;
}

void
NodalPatchRecoveryBase::threadJoin(const UserObject & uo)
{
const auto & npr = static_cast<const NodalPatchRecoveryBase &>(uo);
_Ae.insert(npr._Ae.begin(), npr._Ae.end());
_be.insert(npr._be.begin(), npr._be.end());
}

void
NodalPatchRecoveryBase::finalize()
{
Expand Down

0 comments on commit b6d88c3

Please sign in to comment.