Debian Codegraph @

packages/stk/stk_integration_tests/stk_mesh/face_creation/skin_mesh/IntegrationTestSkinAllBoundaries.cpp

raw
1 /*--------------------------------------------------------------------*/
2 /* Copyright 2002 - 2008, 2010, 2011 National Technology & */
3 /* Engineering Solutions of Sandia, LLC (NTESS). Under the terms */
4 /* of Contract DE-NA0003525 with NTESS, there is a */
5 /* non-exclusive license for use of this work by or on behalf */
6 /* of the U.S. Government. Export of this program may require */
7 /* a license from the United States Government. */
8 /*--------------------------------------------------------------------*/
9
10 #include <gtest/gtest.h> // for AssertHelper, EXPECT_EQ, etc
11 #include <Ionit_Initializer.h> // for Initializer
12 #include <stddef.h> // for size_t, nullptr
13 #include <stk_io/StkMeshIoBroker.hpp> // for StkMeshIoBroker
14 #include <string> // for string
15 #include "mpi.h" // for MPI_COMM_WORLD
16 #include "stk_io/DatabasePurpose.hpp"
17 #include <stk_mesh/base/GetEntities.hpp>
18 #include <stk_mesh/base/Comm.hpp>
19 #include <stk_mesh/base/SkinBoundary.hpp>
20 #include <stk_unit_test_utils/ioUtils.hpp>
21 #include <stk_unit_test_utils/MeshFixture.hpp> // for MeshTestFixture
22 #include <stk_unit_test_utils/FaceCreationTestUtils.hpp>
23
24 namespace
25 {
26
27 const SideTestUtil::TestCaseData allBoundarySidesTestCases =
28 {
29 // filename, max #side sideset
30 // #procs, entities,
31 {"AA.e", 2, 10, {{1, 0}, {1, 1}, {1, 2}, {1, 3}, {1, 4}, {2, 0}, {2, 1}, {2, 2}, {2, 3}, {2, 5}}},
32 {"AB.e", 2, 11, {{1, 0}, {1, 1}, {1, 2}, {1, 3}, {1, 4}, {1, 5}, {2, 0}, {2, 1}, {2, 2}, {2, 3}, {2, 4}, {2, 5}}},
33 {"Ae.e", 2, 7, {{1, 0}, {1, 1}, {1, 2}, {1, 3}, {1, 4}, {1, 5}, {2, 0}, {2, 1}}},
34 {"Aef.e", 3, 7, {{1, 0}, {1, 1}, {1, 2}, {1, 3}, {1, 4}, {1, 5}, {2, 0}, {2, 1}, {3, 0}, {3, 1}}},
35 {"AeA.e", 3, 12, {{1, 0}, {1, 1}, {1, 2}, {1, 3}, {1, 4}, {1, 5}, {2, 0}, {2, 1}, {2, 2}, {2, 3}, {2, 4}, {2, 5}, {3, 0}, {3, 1}}},
36 {"AeB.e", 3, 12, {{1, 0}, {1, 1}, {1, 2}, {1, 3}, {1, 4}, {1, 5}, {2, 0}, {2, 1}, {3, 0}, {3, 1}, {3, 2}, {3, 3}, {3, 4}, {3, 5}}},
37 {"AefA.e", 4, 12, {{1, 0}, {1, 1}, {1, 2}, {1, 3}, {1, 4}, {1, 5}, {2, 0}, {2, 1}, {2, 2}, {2, 3}, {2, 4}, {2, 5}, {3, 0}, {3, 1}, {4, 0}, {4, 1}}},
38 {"AefB.e", 4, 12, {{1, 0}, {1, 1}, {1, 2}, {1, 3}, {1, 4}, {1, 5}, {2, 0}, {2, 1}, {3, 0}, {3, 1}, {4, 0}, {4, 1}, {4, 2}, {4, 3}, {4, 4}, {4, 5}}},
39 {"ef.e", 2, 2, {{1, 0}, {1, 1}, {2, 0}, {2, 1}}},
40
41 {"ALRA_doubleKissing.e", 2, 8, {{1, 0}, {1, 3}, {1, 4}, {1, 5}, {2, 1}, {2, 2}, {2, 4}, {2, 5}}},
42 {"AB_doubleKissing.e", 2, 10, {{1, 0}, {1, 1}, {1, 2}, {1, 3}, {1, 4}, {1, 5}, {2, 0}, {2, 1}, {2, 2}, {2, 3}, {2, 4}, {2, 5}}},
43
44 {"Tg.e", 2, 6, {{1, 0}, {1, 1}, {1, 2}, {1, 3}, {2, 0}, {2, 1}}},
45 {"ZY.e", 2, 11, {{1, 0}, {1, 1}, {1, 2}, {1, 3}, {1, 4}, {1, 5}, {2, 0}, {2, 1}, {2, 2}, {2, 3}, {2, 4}, {2, 5}}},
46 {"AP.e", 2, 11, {{1, 0}, {1, 1}, {1, 2}, {1, 3}, {1, 4}, {1, 5}, {2, 0}, {2, 1}, {2, 2}, {2, 3}, {2, 4}, {2, 5}}},
47 };
48
49 void create_all_boundary_sides(stk::mesh::BulkData& /*bulkData*/, stk::mesh::Selector /*stuffToSkin*/, const stk::mesh::PartVector& /*partsToAdd*/)
50 {
51 }
52
53 class AllBoundarySidesTester : public SideTestUtil::SideCreationTester
54 {
55 public:
56 AllBoundarySidesTester() : SideTestUtil::SideCreationTester(MPI_COMM_WORLD) {}
57 protected:
58 virtual void test_side_creation(stk::mesh::BulkData& bulkData,
59 const SideTestUtil::TestCase& testCase)
60 {
61 stk::mesh::Part& skinnedPart = bulkData.mesh_meta_data().declare_part("interior");
62 create_all_boundary_sides(bulkData, bulkData.mesh_meta_data().universal_part(), stk::mesh::PartVector{&skinnedPart});
63 expect_all_boundary_sides_connected_as_specified_in_test_case(bulkData, testCase, bulkData.mesh_meta_data().universal_part(), skinnedPart);
64 }
65
66 };
67
68 //Disabled because we haven't had a story to implement create_all_boundary_sides yet. Trivial implementation
69 //of calling create_exposed then create_interior did not work.
70 TEST(AllBoundarySidesTest, DISABLED_run_all_test_cases_aura)
71 {
72 AllBoundarySidesTester().run_all_test_cases(allBoundarySidesTestCases, stk::mesh::BulkData::AUTO_AURA);
73 }
74
75 TEST(AllBoundarySidesTest, DISABLED_run_all_test_cases_no_aura)
76 {
77 AllBoundarySidesTester().run_all_test_cases(allBoundarySidesTestCases, stk::mesh::BulkData::NO_AUTO_AURA);
78 }
79
80 }