libMesh
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
MixedDimensionNonUniformRefinement3D Class Reference
Inheritance diagram for MixedDimensionNonUniformRefinement3D:
[legend]

Public Member Functions

 LIBMESH_CPPUNIT_TEST_SUITE (MixedDimensionNonUniformRefinement3D)
 Given a mesh with 36 HEX8 elements and an overlapping QUAD4 element located in the center of the HEX8 elements, this test ensures that when a single HEX8 element is flagged for refinement, which is a neighbor of the QUAD4 element, that the QUAD4 element will is also be flagged for refinement due to an underrefined_boundary_limit of 0 (default) and the neighboring HEX8 element (with respect to the QUAD4 element) will also refined due to an overrefined_boundary_limit of 0 (default). More...
 
 CPPUNIT_TEST (testMesh)
 
 CPPUNIT_TEST (testDofOrdering)
 
 CPPUNIT_TEST_SUITE_END ()
 
void setUp ()
 
void tearDown ()
 
void testMesh ()
 
void testDofOrdering ()
 

Protected Member Functions

void build_mesh ()
 

Protected Attributes

std::unique_ptr< ReplicatedMesh_mesh
 

Detailed Description

Definition at line 865 of file mixed_dim_mesh_test.C.

Member Function Documentation

◆ build_mesh()

void MixedDimensionNonUniformRefinement3D::build_mesh ( )
inlineprotected

Definition at line 890 of file mixed_dim_mesh_test.C.

References libMesh::Elem::build(), libMesh::HEX8, libMesh::QUAD4, libMesh::Real, libMesh::Elem::REFINE, libMesh::MeshRefinement::refine_and_coarsen_elements(), libMesh::Elem::set_node(), and libMesh::Elem::subdomain_id().

891  {
892  _mesh = std::make_unique<ReplicatedMesh>(*TestCommWorld);
893 
894  _mesh->set_mesh_dimension(3);
895 
896  //Add the nodes
897  for (unsigned int z = 0; z < 5; z++)
898  {
899  for (unsigned int y = 0; y < 4; y++)
900  {
901  for (unsigned int x = 0; x < 4; x++)
902  {
903  _mesh->add_point( Point(Real(x),Real(y),Real(z)), 16*z+4*y+x);
904  }
905  }
906  }
907 
908  {
909  //Add the HEX8 elements
910  for (unsigned int z = 0; z < 4; z++)
911  {
912  for (unsigned int y = 0; y < 3; y++)
913  {
914  for (unsigned int x = 0; x < 3; x++)
915  {
916  Elem * hex = _mesh->add_elem(Elem::build(HEX8));
917  hex->set_node(0) = _mesh->node_ptr(x+4*y +16*z );
918  hex->set_node(1) = _mesh->node_ptr(x+4*y +16*z + 1);
919  hex->set_node(2) = _mesh->node_ptr(x+4*(y+1)+16*z + 1);
920  hex->set_node(3) = _mesh->node_ptr(x+4*(y+1)+16*z );
921  hex->set_node(4) = _mesh->node_ptr(x+4*y +16*(z+1) );
922  hex->set_node(5) = _mesh->node_ptr(x+4*y +16*(z+1) + 1);
923  hex->set_node(6) = _mesh->node_ptr(x+4*(y+1)+16*(z+1) + 1);
924  hex->set_node(7) = _mesh->node_ptr(x+4*(y+1)+16*(z+1) );
925  }
926  }
927  }
928  Elem * quad = _mesh->add_elem(Elem::build(QUAD4));
929  unsigned int x=1,y=1,z=2;
930  quad->set_node(0) = _mesh->node_ptr(x+4*y +16*z );
931  quad->set_node(1) = _mesh->node_ptr(x+4*y +16*z + 1);
932  quad->set_node(2) = _mesh->node_ptr(x+4*(y+1)+16*z + 1);
933  quad->set_node(3) = _mesh->node_ptr(x+4*(y+1)+16*z );
934 
935  // 2D elements will have subdomain id 0, this one will have 1
936  quad->subdomain_id() = 1;
937  }
938 
939  _mesh->allow_renumbering(true);
940  _mesh->prepare_for_use();
941 
942 #ifdef LIBMESH_ENABLE_AMR
943  //Flag the bottom element for refinement
944  _mesh->elem_ref(13).set_refinement_flag(Elem::REFINE);
946 #endif
947  }
virtual Node *& set_node(const unsigned int i)
Definition: elem.h:2381
This is the base class from which all geometric element types are derived.
Definition: elem.h:94
Implements (adaptive) mesh refinement algorithms for a MeshBase.
std::unique_ptr< ReplicatedMesh > _mesh
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
subdomain_id_type subdomain_id() const
Definition: elem.h:2391
bool refine_and_coarsen_elements()
Refines and coarsens user-requested elements.
A Point defines a location in LIBMESH_DIM dimensional Real space.
Definition: point.h:39

◆ CPPUNIT_TEST() [1/2]

MixedDimensionNonUniformRefinement3D::CPPUNIT_TEST ( testMesh  )

◆ CPPUNIT_TEST() [2/2]

MixedDimensionNonUniformRefinement3D::CPPUNIT_TEST ( testDofOrdering  )

◆ CPPUNIT_TEST_SUITE_END()

MixedDimensionNonUniformRefinement3D::CPPUNIT_TEST_SUITE_END ( )

◆ LIBMESH_CPPUNIT_TEST_SUITE()

MixedDimensionNonUniformRefinement3D::LIBMESH_CPPUNIT_TEST_SUITE ( MixedDimensionNonUniformRefinement3D  )

Given a mesh with 36 HEX8 elements and an overlapping QUAD4 element located in the center of the HEX8 elements, this test ensures that when a single HEX8 element is flagged for refinement, which is a neighbor of the QUAD4 element, that the QUAD4 element will is also be flagged for refinement due to an underrefined_boundary_limit of 0 (default) and the neighboring HEX8 element (with respect to the QUAD4 element) will also refined due to an overrefined_boundary_limit of 0 (default).

◆ setUp()

void MixedDimensionNonUniformRefinement3D::setUp ( )
inline

Definition at line 950 of file mixed_dim_mesh_test.C.

951  {
952 #if LIBMESH_DIM > 2
953  this->build_mesh();
954 #endif
955  }

◆ tearDown()

void MixedDimensionNonUniformRefinement3D::tearDown ( )
inline

Definition at line 957 of file mixed_dim_mesh_test.C.

957 {}

◆ testDofOrdering()

void MixedDimensionNonUniformRefinement3D::testDofOrdering ( )
inline

Definition at line 1092 of file mixed_dim_mesh_test.C.

References libMesh::EquationSystems::add_system(), libMesh::DofMap::dof_indices(), libMesh::FIRST, libMesh::EquationSystems::get_system(), and libMesh::EquationSystems::init().

1093  {
1094 #ifdef LIBMESH_ENABLE_AMR
1095  LOG_UNIT_TEST;
1096 
1097  EquationSystems es(*_mesh);
1098  es.add_system<LinearImplicitSystem>("TestDofSystem");
1099  es.get_system("TestDofSystem").add_variable("u",FIRST);
1100  es.init();
1101 
1102  DofMap& dof_map = es.get_system("TestDofSystem").get_dof_map();
1103 
1104  //Elements to the left of the QUAD4 elements
1105  std::vector<dof_id_type> elem41_dof_indices, elem42_dof_indices, elem43_dof_indices, elem44_dof_indices;
1106  //Elements to the right of the QUAD4 elements
1107  std::vector<dof_id_type> elem45_dof_indices, elem46_dof_indices, elem47_dof_indices, elem48_dof_indices;
1108  //QUAD4 elements
1109  std::vector<dof_id_type> elem53_dof_indices, elem54_dof_indices, elem55_dof_indices, elem56_dof_indices;
1110 
1111  dof_map.dof_indices( _mesh->elem_ptr(41), elem41_dof_indices );
1112  dof_map.dof_indices( _mesh->elem_ptr(42), elem42_dof_indices );
1113  dof_map.dof_indices( _mesh->elem_ptr(43), elem43_dof_indices );
1114  dof_map.dof_indices( _mesh->elem_ptr(44), elem44_dof_indices );
1115  dof_map.dof_indices( _mesh->elem_ptr(45), elem45_dof_indices );
1116  dof_map.dof_indices( _mesh->elem_ptr(46), elem46_dof_indices );
1117  dof_map.dof_indices( _mesh->elem_ptr(47), elem47_dof_indices );
1118  dof_map.dof_indices( _mesh->elem_ptr(48), elem48_dof_indices );
1119  dof_map.dof_indices( _mesh->elem_ptr(53), elem53_dof_indices );
1120  dof_map.dof_indices( _mesh->elem_ptr(54), elem54_dof_indices );
1121  dof_map.dof_indices( _mesh->elem_ptr(55), elem55_dof_indices );
1122  dof_map.dof_indices( _mesh->elem_ptr(56), elem56_dof_indices );
1123 
1124  /* The dofs for the QUAD4 (ids = 53, 54, 55, and 56) element should be the same
1125  as the face of the HEX8 elements HEX8 (id=41, 42, 43, and 44) left of the
1126  QUAD4 elements. */
1127  CPPUNIT_ASSERT_EQUAL( elem53_dof_indices[0], elem41_dof_indices[4] );
1128  CPPUNIT_ASSERT_EQUAL( elem53_dof_indices[1], elem41_dof_indices[5] );
1129  CPPUNIT_ASSERT_EQUAL( elem53_dof_indices[2], elem41_dof_indices[6] );
1130  CPPUNIT_ASSERT_EQUAL( elem53_dof_indices[3], elem41_dof_indices[7] );
1131 
1132  CPPUNIT_ASSERT_EQUAL( elem54_dof_indices[0], elem42_dof_indices[4] );
1133  CPPUNIT_ASSERT_EQUAL( elem54_dof_indices[1], elem42_dof_indices[5] );
1134  CPPUNIT_ASSERT_EQUAL( elem54_dof_indices[2], elem42_dof_indices[6] );
1135  CPPUNIT_ASSERT_EQUAL( elem54_dof_indices[3], elem42_dof_indices[7] );
1136 
1137  CPPUNIT_ASSERT_EQUAL( elem55_dof_indices[0], elem43_dof_indices[4] );
1138  CPPUNIT_ASSERT_EQUAL( elem55_dof_indices[1], elem43_dof_indices[5] );
1139  CPPUNIT_ASSERT_EQUAL( elem55_dof_indices[2], elem43_dof_indices[6] );
1140  CPPUNIT_ASSERT_EQUAL( elem55_dof_indices[3], elem43_dof_indices[7] );
1141 
1142  CPPUNIT_ASSERT_EQUAL( elem56_dof_indices[0], elem44_dof_indices[4] );
1143  CPPUNIT_ASSERT_EQUAL( elem56_dof_indices[1], elem44_dof_indices[5] );
1144  CPPUNIT_ASSERT_EQUAL( elem56_dof_indices[2], elem44_dof_indices[6] );
1145  CPPUNIT_ASSERT_EQUAL( elem56_dof_indices[3], elem44_dof_indices[7] );
1146 
1147  /* The dofs for the QUAD4 (ids = 53, 54, 55, and 56) element should be the same
1148  as the face of the HEX8 elements HEX8 (id=45, 46, 47, and 49) left of the
1149  QUAD4 elements. */
1150  CPPUNIT_ASSERT_EQUAL( elem53_dof_indices[0], elem45_dof_indices[0] );
1151  CPPUNIT_ASSERT_EQUAL( elem53_dof_indices[1], elem45_dof_indices[1] );
1152  CPPUNIT_ASSERT_EQUAL( elem53_dof_indices[2], elem45_dof_indices[2] );
1153  CPPUNIT_ASSERT_EQUAL( elem53_dof_indices[3], elem45_dof_indices[3] );
1154 
1155  CPPUNIT_ASSERT_EQUAL( elem54_dof_indices[0], elem46_dof_indices[0] );
1156  CPPUNIT_ASSERT_EQUAL( elem54_dof_indices[1], elem46_dof_indices[1] );
1157  CPPUNIT_ASSERT_EQUAL( elem54_dof_indices[2], elem46_dof_indices[2] );
1158  CPPUNIT_ASSERT_EQUAL( elem54_dof_indices[3], elem46_dof_indices[3] );
1159 
1160  CPPUNIT_ASSERT_EQUAL( elem55_dof_indices[0], elem47_dof_indices[0] );
1161  CPPUNIT_ASSERT_EQUAL( elem55_dof_indices[1], elem47_dof_indices[1] );
1162  CPPUNIT_ASSERT_EQUAL( elem55_dof_indices[2], elem47_dof_indices[2] );
1163  CPPUNIT_ASSERT_EQUAL( elem55_dof_indices[3], elem47_dof_indices[3] );
1164 
1165  CPPUNIT_ASSERT_EQUAL( elem56_dof_indices[0], elem48_dof_indices[0] );
1166  CPPUNIT_ASSERT_EQUAL( elem56_dof_indices[1], elem48_dof_indices[1] );
1167  CPPUNIT_ASSERT_EQUAL( elem56_dof_indices[2], elem48_dof_indices[2] );
1168  CPPUNIT_ASSERT_EQUAL( elem56_dof_indices[3], elem48_dof_indices[3] );
1169 
1170  /* The dofs for the HEX8 elements (id=41, 42, 43, and 44) should be the same
1171  on the left side of the QUAD4 elements as the HEX8 elements (id=45, 46, 47, and 48)
1172  on the right as QUAD4 elements. */
1173  CPPUNIT_ASSERT_EQUAL( elem41_dof_indices[4], elem45_dof_indices[0] );
1174  CPPUNIT_ASSERT_EQUAL( elem41_dof_indices[5], elem45_dof_indices[1] );
1175  CPPUNIT_ASSERT_EQUAL( elem41_dof_indices[6], elem45_dof_indices[2] );
1176  CPPUNIT_ASSERT_EQUAL( elem41_dof_indices[7], elem45_dof_indices[3] );
1177 
1178  CPPUNIT_ASSERT_EQUAL( elem42_dof_indices[4], elem46_dof_indices[0] );
1179  CPPUNIT_ASSERT_EQUAL( elem42_dof_indices[5], elem46_dof_indices[1] );
1180  CPPUNIT_ASSERT_EQUAL( elem42_dof_indices[6], elem46_dof_indices[2] );
1181  CPPUNIT_ASSERT_EQUAL( elem42_dof_indices[7], elem46_dof_indices[3] );
1182 
1183  CPPUNIT_ASSERT_EQUAL( elem43_dof_indices[4], elem47_dof_indices[0] );
1184  CPPUNIT_ASSERT_EQUAL( elem43_dof_indices[5], elem47_dof_indices[1] );
1185  CPPUNIT_ASSERT_EQUAL( elem43_dof_indices[6], elem47_dof_indices[2] );
1186  CPPUNIT_ASSERT_EQUAL( elem43_dof_indices[7], elem47_dof_indices[3] );
1187 
1188  CPPUNIT_ASSERT_EQUAL( elem44_dof_indices[4], elem48_dof_indices[0] );
1189  CPPUNIT_ASSERT_EQUAL( elem44_dof_indices[5], elem48_dof_indices[1] );
1190  CPPUNIT_ASSERT_EQUAL( elem44_dof_indices[6], elem48_dof_indices[2] );
1191  CPPUNIT_ASSERT_EQUAL( elem44_dof_indices[7], elem48_dof_indices[3] );
1192 
1193  /* The dofs for the QUAD4 elements (ids = 53, 54, 55, and 56) should be the
1194  same for shared nodes. */
1195  CPPUNIT_ASSERT_EQUAL( elem53_dof_indices[1], elem54_dof_indices[0] );
1196  CPPUNIT_ASSERT_EQUAL( elem53_dof_indices[2], elem54_dof_indices[3] );
1197  CPPUNIT_ASSERT_EQUAL( elem53_dof_indices[3], elem55_dof_indices[0] );
1198  CPPUNIT_ASSERT_EQUAL( elem53_dof_indices[2], elem55_dof_indices[1] );
1199  CPPUNIT_ASSERT_EQUAL( elem53_dof_indices[2], elem56_dof_indices[0] );
1200  CPPUNIT_ASSERT_EQUAL( elem54_dof_indices[3], elem55_dof_indices[1] );
1201  CPPUNIT_ASSERT_EQUAL( elem54_dof_indices[3], elem56_dof_indices[0] );
1202  CPPUNIT_ASSERT_EQUAL( elem54_dof_indices[2], elem56_dof_indices[1] );
1203  CPPUNIT_ASSERT_EQUAL( elem55_dof_indices[1], elem56_dof_indices[0] );
1204  CPPUNIT_ASSERT_EQUAL( elem55_dof_indices[2], elem56_dof_indices[3] );
1205 
1206 
1207 #endif
1208  }
This is the EquationSystems class.
void dof_indices(const Elem *const elem, std::vector< dof_id_type > &di) const
Fills the vector di with the global degree of freedom indices for the element.
Definition: dof_map.C:1992
Manages consistently variables, degrees of freedom, coefficient vectors, matrices and linear solvers ...
This class handles the numbering of degrees of freedom on a mesh.
Definition: dof_map.h:169
unsigned int add_variable(std::string_view var, const FEType &type, const std::set< subdomain_id_type > *const active_subdomains=nullptr)
Adds the variable var to the list of variables for this system.
Definition: system.C:1305
std::unique_ptr< ReplicatedMesh > _mesh

