11 #include <stk_util/unit_test_support/stk_utest_macros.hpp>
13 #include <stk_mesh/fixtures/QuadFixture.hpp>
14 #include <stk_mesh/fixtures/HexFixture.hpp>
18 STKUNIT_UNIT_TEST ( UnitTestCrackMesh , VerifyDestroy2D )
26 const unsigned nx = 3 , ny = 3 ;
28 for (
unsigned iy = 0 ; iy < ny ; ++iy ) {
29 for (
unsigned ix = 0 ; ix < nx ; ++ix ) {
31 fixture.m_fem_meta.commit();
32 fixture.generate_mesh();
34 fixture.m_bulk_data.modification_begin();
40 fixture.m_bulk_data.destroy_entity( tmp );
43 fixture.m_bulk_data.modification_end();
46 STKUNIT_EXPECT_TRUE ( elem->
log_query() == stk_classic::mesh::EntityLogDeleted );
52 STKUNIT_UNIT_TEST ( UnitTestCrackMesh , VerifyDestroy3D )
60 const unsigned nx = 3 , ny = 3 , nz = 3 ;
62 for (
unsigned iz = 0 ; iz < nz ; ++iz ) {
63 for (
unsigned iy = 0 ; iy < ny ; ++iy ) {
64 for (
unsigned ix = 0 ; ix < nx ; ++ix ) {
66 fixture.m_fem_meta.commit();
67 fixture.generate_mesh();
69 fixture.m_bulk_data.modification_begin();
75 fixture.m_bulk_data.destroy_entity( tmp );
78 fixture.m_bulk_data.modification_end();
81 STKUNIT_EXPECT_TRUE ( elem->
log_query() == stk_classic::mesh::EntityLogDeleted );
90 STKUNIT_UNIT_TEST ( UnitTestCrackMesh , verifyBoxGhosting )
98 fixture.m_fem_meta.commit();
99 fixture.generate_mesh();
110 unsigned right_ordinal = 0;
111 unsigned new_node_id = 28;
116 if ( old_node && right_element ) {
119 for (; rel.first != rel.second; ++rel) {
120 if ( (rel.first->entity()) == right_element) {
121 right_ordinal = rel.first->identifier();
131 if ( right_element &&
150 if ( right_element ) {
154 STKUNIT_EXPECT_TRUE ( new_node.
identifier() == new_node_id );