Skip to content

Commit

Permalink
Merge pull request #6972 from KratosMultiphysics/fldyn/fix-omp-error-…
Browse files Browse the repository at this point in the history
…in-embedded-elements

[FluDyn] Embedded elements - fix issue in omp
  • Loading branch information
ddiezrod authored May 29, 2020
2 parents 798f336 + a4bb4d2 commit 9266bde
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -447,11 +447,11 @@ class EmbeddedAusasNavierStokes : public Element
// Initialize the nodal EMBEDDED_VELOCITY variable (make it threadsafe)
const array_1d<double,3> zero_vel = ZeroVector(3);
for (auto &r_node : this->GetGeometry()) {
r_node.SetLock();
if (!r_node.Has(EMBEDDED_VELOCITY)) {
r_node.SetLock();
r_node.SetValue(EMBEDDED_VELOCITY, zero_vel);
r_node.UnSetLock();
}
r_node.UnSetLock();
}

KRATOS_CATCH("");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@ void EmbeddedFluidElement<TBaseElement>::Initialize()
// Initialize the nodal EMBEDDED_VELOCITY variable (make it threadsafe)
const array_1d<double,3> zero_vel = ZeroVector(3);
for (auto &r_node : this->GetGeometry()) {
r_node.SetLock();
if (!r_node.Has(EMBEDDED_VELOCITY)) {
r_node.SetLock();
r_node.SetValue(EMBEDDED_VELOCITY, zero_vel);
r_node.UnSetLock();
}
r_node.UnSetLock();
}

KRATOS_CATCH("");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,11 @@ void EmbeddedFluidElementDiscontinuous<TBaseElement>::Initialize()
// Initialize the nodal EMBEDDED_VELOCITY variable (make it threadsafe)
const array_1d<double,3> zero_vel = ZeroVector(3);
for (auto &r_node : this->GetGeometry()) {
r_node.SetLock();
if (!r_node.Has(EMBEDDED_VELOCITY)) {
r_node.SetLock();
r_node.SetValue(EMBEDDED_VELOCITY, zero_vel);
r_node.UnSetLock();
}
r_node.UnSetLock();
}

KRATOS_CATCH("");
Expand Down

0 comments on commit 9266bde

Please sign in to comment.