◆ testMesh()

void MixedDimensionNonUniformRefinement3D::testMesh ( )
inline

Definition at line 959 of file mixed_dim_mesh_test.C.

960  {
961 #ifdef LIBMESH_ENABLE_AMR
962  LOG_UNIT_TEST;
963 
964  // We should have 57 total and 54 active elements.
965  CPPUNIT_ASSERT_EQUAL(static_cast<dof_id_type>(57), _mesh->n_elem() );
966  CPPUNIT_ASSERT_EQUAL(static_cast<dof_id_type>(54), _mesh->n_active_elem() );
967 
968  // We should have 113 nodes
969  CPPUNIT_ASSERT_EQUAL(static_cast<dof_id_type>(113), _mesh->n_nodes() );
970 
971  // QUAD4,id=53 should have same nodes as a face in HEX8, id=39
972  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(53).node_id(0),
973  _mesh->elem_ref(41).node_id(4) );
974  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(53).node_id(1),
975  _mesh->elem_ref(41).node_id(5) );
976  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(53).node_id(2),
977  _mesh->elem_ref(41).node_id(6) );
978  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(53).node_id(3),
979  _mesh->elem_ref(41).node_id(7) );
980 
981  // QUAD4,id=53 should have same nodes as a face in HEX8, id=45
982  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(53).node_id(0),
983  _mesh->elem_ref(45).node_id(0) );
984  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(53).node_id(1),
985  _mesh->elem_ref(45).node_id(1) );
986  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(53).node_id(2),
987  _mesh->elem_ref(45).node_id(2) );
988  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(53).node_id(3),
989  _mesh->elem_ref(45).node_id(3) );
990 
991  // QUAD4,id=54 should have same nodes as a face in HEX8, id=42
992  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(54).node_id(0),
993  _mesh->elem_ref(42).node_id(4) );
994  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(54).node_id(1),
995  _mesh->elem_ref(42).node_id(5) );
996  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(54).node_id(2),
997  _mesh->elem_ref(42).node_id(6) );
998  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(54).node_id(3),
999  _mesh->elem_ref(42).node_id(7) );
1000 
1001  // QUAD4,id=54 should have same nodes as a face in HEX8, id=46
1002  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(54).node_id(0),
1003  _mesh->elem_ref(46).node_id(0) );
1004  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(54).node_id(1),
1005  _mesh->elem_ref(46).node_id(1) );
1006  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(54).node_id(2),
1007  _mesh->elem_ref(46).node_id(2) );
1008  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(54).node_id(3),
1009  _mesh->elem_ref(46).node_id(3) );
1010 
1011  // QUAD4,id=55 should have same nodes as a face in HEX8, id=43
1012  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(55).node_id(0),
1013  _mesh->elem_ref(43).node_id(4) );
1014  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(55).node_id(1),
1015  _mesh->elem_ref(43).node_id(5) );
1016  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(55).node_id(2),
1017  _mesh->elem_ref(43).node_id(6) );
1018  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(55).node_id(3),
1019  _mesh->elem_ref(43).node_id(7) );
1020 
1021  // QUAD4,id=55 should have same nodes as a face in HEX8, id=47
1022  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(55).node_id(0),
1023  _mesh->elem_ref(47).node_id(0) );
1024  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(55).node_id(1),
1025  _mesh->elem_ref(47).node_id(1) );
1026  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(55).node_id(2),
1027  _mesh->elem_ref(47).node_id(2) );
1028  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(55).node_id(3),
1029  _mesh->elem_ref(47).node_id(3) );
1030 
1031  // QUAD4,id=56 should have same nodes as a face in HEX8, id=44
1032  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(56).node_id(0),
1033  _mesh->elem_ref(44).node_id(4) );
1034  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(56).node_id(1),
1035  _mesh->elem_ref(44).node_id(5) );
1036  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(56).node_id(2),
1037  _mesh->elem_ref(44).node_id(6) );
1038  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(56).node_id(3),
1039  _mesh->elem_ref(44).node_id(7) );
1040 
1041  // QUAD4,id=56 should have same nodes as a face in HEX8, id=48
1042  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(56).node_id(0),
1043  _mesh->elem_ref(48).node_id(0) );
1044  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(56).node_id(1),
1045  _mesh->elem_ref(48).node_id(1) );
1046  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(56).node_id(2),
1047  _mesh->elem_ref(48).node_id(2) );
1048  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(56).node_id(3),
1049  _mesh->elem_ref(48).node_id(3) );
1050 
1051  // Shared node between the QUAD4 elements should have the same global id
1052  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(53).node_id(1),
1053  _mesh->elem_ref(54).node_id(0) );
1054  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(53).node_id(2),
1055  _mesh->elem_ref(54).node_id(3) );
1056  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(53).node_id(3),
1057  _mesh->elem_ref(55).node_id(0) );
1058  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(53).node_id(2),
1059  _mesh->elem_ref(55).node_id(1) );
1060  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(54).node_id(3),
1061  _mesh->elem_ref(56).node_id(0) );
1062  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(54).node_id(2),
1063  _mesh->elem_ref(56).node_id(1) );
1064  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(55).node_id(1),
1065  _mesh->elem_ref(56).node_id(0) );
1066  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(55).node_id(2),
1067  _mesh->elem_ref(56).node_id(3) );
1068 
1069  // QUAD4 child elements should have the correct parent
1070  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(53).parent(),
1071  _mesh->elem_ptr(36) );
1072  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(54).parent(),
1073  _mesh->elem_ptr(36) );
1074  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(55).parent(),
1075  _mesh->elem_ptr(36) );
1076  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(56).parent(),
1077  _mesh->elem_ptr(36) );
1078 
1079  // QUAD4 child elements should have the correct interior_parent
1080  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(53).interior_parent(),
1081  _mesh->elem_ptr(41) );
1082  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(54).interior_parent(),
1083  _mesh->elem_ptr(42) );
1084  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(55).interior_parent(),
1085  _mesh->elem_ptr(43) );
1086  CPPUNIT_ASSERT_EQUAL( _mesh->elem_ref(56).interior_parent(),
1087  _mesh->elem_ptr(44) );
1088 
1089 #endif
1090  }
std::unique_ptr< ReplicatedMesh > _mesh

Member Data Documentation

◆ _mesh

std::unique_ptr<ReplicatedMesh> MixedDimensionNonUniformRefinement3D::_mesh
protected

Definition at line 888 of file mixed_dim_mesh_test.C.


The documentation for this class was generated from the following file: