Skip to content

Commit

Permalink
[StructuralMechanicsApplication] Fix #6431
Browse files Browse the repository at this point in the history
Fixes #6431

Removed unused NEIGHBOUR_ELEMENTS from the check, and improves NEIGHBOUR_NODES check
  • Loading branch information
loumalouomega committed May 26, 2020
1 parent a97c295 commit 6369935
Showing 1 changed file with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1350,13 +1350,12 @@ int SolidShellElementSprism3D6N::Check(const ProcessInfo& rCurrentProcessInfo) c
KRATOS_TRY;

/* Check the neighbours have been calculated */
// Neighbour elements
const GlobalPointersVector< Element >& p_neighbour_elements = this->GetValue(NEIGHBOUR_ELEMENTS);
KRATOS_ERROR_IF(p_neighbour_elements.size() == 0) << "The neighbour elements are not calculated" << std::endl;

// Neighbour nodes
const WeakPointerVectorNodesType& p_neighbour_nodes = this->GetValue(NEIGHBOUR_NODES);
KRATOS_ERROR_IF(p_neighbour_nodes.size() == 0) << "The neighbour nodes are not calculated" << std::endl;
KRATOS_ERROR_IF_NOT(this->Has(NEIGHBOUR_NODES)) << "The neighbour nodes are not calculated" << std::endl;
if (this->Has(NEIGHBOUR_NODES)) {
const WeakPointerVectorNodesType& p_neighbour_nodes = this->GetValue(NEIGHBOUR_NODES);
KRATOS_ERROR_IF(p_neighbour_nodes.size() == 0) << "The neighbour nodes calculated are empty" << std::endl;
}

const int check = BaseType::Check(rCurrentProcessInfo);

Expand Down

0 comments on commit 6369935

Please sign in to comment.