Commit 60588556 authored by Alan Williams's avatar Alan Williams
Browse files

fix a stk-topology unit-test failure on gpu.

parent ec7ddad2
......@@ -326,7 +326,8 @@ template <unsigned MAX_NODES>
STK_INLINE_FUNCTION
void check_side_nodes_ngp(stk::topology topology, unsigned gold_side_node_ordinals[][MAX_NODES])
{
stk::mesh::Entity * allElemNodes = new stk::mesh::Entity[topology.num_nodes()];
constexpr unsigned MAX_NODES_PER_ELEM = 100;
stk::mesh::Entity allElemNodes[MAX_NODES_PER_ELEM];
for (unsigned nodeOrdinal = 0; nodeOrdinal < topology.num_nodes(); ++nodeOrdinal) {
allElemNodes[nodeOrdinal] = nodeOrdinal + 100;
}
......@@ -341,15 +342,14 @@ void check_side_nodes_ngp(stk::topology topology, unsigned gold_side_node_ordina
NGP_EXPECT_EQ(gold_side_node_ordinals[side][sideNodeOrdinal] + 100, sideNodes[sideNodeOrdinal].local_offset());
}
}
delete[] allElemNodes;
}
template <unsigned MAX_NODES>
STK_INLINE_FUNCTION
void check_edge_nodes_ngp(stk::topology topology, unsigned gold_edge_node_ordinals[][MAX_NODES])
{
stk::mesh::Entity * allElemNodes = new stk::mesh::Entity[topology.num_nodes()];
constexpr unsigned MAX_NODES_PER_ELEM = 100;
stk::mesh::Entity allElemNodes[MAX_NODES_PER_ELEM];
for (unsigned nodeOrdinal = 0; nodeOrdinal < topology.num_nodes(); ++nodeOrdinal) {
allElemNodes[nodeOrdinal] = nodeOrdinal + 100;
}
......@@ -363,15 +363,14 @@ void check_edge_nodes_ngp(stk::topology topology, unsigned gold_edge_node_ordina
NGP_EXPECT_EQ(gold_edge_node_ordinals[edge][edgeNodeOrdinal] + 100, edgeNodes[edgeNodeOrdinal].local_offset());
}
}
delete[] allElemNodes;
}
template <unsigned MAX_NODES>
STK_INLINE_FUNCTION
void check_face_nodes_ngp(stk::topology topology, unsigned gold_face_node_ordinals[][MAX_NODES])
{
stk::mesh::Entity * allElemNodes = new stk::mesh::Entity[topology.num_nodes()];
constexpr unsigned MAX_NODES_PER_ELEM = 100;
stk::mesh::Entity allElemNodes[MAX_NODES_PER_ELEM];
for (unsigned nodeOrdinal = 0; nodeOrdinal < topology.num_nodes(); ++nodeOrdinal) {
allElemNodes[nodeOrdinal] = nodeOrdinal + 100;
}
......@@ -386,8 +385,6 @@ void check_face_nodes_ngp(stk::topology topology, unsigned gold_face_node_ordina
NGP_EXPECT_EQ(gold_face_node_ordinals[face][faceNodeOrdinal] + 100, faceNodes[faceNodeOrdinal].local_offset());
}
}
delete[] allElemNodes;
}
template <unsigned NUM_NODES>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment