Skip to content

Commit

Permalink
Fix error in unit test from unsynched bulk (#1260)
Browse files Browse the repository at this point in the history
  • Loading branch information
marchdf authored Apr 18, 2024
1 parent e320e98 commit 83c6597
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 6 deletions.
3 changes: 2 additions & 1 deletion unit_tests/UnitTestUtils.C
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,11 @@ create_one_element(
}
auto elem = stk::mesh::declare_element(
bulk, block_1, bulk.parallel_rank() + 1, nodeIds);
stk::mesh::create_all_sides(bulk, block_1, allSurfaces, false);

bulk.modification_end();

stk::mesh::create_all_sides(bulk, block_1, allSurfaces, false);

auto surfaceSelector = stk::mesh::selectUnion(allSurfaces);
stk::mesh::EntityVector all_faces;
stk::mesh::get_selected_entities(
Expand Down
3 changes: 2 additions & 1 deletion unit_tests/matrix_free/UnitTestConductionFields.C
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,11 @@ protected:
}
auto elem = stk::mesh::declare_element(
*bulk, block_1, bulk->parallel_rank() + 1, nodeIds);
stk::mesh::create_all_sides(*bulk, block_1, allSurfaces, false);

bulk->modification_end();

stk::mesh::create_all_sides(*bulk, block_1, allSurfaces, false);

auto surfaceSelector = stk::mesh::selectUnion(allSurfaces);
stk::mesh::EntityVector all_faces;
stk::mesh::get_selected_entities(
Expand Down
3 changes: 2 additions & 1 deletion unit_tests/matrix_free/UnitTestStkSimdConnectivityMap.C
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,11 @@ protected:
}
auto elem = stk::mesh::declare_element(
bulk, block_1, bulk.parallel_rank() + 1, nodeIds);
stk::mesh::create_all_sides(bulk, block_1, allSurfaces, false);

bulk.modification_end();

stk::mesh::create_all_sides(bulk, block_1, allSurfaces, false);

auto surfaceSelector = stk::mesh::selectUnion(allSurfaces);
stk::mesh::EntityVector all_faces;
stk::mesh::get_selected_entities(
Expand Down
3 changes: 2 additions & 1 deletion unit_tests/matrix_free/UnitTestStkSimdFaceConnectivityMap.C
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,11 @@ protected:
}
auto elem = stk::mesh::declare_element(
bulk, block_1, bulk.parallel_rank() + 1, nodeIds);
stk::mesh::create_all_sides(bulk, block_1, allSurfaces, false);

bulk.modification_end();

stk::mesh::create_all_sides(bulk, block_1, allSurfaces, false);

auto surfaceSelector = stk::mesh::selectUnion(allSurfaces);
stk::mesh::EntityVector all_faces;
stk::mesh::get_selected_entities(
Expand Down
3 changes: 2 additions & 1 deletion unit_tests/matrix_free/UnitTestStkSimdGatheredElementData.C
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,11 @@ protected:
}
auto elem = stk::mesh::declare_element(
bulk, block_1, bulk.parallel_rank() + 1, nodeIds);
stk::mesh::create_all_sides(bulk, block_1, allSurfaces, false);

bulk.modification_end();

stk::mesh::create_all_sides(bulk, block_1, allSurfaces, false);

std::vector<std::vector<double>> nodeLocations = {
{-1, -1, -1}, {+1, -1, -1}, {+1, +1, -1}, {-1, +1, -1},
{-1, -1, +1}, {+1, -1, +1}, {+1, +1, +1}, {-1, +1, +1}};
Expand Down
3 changes: 2 additions & 1 deletion unit_tests/matrix_free/UnitTestStkSimdNodeConnectivityMap.C
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,11 @@ protected:
stk::topology::NODE_RANK, id, stk::mesh::PartVector{});
}
auto elem = stk::mesh::declare_element(bulk, block_1, 1, nodeIds);
stk::mesh::create_all_sides(bulk, block_1, allSurfaces, false);

bulk.modification_end();

stk::mesh::create_all_sides(bulk, block_1, allSurfaces, false);

auto surfaceSelector = stk::mesh::selectUnion(allSurfaces);
stk::mesh::EntityVector all_faces;
stk::mesh::get_selected_entities(
Expand Down

0 comments on commit 83c6597

Please sign in to comment.